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

Modify Booking

Modify Booking

patch

The Modify Booking endpoint is used when a customer wants to make changes to their existing policy. This endpoint allows you to update policy details which may result in price adjustments, refunds, or additional fees. The modification is applied directly.

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: a1b2c3d4e5f6g7h8

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.

booking_idstringRequired

The booking ID returned from the Confirm Offer endpoint.

Body
Responses
200

OK

application/json
idstringOptional
statusstringOptional
currencystringOptional
total_pricenumberOptional
total_price_formattedstringOptional
total_price_diffnumberOptional
total_price_diff_formattedstringOptional
patch/partners/{partner_code}/bookings/{booking_id}/
PATCH /x/partners/{partner_code}/bookings/{booking_id}/ HTTP/1.1
Host: api.xcover.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 103

{
  "quotes": [
    {
      "id": "755100f6-d7a2-4a8f-a8b8-e054c747a375",
      "update_fields": {
        "total_tickets_price": 1500
      }
    }
  ]
}
{
  "id": "CJTE3-PFJF7-INS",
  "status": "CONFIRMED",
  "currency": "AUD",
  "total_price": 448.8,
  "total_price_formatted": "A$448.80",
  "partner_transaction_id": null,
  "created_at": "2026-01-15T22:22:32.851000Z",
  "updated_at": "2026-01-15T22:45:00.000000Z",
  "pds_url": "https://www.xcover.com/en/pds/CJTE3-PFJF7-INS",
  "security_token": "0rRaJ-WzAoa-oHjBK-14f6M",
  "quotes": [
    {
      "id": "755100f6-d7a2-4a8f-a8b8-e054c747a375",
      "policy_start_date": "2026-01-15T22:22:32.851000+00:00",
      "policy_end_date": "2026-02-13T22:22:32.851000+00:00",
      "status": "CONFIRMED",
      "price": 448.8,
      "price_formatted": "A$448.80",
      "price_diff": -6.12,
      "price_diff_formatted": "-A$6.12",
      "policy": {
        "policy_type": "comprehensive_travel_insurance",
        "policy_type_version": "1",
        "policy_type_slug": "comprehensive_travel_insurance_v1",
        "policy_type_group_name": "travel",
        "policy_name": "Comprehensive Travel Protection (AU)",
        "policy_code": "BKCTPAU0",
        "policy_version": "7933ab1a-b00a-45fa-bfe6-16adba0a4765",
        "category": "comprehensive_travel_insurance",
        "policy_currency": "AUD"
      },
      "insured": [
        {
          "id": "8de4531a-4f56-4797-8b5b-b451fcbe4e1a",
          "first_name": "d41d8cd98f00b204e9800998ecf8427e",
          "last_name": "d41d8cd98f00b204e9800998ecf8427e",
          "email": "[email protected]",
          "age": 34,
          "birth_date": "1987-02-24"
        }
      ],
      "tax": {
        "total_tax": 23.88,
        "total_amount_without_tax": 424.92,
        "total_tax_formatted": "A$23.88",
        "total_amount_without_tax_formatted": "A$424.92"
      },
      "commission": {
        "partner_commission": 203.96,
        "total_commission": 203.96,
        "partner_commission_formatted": "A$203.96",
        "total_commission_formatted": "A$203.96"
      },
      "can_be_cancelled": true
    }
  ],
  "coi": {
    "url": "https://www.xcover.com/en/coi/CJTE3-PFJF7-INS?security_token=0rRaJ-WzAoa-oHjBK-14f6M",
    "pdf": "https://www.xcover.com/en/coi/CJTE3-PFJF7-INS.pdf?security_token=0rRaJ-WzAoa-oHjBK-14f6M"
  },
  "policyholder": {
    "first_name": "d41d8cd98f00b204e9800998ecf8427e",
    "last_name": "d41d8cd98f00b204e9800998ecf8427e",
    "email": "[email protected]",
    "country": "AU"
  },
  "total_tax": 23.88,
  "total_tax_formatted": "A$23.88",
  "total_premium": 424.92,
  "total_premium_formatted": "A$424.92",
  "total_price_diff": -6.12,
  "total_price_diff_formatted": "-A$6.12",
  "fnol_link": "https://www.xcover.com/en/account/claims/fnol?bookingID=CJTE3-PFJF7-INS&security_token=0rRaJ-WzAoa-oHjBK-14f6M"
}

Modify Booking - Preview

patch

The Modify Booking Preview endpoint allows you to preview the price changes that would result from a modification without actually applying them. The response includes an update_id that can be used to confirm the modification.

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: a1b2c3d4e5f6g7h8

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.

booking_idstringRequired

The booking ID returned from the Confirm Offer endpoint.

Body
Responses
200

OK

application/json
idstringOptional
statusstringOptional
currencystringOptional
total_pricenumberOptional
total_price_formattedstringOptional
total_price_diffnumberOptional
total_price_diff_formattedstringOptional
update_idstringOptional

