The booking list api call main purpose is to look for and retrieve a list of bookings that were done by the client. This operation is used by some clients to allow a search of bookings for their customers.
When performing the booking list the response will not include all the information that usually is returned in a booking detail response api call but a summary of it. Nevertheless you can always do a booking detail to obtain all information including vouchers.
Specifications :
GET https://api.test.hotelbeds.com/activity-api/3.0/bookings/{{language}}?start= {{starting_date}} &end= {{end_date}} &includedCancelled= {{cancelled} &filterType= {{filter_type}} &itemsPerPage= {{itemsPerPage}} &page= {{page}}
The booking list api call is a GET operation.
The following is the operation spec:
PARAMETERS |
|||
NODE/ATTRIBUTE |
TYPE |
MANDATORY |
DESCRIPTION |
language |
String |
Yes |
Language code of the request. |
filterType |
String |
Yes |
Filter type. Possible values are:
|
start |
String |
Yes |
Date from. |
end |
String |
Yes |
Date to. |
holder | String | No | Is the relevant holder for the booking. If informed it will search all of those bookings that are linked to the holder. |
includedCancelled |
boolean |
Yes |
True if the cancelled bookings should be included in the search results. |
itemsPerPage |
Integer |
No |
Number of items per page. Default value: 10 |
page |
Integer |
No |
Number of page. Default value: 1 |
The booking list response contains a list of Booking structures. A Booking structure full specification can be found at the booking detail response api Call.
Doing the same approach to implement both objects is highly recommended. When received through the booking list api call, the booking objects contain less information.
The following is the list of attributes returned and the operation spec:
NODE/ATTRIBUTE |
TYPE |
DESCRIPTION |
@operationId |
String |
Factsheet Operational ID, informative only. |
errors |
List<Error> |
Contains a list of errors (error code and error description) |
errors/@code |
String |
Error code |
errors/@text |
String |
Error description |
errors/@internalDescription |
String |
Internal error description |
auditData |
Element |
This element contains internal information. You can provide it in the event of needing specific support. |
Bookings |
List<Booking> |
Bookings list |
bookings/@creationDate |
Date |
Booking creation date. The date format is: "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" |
bookings/@creationUser |
Date |
API Key used to create the booking. |
bookings/@reference |
String |
Booking reference number as it was provided in the confirmation response. |
bookings/@status |
String |
Booking status
|
Bookings/@clientReference |
String |
Client reference code provided in the confirmation request |
bookings/@currency |
String |
Price currency code. See Contents api for details on the different currency codes. |
bookings/Holder |
BookingHolder |
Booking holder information element |
bookings /holder/@name |
String |
Booking holder name |
bookings /holder/@surname |
String |
Booking holder surname |
bookings /holder/@title |
String |
Booking holder title (Mr, Ms, Miss) |
bookings /holder/@email |
String |
Booking holder email |
bookings /holder/@address |
String |
Booking holder address |
bookings /holder/@zipCode |
String |
Booking holder zip code |
bookings /holder/@mailing |
Boolean |
true if the holder has agreed to receive communications via e-mail. |
bookings /holder/@country |
String |
Country name |
bookings /holder/@telephones |
List |
Booking holder telephones list |
bookings/@total |
Double |
Booking total amount |
bookings/pagination | Element | Pagination of the results. Indicates the values for pagination |
bookings/pagination/@itemsPerPage | Integer | Number of items per page |
bookings/pagination/@page | Integer | Number of pages |
bookings/pagination/@totalItems | Integer | Total items to be returned in the search including the ones in the current page. |
bookings/activities |
|
List of activities in the booking. |
bookings/activities/@type |
String |
Activity type. It can be:
|
bookings/activities/@currency | String | is the relevant currency in which the excursion was sold. |
bookings/activities/@status | String |
Is the relevant status of a particular booking. These could be:
|
bookings/activities/modality |
Modality |
Selected modality information including rate, session and language. |
bookings/activities/modality/@code |
String |
Modality code |
bookings/activities/modality/@name |
String |
Modality name. It will be provided in the same language as the request indicated |
bookings/activities/@code |
String |
Activity code. Same code as it was provided in the detail or search api calls. |
bookings/activities/@name |
String |
Activity name. It will be provided in the same language as the request indicated |
bookings/activities/@dateFrom |
Date |
Date from. If the duration is 1 day, then dateFrom is the same as dateTo. |
bookings/activities/@dateTo |
Date |
Date to. If the duration is 1 day, then dateFrom is the same as dateTo. |