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

Modify Booking

Modify Booking

patch

Modify an existing shipping protection booking. Typical logistics modifications include updating the shipping date when dispatch slips, or adjusting carrier details. The modification is applied directly and may produce a small price adjustment.

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.

2. Date (Timestamp)

  • Purpose: Timestamp used for generating the signature and preventing replay attacks.
  • Format: RFC 7231 format (e.g., in GMT).

3. Authorization (Computed Signature)

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

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

{
  "quotes": [
    {
      "id": "4c783f66-c253-43cf-86d6-3a9096769679",
      "update_fields": {
        "shipping_date": "2026-05-12T10:00:00+00:00"
      }
    }
  ]
}
{
  "id": "L9KQM-2NX4P-INS",
  "status": "CONFIRMED",
  "currency": "USD",
  "total_price": 164.95,
  "total_price_formatted": "US$164.95",
  "quotes": [
    {
      "id": "4c783f66-c253-43cf-86d6-3a9096769679",
      "status": "CONFIRMED",
      "price": 164.95,
      "price_formatted": "US$164.95",
      "price_diff": 0,
      "price_diff_formatted": "US$0.00"
    }
  ],
  "total_price_diff": 0,
  "total_price_diff_formatted": "US$0.00"
}

Modify Booking - Preview

patch

Preview the price changes that would result from a modification without 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.

2. Date (Timestamp)

  • Purpose: Timestamp used for generating the signature and preventing replay attacks.
  • Format: RFC 7231 format (e.g., in GMT).

3. Authorization (Computed Signature)

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

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
booking_idstringRequired
Body
Responses
200

OK

application/json
idstringOptional
statusstringOptional
currencystringOptional
total_pricenumberOptional
total_price_formattedstringOptional
total_price_diffnumberOptional
total_price_diff_formattedstringOptional
update_idstringOptional
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: 120

{
  "quotes": [
    {
      "id": "4c783f66-c253-43cf-86d6-3a9096769679",
      "update_fields": {
        "shipping_date": "2026-05-12T10:00:00+00:00"
      }
    }
  ]
}
{
  "id": "L9KQM-2NX4P-INS",
  "status": "CONFIRMED",
  "currency": "USD",
  "total_price": 164.95,
  "total_price_formatted": "US$164.95",
  "quotes": [
    {
      "id": "4c783f66-c253-43cf-86d6-3a9096769679",
      "status": "CONFIRMED",
      "price": 164.95,
      "price_formatted": "US$164.95",
      "price_diff": 0,
      "price_diff_formatted": "US$0.00"
    }
  ],
  "total_price_diff": 0,
  "total_price_diff_formatted": "US$0.00",
  "update_id": "KrXp9-MnVcQ-h2YO8"
}

Modify Booking - Confirm

post

Finalize 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.

2. Date (Timestamp)

  • Purpose: Timestamp used for generating the signature and preventing replay attacks.
  • Format: RFC 7231 format (e.g., in GMT).

3. Authorization (Computed Signature)

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

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
booking_idstringRequired
update_idstringRequired
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": "L9KQM-2NX4P-INS",
  "status": "CONFIRMED",
  "currency": "USD",
  "total_price": 164.95,
  "total_price_formatted": "US$164.95",
  "quotes": [
    {
      "id": "4c783f66-c253-43cf-86d6-3a9096769679",
      "status": "CONFIRMED",
      "price": 164.95,
      "price_formatted": "US$164.95",
      "price_diff": 0,
      "price_diff_formatted": "US$0.00"
    }
  ],
  "total_price_diff": 0,
  "total_price_diff_formatted": "US$0.00"
}

Last updated

Was this helpful?