> For the complete documentation index, see [llms.txt](https://partner-docs.covergenius.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://partner-docs.covergenius.com/offers/vertical-examples/parcel-shipping/modify-booking.md).

# Modify Booking

## Modify Booking

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

```json
{"openapi":"3.0.0","info":{"title":"Offers API - Logistics","version":"1.0.0"},"servers":[{"url":"https://api.xcover.com/x"}],"security":[{"CustomAPISignature":[]}],"components":{"securitySchemes":{"CustomAPISignature":{"type":"apiKey","name":"Authorization","in":"header","description":"**Composite Authentication Scheme (Client Key, Date, and Signature)**\n\nThis scheme requires the client to provide **three** mandatory headers in every request:\n\n### 1. X-Api-Key (Client Key)\n* **Purpose:** Public identifier for the API consumer.\n\n### 2. Date (Timestamp)\n* **Purpose:** Timestamp used for generating the signature and preventing replay attacks.\n* **Format:** RFC 7231 format (e.g., in GMT).\n\n### 3. Authorization (Computed Signature)\n* **Purpose:** Cryptographic signature that verifies the request's authenticity and integrity.\n* **Format:** `SIGNATURE [authHeader]`\n\nThe `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**.\n"}}},"paths":{"/partners/{partner_code}/bookings/{booking_id}/":{"patch":{"summary":"Modify Booking","description":"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.","tags":["Modify Booking"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quotes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The quote ID to modify"},"update_fields":{"type":"object","description":"Fields to update on the quote. For logistics, common fields include shipping_date, carrier, and carrier_service_name.","additionalProperties":true}},"required":["id","update_fields"]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"currency":{"type":"string"},"total_price":{"type":"number"},"total_price_formatted":{"type":"string"},"quotes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"price":{"type":"number"},"price_formatted":{"type":"string"},"price_diff":{"type":"number"},"price_diff_formatted":{"type":"string"}}}},"total_price_diff":{"type":"number"},"total_price_diff_formatted":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}}}}}}}}}}}}
```

## Modify Booking - Preview

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

```json
{"openapi":"3.0.0","info":{"title":"Offers API - Logistics","version":"1.0.0"},"servers":[{"url":"https://api.xcover.com/x"}],"security":[{"CustomAPISignature":[]}],"components":{"securitySchemes":{"CustomAPISignature":{"type":"apiKey","name":"Authorization","in":"header","description":"**Composite Authentication Scheme (Client Key, Date, and Signature)**\n\nThis scheme requires the client to provide **three** mandatory headers in every request:\n\n### 1. X-Api-Key (Client Key)\n* **Purpose:** Public identifier for the API consumer.\n\n### 2. Date (Timestamp)\n* **Purpose:** Timestamp used for generating the signature and preventing replay attacks.\n* **Format:** RFC 7231 format (e.g., in GMT).\n\n### 3. Authorization (Computed Signature)\n* **Purpose:** Cryptographic signature that verifies the request's authenticity and integrity.\n* **Format:** `SIGNATURE [authHeader]`\n\nThe `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**.\n"}}},"paths":{"/partners/{partner_code}/bookings/{booking_id}/quote_for_update":{"patch":{"summary":"Modify Booking - Preview","description":"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.","tags":["Modify Booking"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quotes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"update_fields":{"type":"object","additionalProperties":true}},"required":["id","update_fields"]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"currency":{"type":"string"},"total_price":{"type":"number"},"total_price_formatted":{"type":"string"},"quotes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"price":{"type":"number"},"price_formatted":{"type":"string"},"price_diff":{"type":"number"},"price_diff_formatted":{"type":"string"}}}},"total_price_diff":{"type":"number"},"total_price_diff_formatted":{"type":"string"},"update_id":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}}}}
```

## Modify Booking - Confirm

> Finalize a previewed modification. Use the \`update\_id\` returned from the Modify Booking Preview endpoint.

```json
{"openapi":"3.0.0","info":{"title":"Offers API - Logistics","version":"1.0.0"},"servers":[{"url":"https://api.xcover.com/x"}],"security":[{"CustomAPISignature":[]}],"components":{"securitySchemes":{"CustomAPISignature":{"type":"apiKey","name":"Authorization","in":"header","description":"**Composite Authentication Scheme (Client Key, Date, and Signature)**\n\nThis scheme requires the client to provide **three** mandatory headers in every request:\n\n### 1. X-Api-Key (Client Key)\n* **Purpose:** Public identifier for the API consumer.\n\n### 2. Date (Timestamp)\n* **Purpose:** Timestamp used for generating the signature and preventing replay attacks.\n* **Format:** RFC 7231 format (e.g., in GMT).\n\n### 3. Authorization (Computed Signature)\n* **Purpose:** Cryptographic signature that verifies the request's authenticity and integrity.\n* **Format:** `SIGNATURE [authHeader]`\n\nThe `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**.\n"}}},"paths":{"/partners/{partner_code}/bookings/{booking_id}/confirm_update/{update_id}/":{"post":{"summary":"Modify Booking - Confirm","description":"Finalize a previewed modification. Use the `update_id` returned from the Modify Booking Preview endpoint.","tags":["Modify Booking"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"xpay_charge_id":{"type":"string","description":"XPay charge ID if additional payment is required"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"currency":{"type":"string"},"total_price":{"type":"number"},"total_price_formatted":{"type":"string"},"quotes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"price":{"type":"number"},"price_formatted":{"type":"string"},"price_diff":{"type":"number"},"price_diff_formatted":{"type":"string"}}}},"total_price_diff":{"type":"number"},"total_price_diff_formatted":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://partner-docs.covergenius.com/offers/vertical-examples/parcel-shipping/modify-booking.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
