Take bookings
Bookings go through the same pricing, tax, availability, confirmation, invoicing, and notification rules as bookings made in Agantia. You choose the products, dates, and party. Agantia always calculates the price.
You need bookings:create. Reading bookings needs bookings:read, cancelling needs bookings:cancel, and travellers need travellers:read and travellers:write.
Sandbox is read-only for now, so booking requests return 503 there. See Sandbox.
1. Find pax types and a date
curl https://api.staging.agantia.com/api/public/v1/products/156/pax-types -H "Authorization: Bearer $TOKEN"
# [{ "id": 5, "name": "Adult", "min_age": 12 }, { "id": 6, "name": "Child", "min_age": 2, "max_age": 11 }, ...]
curl "https://api.staging.agantia.com/api/public/v1/products/156/availability?from=2026-12-15&to=2026-12-21" -H "Authorization: Bearer $TOKEN"
2. Price the basket
curl -X POST https://api.staging.agantia.com/api/public/v1/quotes \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{
"items": [
{ "product_id": 156, "date": "2026-12-20", "pax": [ { "pax_type_id": 5, "quantity": 2 }, { "pax_type_id": 6, "quantity": 1 } ] }
]
}'
{
"data": {
"subtotal": { "amount": "700.00", "currency": "AED" },
"discount": { "amount": "0.00", "currency": "AED" },
"tax": { "amount": "35.00", "currency": "AED" },
"tax_name": "VAT",
"total": { "amount": "735.00", "currency": "AED" },
"lines": [ { "product_id": 156, "total": { "amount": "700.00", "currency": "AED" } } ]
}
}
A quote is not a reservation. The booking is priced again when you create it.
3. Create the booking
Send an Idempotency-Key header with a value unique to this booking attempt, such as your own order ID. If the request times out, send it again with the same key and body: you get the same booking back instead of a second one. See Idempotency.
curl -X POST https://api.staging.agantia.com/api/public/v1/bookings \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: order-10482" \
-d '{
"items": [
{
"product_id": 156,
"date": "2026-12-20",
"service_mode": "sharing",
"pax": [ { "pax_type_id": 5, "quantity": 2 }, { "pax_type_id": 6, "quantity": 1 } ],
"pickup": { "hotel_name": "Atlantis The Palm", "room_number": "1204" },
"special_requests": "Vegetarian meals"
}
],
"lead_guest": { "first_name": "Aisha", "last_name": "Khan", "email": "aisha@example.com", "phone": { "country_code": "+971", "number": "501234567" } },
"payment_method": "pay_later"
}'
The response is 201 Created with the booking, including its reference, status, total, and items.
Payment
payment_method | Result |
|---|---|
pay_later (default) | The booking is confirmed and the payment is due to the merchant, who collects it as they normally do. |
credit | Agent apps only, with the bookings:pay_with_credit permission. Charges the agent's credit account. See Agent integration. |
Card payment through the API is not available yet.
Why a booking can be refused
| Status | type | Reason |
|---|---|---|
| 422 | product-unavailable | The product is not visible to the app, is closed for booking, or is not available on the date. |
| 422 | invalid-booking | The items are not valid, for example a pax type the product does not allow. detail says why. |
| 400 | invalid-request | The body is not valid. errors lists each field. |
| 403 | insufficient-scope | For example, credit without bookings:pay_with_credit. |
4. Add travellers
Each booking item has its own travellers. Exactly one traveller per item is the lead. Saving replaces all travellers on the item.
curl -X PUT https://api.staging.agantia.com/api/public/v1/bookings/43326/items/43253/travellers \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{
"travellers": [
{ "is_lead": true, "pax_type_id": 5, "first_name": "Aisha", "last_name": "Khan", "email": "aisha@example.com" },
{ "is_lead": false, "pax_type_id": 5, "first_name": "Omar", "last_name": "Khan" },
{ "is_lead": false, "pax_type_id": 6, "first_name": "Sara", "last_name": "Khan", "age": 8 }
]
}'
Other travellers are linked to the lead. Send relationship_type_id if you know the relationship. Otherwise the merchant can fill it in.
5. Read, update, and cancel
GET /bookingsandGET /bookings/{id}return the bookings this app made. Filter withfilter[status],filter[created_from], andfilter[created_to].PATCH /bookings/{id}changesspecial_requests. Items, dates, and party size cannot be changed through the API; cancel and book again, or ask the merchant.POST /bookings/{id}/cancelcancels the booking and notifies the guest. It needs anIdempotency-Key. Products that cannot be cancelled online return409 not-cancellable. Refunds are handled by the merchant.
Which bookings you can see
- Merchant apps see only the bookings they created.
- Agent apps see the agent's bookings. See Agent integration.
- A booking you cannot see returns
404.