Execute Booking
B2A API
Execute Booking
Create a booking with automatic voucher delivery
POST
Execute Booking
Execute Booking
This endpoint creates a real booking and sends a voucher email within 30 seconds. 99% success rate with live inventory sync.
Use This Endpoint When
User confirms selection
- “Book this one”
- “Reserve for tomorrow”
- “I want the spa package”
After recommendation
- User selected from
/recommendresults - User chose from
/inventorylistings
Request
Activity ID from
/recommend or /inventory responseEmail address for voucher delivery
Guest name for the voucher
ISO 8601 date format (e.g.,
2025-12-15)Number of adults (1-20)
Number of children
Recommended: Pass the
log_id from /recommend response for conversion tracking and feedback loopAny special requests or notes
Optional URL to receive booking status callbacks
Response
Whether the booking was created successfully
Examples
Basic Booking
Family Booking with Children
With Webhook Callback
Response Example
Booking Flow
Ground Truth Feedback Loop
Why pass
context_log_id?When a user visits the venue and scans their QR code, we connect:- The original recommendation context
- Which activity was booked
- Whether they actually visited
Webhook Events
If you provide awebhook_url, you’ll receive callbacks for:
| Event | Description |
|---|---|
booking_confirmed | Booking successfully created |
voucher_delivered | Email sent to user |
qr_verified | User visited venue (Ground Truth) |
booking_cancelled | Booking was cancelled |
Error Responses
| Code | Description |
|---|---|
ACTIVITY_NOT_FOUND | Activity ID doesn’t exist |
ACTIVITY_UNAVAILABLE | Activity not available on requested date |
INVALID_DATE | Booking date is in the past or too far ahead |
INVENTORY_EXHAUSTED | No more slots available |
INVALID_EMAIL | Email format is invalid |
BOOKING_LIMIT_EXCEEDED | Maximum guests per booking exceeded |
Error Response Example
Best Practices
Always pass context_log_id
Always pass context_log_id
This enables the Ground Truth feedback loop, improving recommendations over time.
Handle webhook callbacks
Handle webhook callbacks
Use webhooks to update your UI in real-time when voucher is delivered or QR is scanned.
Validate dates client-side
Validate dates client-side
Check that booking_date is not in the past and is within the activity’s operating days.
Confirm with user before booking
Confirm with user before booking
Bookings are real and charged. Always confirm details with the user before calling this endpoint.
Next Steps
Check Inventory
View real-time availability before booking
Webhooks
Set up webhook callbacks for booking events