curl "$UNIFYSTAYS_BASE_URL/hotels/book/ubk_eGQ0dW9uV1Vi" \
-H "x-api-key: $UNIFYSTAYS_API_KEY" \
-H "language: en"
{
"contract_version": "1",
"success": true,
"message": "Booking request accepted and is being processed.",
"data": {
"booking_id": "ubk_eGQ0dW9uV1Vi",
"accepted_offer_id": "off_01J...",
"status": "PROCESSING",
"is_terminal": false,
"provider": {
"code": "TBO",
"booking_id": "100055869",
"booking_code": "REZ6A5A81E9",
"hotel_confirmation_number": "HCN-482910",
"hotel_confirmation_status": "Confirmed",
"hotel_confirmation_note": {},
"hotel_contact_phone": {},
"hotel_contact_name": {}
},
"next_poll_after_ms": 5000,
"processing_reason": "SUPPLIER_CONFIRMATION_PENDING",
"action_required": true,
"available_actions": [
"GET_STATUS"
],
"hold_deadline_at": "<string>",
"created_at": "2026-04-15T12:12:11.000Z",
"updated_at": "2026-04-15T12:12:11.000Z",
"review_expires_at": "<string>"
}
}Bookings
Get Booking Status
Retrieve the current lightweight unified status for one booking.
GET
/
hotels
/
book
/
{booking_id}
curl "$UNIFYSTAYS_BASE_URL/hotels/book/ubk_eGQ0dW9uV1Vi" \
-H "x-api-key: $UNIFYSTAYS_API_KEY" \
-H "language: en"
{
"contract_version": "1",
"success": true,
"message": "Booking request accepted and is being processed.",
"data": {
"booking_id": "ubk_eGQ0dW9uV1Vi",
"accepted_offer_id": "off_01J...",
"status": "PROCESSING",
"is_terminal": false,
"provider": {
"code": "TBO",
"booking_id": "100055869",
"booking_code": "REZ6A5A81E9",
"hotel_confirmation_number": "HCN-482910",
"hotel_confirmation_status": "Confirmed",
"hotel_confirmation_note": {},
"hotel_contact_phone": {},
"hotel_contact_name": {}
},
"next_poll_after_ms": 5000,
"processing_reason": "SUPPLIER_CONFIRMATION_PENDING",
"action_required": true,
"available_actions": [
"GET_STATUS"
],
"hold_deadline_at": "<string>",
"created_at": "2026-04-15T12:12:11.000Z",
"updated_at": "2026-04-15T12:12:11.000Z",
"review_expires_at": "<string>"
}
}Use this endpoint to poll a booking after
Create Booking or
Cancel Booking. It returns the current
unified state without retrieving the full itinerary payload.
After a cancellation request,
Request Example
curl "$UNIFYSTAYS_BASE_URL/hotels/book/ubk_eGQ0dW9uV1Vi" \
-H "x-api-key: $UNIFYSTAYS_API_KEY" \
-H "language: en"
Polling Guidance
1
Save the booking ID
Store
data.booking_id from the booking creation response.2
Read the current state
Display
data.status to the customer or support user.3
Stop when final
Use
data.is_terminal to decide when the operation is complete.4
Load the itinerary when needed
Use Get Booking Details for confirmed
itineraries, support views, and reconciliation.
CANCELLATION_PENDING means the supplier is
still processing it. Continue polling until the status becomes CANCELLED or
the response indicates a final state.
The OpenAPI section below contains the status response and error contract.Authorizations
Environment-specific API key created in the Unifystays portal
Headers
Hotel API contract version. Missing defaults to v1.
Available options:
1 Path Parameters
Example:
"ubk_eGQ0dW9uV1Vi"