# Confirm Offer

## Confirm Offer

> 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\
> &#x20; the cached original result (handle as success)\
> \
> \- \*\*423 Locked\*\*: The original request is still processing; retry after\
> &#x20; a short delay

```json
{"openapi":"3.0.0","info":{"title":"Offers API","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* **Example:** `X-Api-Key: a1b2c3d4e5f6g7h8`\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* **Example:** `Date: Sun, 09 Nov 2025 04:04:00 GMT`\n\n### 3. Authorization (Computed Signature)\n* **Purpose:** The cryptographic signature that verifies the request's authenticity and integrity.\n* **Format:** `SIGNATURE [authHeader]`\n\n**Signature Generation Logic:**\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}/offers/{offer_id}/confirm/":{"post":{"summary":"Confirm Offer","description":"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.\n\n## Idempotency\n\nThis 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:\n- **409 Conflict**: The request was already processed; response contains\n  the cached original result (handle as success)\n\n- **423 Locked**: The original request is still processing; retry after\n  a short delay","tags":["Confirm Offer"],"parameters":[{"name":"x-idempotency-key","in":"header","required":false,"description":"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.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quotes":{"type":"array","description":"Array of quote objects to confirm","items":{"type":"object","properties":{"id":{"type":"string","description":"The product ID (quote ID) from the offer response"},"insured":{"type":"array","description":"List of insured persons if required by the policy","items":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string","format":"email"},"birth_date":{"type":"string","format":"date"},"age":{"type":"integer"}}}}},"required":["id"]}},"policyholder":{"type":"object","description":"Policyholder information","properties":{"first_name":{"type":"string","description":"Policyholder's first name"},"last_name":{"type":"string","description":"Policyholder's last name"},"email":{"type":"string","format":"email","description":"Policyholder's email address"},"address1":{"type":"string","description":"Policyholder's address line 1"},"city":{"type":"string","description":"Policyholder's city"},"country":{"type":"string","description":"Policyholder's country code"}},"required":["first_name","last_name","email","country"]}},"required":["quotes","policyholder"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Booking ID"},"status":{"type":"string","description":"Booking status"},"currency":{"type":"string"},"total_price":{"type":"number"},"total_price_formatted":{"type":"string"},"partner_transaction_id":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"pds_url":{"type":"string","format":"uri"},"security_token":{"type":"string"},"quotes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"policy_start_date":{"type":"string","format":"date-time"},"policy_end_date":{"type":"string","format":"date-time"},"status":{"type":"string"},"price":{"type":"number"},"price_formatted":{"type":"string"},"policy":{"type":"object","properties":{"policy_type":{"type":"string"},"policy_type_version":{"type":"string"},"policy_type_slug":{"type":"string"},"policy_type_group_name":{"type":"string"},"policy_name":{"type":"string"},"policy_code":{"type":"string"},"policy_version":{"type":"string"},"category":{"type":"string"},"policy_currency":{"type":"string"}}},"insured":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string","format":"email"},"age":{"type":"integer"},"birth_date":{"type":"string","format":"date"}}}},"tax":{"type":"object","properties":{"total_tax":{"type":"number"},"total_amount_without_tax":{"type":"number"},"taxes":{"type":"array","items":{"type":"object","properties":{"tax_amount":{"type":"number"},"tax_code":{"type":"string"},"tax_amount_formatted":{"type":"string"}}}},"total_tax_formatted":{"type":"string"},"total_amount_without_tax_formatted":{"type":"string"}}},"benefits":{"type":"array","items":{"type":"object","properties":{"benefit_content_id":{"type":"string"},"description":{"type":"string"},"limit":{"type":"number"},"limit_formatted":{"type":"string"},"excess":{"type":"number"},"excess_formatted":{"type":"string"}}}},"commission":{"type":"object","properties":{"partner_commission":{"type":"number"},"total_commission":{"type":"number"},"partner_commission_formatted":{"type":"string"},"total_commission_formatted":{"type":"string"}}},"created_at":{"type":"string","format":"date-time"},"confirmed_at":{"type":"string","format":"date-time"},"pds_url":{"type":"string","format":"uri"},"can_be_cancelled":{"type":"boolean"}}}},"coi":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"pdf":{"type":"string","format":"uri"}}},"policyholder":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string","format":"email"},"country":{"type":"string"}}},"total_tax":{"type":"number"},"total_tax_formatted":{"type":"string"},"total_premium":{"type":"number"},"total_premium_formatted":{"type":"string"},"fnol_link":{"type":"string","format":"uri"}}}}}},"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"}}}}}},"409":{"description":"Conflict - Duplicate Request (Idempotent)","content":{"application/json":{"schema":{"type":"object","description":"Returns the cached response from the original successful request. This response can be handled identically to a 200 OK response."}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}}}}}}},"423":{"description":"Locked - Request In Progress","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}
```


---

# Agent Instructions: 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:

```
GET https://partner-docs.covergenius.com/offers/vertical-examples/travel-accomodation/confirm-offer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