The update ID to use when confirming this modification via the Confirm Update endpoint.

patch/partners/{partner_code}/bookings/{booking_id}/quote_for_update
PATCH /x/partners/{partner_code}/bookings/{booking_id}/quote_for_update HTTP/1.1
Host: api.xcover.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 103

{
  "quotes": [
    {
      "id": "755100f6-d7a2-4a8f-a8b8-e054c747a375",
      "update_fields": {
        "total_tickets_price": 1500
      }
    }
  ]
}
{
  "id": "CJTE3-PFJF7-INS",
  "status": "CONFIRMED",
  "currency": "AUD",
  "total_price": 448.8,
  "total_price_formatted": "A$448.80",
  "partner_transaction_id": null,
  "created_at": "2026-01-15T22:22:32.851000Z",
  "updated_at": "2026-01-15T22:45:00.000000Z",
  "pds_url": "https://www.xcover.com/en/pds/CJTE3-PFJF7-INS",
  "security_token": "0rRaJ-WzAoa-oHjBK-14f6M",
  "quotes": [
    {
      "id": "755100f6-d7a2-4a8f-a8b8-e054c747a375",
      "policy_start_date": "2026-01-15T22:22:32.851000+00:00",
      "policy_end_date": "2026-02-13T22:22:32.851000+00:00",
      "status": "CONFIRMED",
      "price": 448.8,
      "price_formatted": "A$448.80",
      "price_diff": -6.12,
      "price_diff_formatted": "-A$6.12"
    }
  ],
  "total_price_diff": -6.12,
  "total_price_diff_formatted": "-A$6.12",
  "update_id": "ZSaXV-UPpMW-h2YO8"
}

Modify Booking - Confirm

post

The Confirm Update endpoint finalizes a previewed modification. Use the update_id returned from the Modify Booking Preview endpoint.

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: a1b2c3d4e5f6g7h8

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.

booking_idstringRequired

The booking ID returned from the Confirm Offer endpoint.

update_idstringRequired

The update ID returned from the Modify Booking Preview endpoint.

Body
xpay_charge_idstringOptional

XPay charge ID if additional payment is required

Responses
201

Created

application/json
idstringOptional
statusstringOptional
currencystringOptional
total_pricenumberOptional
total_price_formattedstringOptional
total_price_diffnumberOptional
total_price_diff_formattedstringOptional
post/partners/{partner_code}/bookings/{booking_id}/confirm_update/{update_id}/
POST /x/partners/{partner_code}/bookings/{booking_id}/confirm_update/{update_id}/ HTTP/1.1
Host: api.xcover.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 25

{
  "xpay_charge_id": "text"
}
{
  "id": "CJTE3-PFJF7-INS",
  "status": "CONFIRMED",
  "currency": "AUD",
  "total_price": 448.8,
  "total_price_formatted": "A$448.80",
  "partner_transaction_id": null,
  "created_at": "2026-01-15T22:22:32.851000Z",
  "updated_at": "2026-01-15T22:50:00.000000Z",
  "pds_url": "https://www.xcover.com/en/pds/CJTE3-PFJF7-INS",
  "security_token": "0rRaJ-WzAoa-oHjBK-14f6M",
  "quotes": [
    {
      "id": "755100f6-d7a2-4a8f-a8b8-e054c747a375",
      "policy_start_date": "2026-01-15T22:22:32.851000+00:00",
      "policy_end_date": "2026-02-13T22:22:32.851000+00:00",
      "status": "CONFIRMED",
      "price": 448.8,
      "price_formatted": "A$448.80",
      "price_diff": -6.12,
      "price_diff_formatted": "-A$6.12"
    }
  ],
  "coi": {
    "url": "https://www.xcover.com/en/coi/CJTE3-PFJF7-INS?security_token=0rRaJ-WzAoa-oHjBK-14f6M",
    "pdf": "https://www.xcover.com/en/coi/CJTE3-PFJF7-INS.pdf?security_token=0rRaJ-WzAoa-oHjBK-14f6M"
  },
  "policyholder": {
    "first_name": "d41d8cd98f00b204e9800998ecf8427e",
    "last_name": "d41d8cd98f00b204e9800998ecf8427e",
    "email": "[email protected]",
    "country": "AU"
  },
  "total_tax": 23.88,
  "total_tax_formatted": "A$23.88",
  "total_premium": 424.92,
  "total_premium_formatted": "A$424.92",
  "total_price_diff": -6.12,
  "total_price_diff_formatted": "-A$6.12",
  "fnol_link": "https://www.xcover.com/en/account/claims/fnol?bookingID=CJTE3-PFJF7-INS&security_token=0rRaJ-WzAoa-oHjBK-14f6M"
}

Last updated

Was this helpful?