BookingQuery
The BookingQuery operation allows you to retrieve booking details. You can only query by Booking ID. Simply provide the Booking ID in your request, and the operation will return the corresponding booking information.
BookingQuery Request Syntax
Request Header
POST /BookingQuery
Content-Type: “application/json”
AuthApiKey: <Your API Key>
Accept-Encoding: “gzip,br”
Request Body Schema
| Field Name | Data Type | Description |
|---|---|---|
|
BookingId |
Integer |
If the booking Id is matched, then just the matching booking is returned. |
Response Body Schema
| Field Name | Data Type | Description |
|---|---|---|
|
Currency |
String |
The currency code for prices (e.g., “EUR”). All rates will be displayed in the default currency associated with your Stuba account |
|
Bookings |
Array of Object |
List of bookings. |
|
Id |
String |
Unique identifier for the booking. |
|
Creationdate |
Date |
Date when the booking was created. (YYYY-MM-DD) |
|
Agentreference |
String |
Reference code provided by the agent. |
|
Hotelbooking
|
Array of Object |
List of hotel bookings included in this booking. |
|
Id |
Integer |
Unique identifier for the hotel booking. |
|
HotelId |
Integer |
Unique identifier for the hotel. |
|
Creationdate |
Date |
Date when the hotel booking was created. (YYYY-MM-DD) |
|
ArrivalDate |
Date |
Date of arrival at the hotel. (YYYY-MM-DD) |
|
Nights |
Integer |
Number of nights booked. |
|
TotalPrice |
Float |
Total price for the hotel booking. |
|
Status |
String |
Status of the hotel booking (e.g., “confirmed”). |
|
Room |
Array of Object |
List of rooms in the hotel booking. |
|
Price |
Float |
Price for this room. |
|
Adult |
Array of Object |
List of adult guests for this room. |
|
Id |
Integer |
Unique identifier for the adult guest. |
|
Title |
String |
Title of the adult guest (e.g., “Mr”, “Mrs”). |
|
First |
String |
First name of the adult guest. |
|
Last |
String |
Last name of the adult guest. |
|
Messages |
Array of Object |
List of messages or notes associated with this room. |
|
Type |
String |
Type of message (e.g., “General”, “Internal Note”). |
|
Text |
String |
Message text or note content. |
|
Status |
String |
Status of the room (e.g., “confirmed”). |
|
CanxFees |
Array of Object |
List of cancellation fees for the room. |
|
Startdate |
Date |
Date from which the cancellation fee applies. (YYYY-MM-DD) |
|
Amount |
Float |
Amount of the cancellation fee. |
|
Cancellationpolicystatus |
String |
Status of cancellation policy (e.g., “Refundable”, “Nonrefundable”, “Unknown”). |
HAPI Response Samples
Samples