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

Requests & Responses

Example payloads for requests to and responses from XCE

Offer Request

The below is an example quote request to send to the XCE widget during initialization.

{
  "schema": "demo-partner-travel:v1",
  "customer": {
    "currency": "EUR",
    "language": "en",
    "country": "NL"
  },
  "context": {
    "departure_country": "GB",
    "destination_country": "GB",
    "reservation_number": "aaca2167-3d55-4d12-a58d-cecf2657a7f4",
    "total_tickets_price": 265,
    "number_of_adults": 1,
    "number_of_children": 0,
    "number_of_infants": 0,
    "trip_start_date": "2025-11-08T09:25:00+11:00",
    "trip_end_date": "2025-11-17T15:45:00+11:00",
    "trips": [
      {
        "legs": [
          {
            "departure_datetime": "2025-11-08T09:25:00+11:00",
            "arrival_datetime": "2025-11-08T11:30:00+11:00",
            "trip_number": "ABC123",
            "departure_location": "Machester Piccadilly",
            "arrival_location": "London Kings Cross",
            "departure_country": "GB",
            "arrival_country": "GB",
            "departure_city": "Machester",
            "arrival_city": "London",
            "transport_mode": "train"
          }
        ]
      },
      {
        "legs": [
          {
            "departure_datetime": "2025-11-08T09:25:00+11:00",
            "arrival_datetime": "2025-11-08T11:30:00+11:00",
            "trip_number": "DEF456",
            "departure_location": "London Kings Cross",
            "arrival_location": "Piccadilly",
            "departure_country": "GB",
            "arrival_country": "GB",
            "departure_city": "London",
            "arrival_city": "Machester",
            "transport_mode": "train"
          }
        ]
      }
    ]
  }
}

Offer Response

The below is an example response provided by XCE during the onSet function once an offer was successfully generated for a customer. This data is required to be stored for later consumption in the confirm offer request.

Finance and Benefits Response Fields

By default, the offer response includes these fields at the product level with null values:

  • tax — tax amount for the product

  • surcharge — surcharge amount

  • commission — commission amount

  • benefits — policy benefit details

The response contract is stable — these fields are always present. However, tax, surcharge, and commission will return null until your element is configured by your Client Solution Engineer (CSE) to request them. Once set up, the XCover engine populates them with their actual values. No changes are required on your side.

To enable extra response fields, reach out to your CSE.

Last updated

Was this helpful?