For the complete documentation index, see llms.txt. This page is also available as Markdown.

Confirm Offer

Confirm Offer

post

The Confirm Offer endpoint is used to finalize the purchase of products from a previously created Offer. This endpoint converts the selected Offer into a confirmed booking after payment has been successfully collected.

Idempotency

This endpoint supports idempotency keys via the x-idempotency-key header to prevent duplicate transactions. Provide a unique operation identifier (e.g., UUID) to ensure safe retries. Duplicate requests return:

  • 409 Conflict: The request was already processed; response contains the cached original result (handle as success)

  • 423 Locked: The original request is still processing; retry after a short delay

Authorizations
AuthorizationstringRequired

Composite Authentication Scheme (Client Key, Date, and Signature)

This scheme requires the client to provide three mandatory headers in every request:

1. X-Api-Key (Client Key)

  • Purpose: Public identifier for the API consumer.
  • Example: X-Api-Key: YOUR_API_KEY_HERE

2. Date (Timestamp)

  • Purpose: Timestamp used for generating the signature and preventing replay attacks.
  • Format: RFC 7231 format (e.g., in GMT).
  • Example: Date: Sun, 09 Nov 2025 04:04:00 GMT

3. Authorization (Computed Signature)

  • Purpose: The cryptographic signature that verifies the request's authenticity and integrity.
  • Format: SIGNATURE [authHeader]

Signature Generation Logic: The authHeader value is derived from a cryptographic hash (e.g., HMAC-SHA256) of canonical request components (HTTP Method, Path, and the contents of the Date header), signed with the private Client Secret.

Path parameters
partner_codestringRequired

Partner code identifier. Client Solutions Engineer (CSE) should provide this value.

offer_idstringRequired

The offer ID returned from the Create Offer endpoint.

Header parameters
x-idempotency-keystring · uuidOptional

A unique identifier to ensure idempotent request processing. If a request with the same idempotency key and body has already been processed, the cached response is returned with a 409 Conflict status code (which can be treated as successful). Keys are stored for 48 hours.

Example: 550e8400-e29b-41d4-a716-446655440000
Body
require_payment_confirmationbooleanOptional

Enables two-step confirmation. If true, the booking is left in PENDING_PAYMENT until you call Confirm booking endpoint. Defaults to false, confirming in one step.

Default: falseExample: false
partner_transaction_idstringOptional

Your internal transaction identifier

booking_agentobjectOptional

Agent information if booked through an agent

Responses
200

OK

application/json
post/partners/{partner_code}/offers/{offer_id}/confirm/
POST /x/partners/{partner_code}/offers/{offer_id}/confirm/ HTTP/1.1
Host: api.xcover.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 681

