How to Book an Activity
After confirming availability and selecting a product option, use the booking endpoint to create a reservation. This endpoint requires traveler information, booking question answers, and payment details.
Endpoint
POST {{api_host}}/api/ext/activity/booking
Headers
| Header | Required | Description |
|---|
x-api-key | Yes | Your Xeni API key |
Content-Type | Yes | application/json |
Request Body
| Parameter | Type | Required | Description |
|---|
productCode | string | Yes | The activity product code. |
bookingId | string | Yes | Your own unique tracking ID for this booking. |
travelDate | string | Yes | Travel date in YYYY-MM-DD format. |
startTime | string | Conditional | Required if the activity has specific time slots. Format: HH:MM. |
productOptionCode | string | Yes | The product option code from the availability response (e.g., "TG1"). |
paxMix | array | Yes | Traveler groups by age band (same format as availability request). |
bookerInfo | object | Yes | Name of the person making the booking. |
communication | object | Yes | Contact information for the booking. |
bookedCurrency | string | Yes | Currency code for the booking (e.g., "USD"). |
amount | number | Yes | Total booking amount in the specified currency. |
bookingQuestionAnswers | array | No | Answers to required booking questions. |
languageGuide | object | No | Language and guide preference for the activity. |
Booker Info Object
| Parameter | Type | Required | Description |
|---|
firstName | string | Yes | Booker's first name. |
lastName | string | Yes | Booker's last name. |
Communication Object
| Parameter | Type | Required | Description |
|---|
email | string | Yes | Contact email address. |
phone | string | Yes | Contact phone number. |
Booking Question Answers
The bookingQuestionAnswers array allows you to provide answers to questions required by the activity provider. Each answer object has the following fields:
| Parameter | Type | Required | Description |
|---|
question | string | Yes | The question identifier. |
answer | string | Yes | The answer value. |
unit | string | No | The unit type for the answer (e.g., "LOCATION_REFERENCE" for pickup points). |
travelerNum | integer | No | The traveler number this answer applies to (1-indexed). |
Common Question Types
| Question | Description |
|---|
PICKUPPOINT | Pickup location for hotel pickup activities. Use unit: "LOCATIONREFERENCE" with the location reference as the answer. |
AGEBAND | Age band of the traveler (e.g., "ADULT"). |
FULLNAMESFIRST | First name of a specific traveler. |
FULLNAMESLAST | Last name of a specific traveler. |
Language Guide Object
| Parameter | Type | Required | Description |
|---|
language | string | Yes | Language code (e.g., "en"). |
legacyGuide | string | Yes | Legacy guide identifier (e.g., "en/SERVICE_GUIDE"). |
type | string | Yes | Guide type (e.g., "GUIDE"). |
Example Request
JSON
{
"productCode": "12345ABC",
"bookingId": "MY-BOOKING-001",
"travelDate": "2026-04-15",
"startTime": "09:00",
"productOptionCode": "TG1",
"paxMix": [
{
"ageBand": "ADULT",
"numberOfTravelers": 2
}
],
"bookerInfo": {
"firstName": "Jane",
"lastName": "Smith"
},
"communication": {
"email": "jane.smith@example.com",
"phone": "+1-555-123-4567"
},
"bookedCurrency": "USD",
"amount": 450,
"bookingQuestionAnswers": [
{
"question": "PICKUP_POINT",
"answer": "LOC-12345",
"unit": "LOCATION_REFERENCE"
},
{
"question": "FULLNAMESFIRST",
"answer": "Jane",
"travelerNum": 1
},
{
"question": "FULLNAMESLAST",
"answer": "Smith",
"travelerNum": 1
},
{
"question": "FULLNAMESFIRST",
"answer": "John",
"travelerNum": 2
},
{
"question": "FULLNAMESLAST",
"answer": "Smith",
"travelerNum": 2
}
],
"languageGuide": {
"language": "en",
"legacyGuide": "en/SERVICE_GUIDE",
"type": "GUIDE"
}
}
Usage Notes
- The
bookingId is your own unique identifier for tracking this booking in your system. It must be unique across all your bookings. - The
startTime field is only required when the availability response includes multiple time slots. If the activity does not have specific start times, you can omit this field. - The
amount must match the pricing returned by the availability endpoint. Mismatched amounts will cause the booking to fail. - The
bookingQuestionAnswers vary by activity. Some activities require pickup points, traveler names, or age bands. The specific questions required are determined by the activity provider. - If the activity includes hotel pickup (
isPickupIncluded: true from the availability response), you will typically need to provide a PICKUP_POINT answer with a location reference.
Next Steps
After creating a booking, you can retrieve its details at any time. See How to Retrieve Activity Booking Details.