{
  "quotes": [
    {
      "id": "text",
      "insured": [
        {
          "first_name": "text",
          "last_name": "text",
          "email": "[email protected]",
          "birth_date": "2026-01-01",
          "country": "text",
          "city": "text",
          "postcode": "text",
          "region": "text",
          "age": 1
        }
      ],
      "instalment_plan": "text",
      "first_instalment_paid": true
    }
  ],
  "policyholder": {
    "first_name": "text",
    "last_name": "text",
    "email": "[email protected]",
    "phone": "text",
    "country": "text",
    "region": "text",
    "city": "text",
    "postcode": "text",
    "address1": "text",
    "address2": "text"
  },
  "require_payment_confirmation": false,
  "partner_transaction_id": "text",
  "payment_details": {
    "provider": "text",
    "transaction_id": "text",
    "xpay_charge_id": "text",
    "xpay_customer_id": "text",
    "customer_token_id": "text"
  },
  "booking_agent": {}
}
{
  "id": "text",
  "status": "text",
  "currency": "text",
  "total_price": 1,
  "total_price_formatted": "text",
  "partner_transaction_id": null,
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z",
  "pds_url": "https://example.com",
  "security_token": "text",
  "quotes": [
    {
      "id": "text",
      "policy_start_date": "2026-01-01T00:00:00.000Z",
      "policy_end_date": "2026-01-01T00:00:00.000Z",
      "status": "text",
      "price": 1,
      "price_formatted": "text",
      "policy": {
        "policy_type": "text",
        "policy_type_version": "text",
        "policy_type_slug": "text",
        "policy_type_group_name": "text",
        "policy_name": "text",
        "policy_code": "text",
        "policy_version": "text",
        "category": "text",
        "content": {
          "title": "text",
          "header": null,
          "description": "text",
          "optout_msg": "text",
          "inclusions": [
            {
              "title": "text",
              "description": "text"
            }
          ],
          "exclusions": [],
          "disclaimer": "text",
          "disclaimer_html": "text",
          "payment_disclaimer": "text",
          "in_path_disclaimer": "text",
          "extra_content": {}
        },
        "underwriter": {
          "disclaimer": "text",
          "name": "text"
        },
        "claim_selector_id": null,
        "policy_currency": "text"
      },
      "insured": [
        {
          "id": "text",
          "first_name": "text",
          "last_name": "text",
          "email": "[email protected]",
          "region": null
        }
      ],
      "tax": {
        "total_tax": 1,
        "total_amount_without_tax": 1,
        "taxes": [
          {
            "tax_amount": 1,
            "tax_code": "text",
            "tax_amount_formatted": "text"
          }
        ],
        "total_tax_formatted": "text",
        "total_amount_without_tax_formatted": "text"
      },
      "duration": "text",
      "benefits": [
        {
          "benefit_content_id": "text",
          "description": "text",
          "extra_content": {
            "benefit-text-test": "text",
            "benefit_rich_text_test": "text"
          },
          "limit": 1,
          "limit_policy_currency": 1,
          "limit_formatted": "text",
          "limit_policy_currency_formatted": "text",
          "excess": 1,
          "excess_policy_currency": 1,
          "excess_formatted": "text",
          "excess_policy_currency_formatted": "text"
        }
      ],
      "commission": {
        "partner_commission": 1,
        "surcharge_commission": 1,
        "total_commission": 1,
        "partner_commission_formatted": "text",
        "surcharge_commission_formatted": "text",
        "total_commission_formatted": "text"
      },
      "created_at": "2026-01-01T00:00:00.000Z",
      "confirmed_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z",
      "cancelled_at": null,
      "cancelled_from": null,
      "is_renewable": true,
      "is_pricebeat_enabled": null,
      "cover_amount": 1,
      "cover_amount_formatted": "text",
      "pds_url": "https://example.com",
      "attachments": [],
      "files": [],
      "custom_documents": null,
      "extra_fields": {
        "destination_region": "text",
        "seller_entity": "text",
        "age_brackets": "text",
        "desitnation_sanctions": [],
        "sanctioned_distination_countries": [
          "text"
        ],
        "test_underwrting_rule": true
      },
      "surcharge": {
        "total_amount": null,
        "surcharges": null,
        "total_amount_formatted": "text"
      },
      "parent_quote_status": null,
      "experiment": null,
      "next_renewal": null,
      "can_be_cancelled": true,
      "third_party_admins": [],
      "ombudsman_list": [],
      "cancellation_info": {
        "reason_for_cancellation": "text"
      }
    }
  ],
  "coi": {
    "url": "https://example.com",
    "pdf": "https://example.com"
  },
  "account_url": "https://example.com",
  "sign_up_url": "https://example.com",
  "policyholder": {
    "first_name": "text",
    "last_name": "text",
    "email": "[email protected]",
    "phone": null,
    "address1": null,
    "address2": null,
    "postcode": "text",
    "company": null,
    "company_reg_id": null,
    "middle_name": null,
    "country": "text",
    "age": 1,
    "city": null,
    "region": "text",
    "secondary_email": null,
    "birth_date": null,
    "allow_updates": true,
    "fields_allowed_to_update": []
  },
  "total_tax": 1,
  "total_tax_formatted": "text",
  "total_premium": 1,
  "total_premium_formatted": "text",
  "fnol_link": "https://example.com",
  "booking_agent": null
}

Last updated

Was this helpful?