Bookings
API methods to work with bookings
At BookDirect.com we have several different methods to work with Bookings, such as List of Bookings, Booking Revision Feed and etc.
Each Booking at BookDirect.com is representation of latest known Booking Revision, where Booking Revision is parsed and normalised message from the IBE.
If you would like build PMS integration, you should use Booking Revision Feed API, to fetch booking messages and modify bookings at your side. For initial pull, you can use Booking List API or Booking Revision Feed.
Message Structures
Booking Revision
id Unique Booking Revision identification record at BookDirect.com internal system
unique_id Unique Booking identification record combined from IBE Code and IBE Reservation Code. Usually this value is same for all booking revisions.
system_id Unique message identification record at Booking Source platform, unique per revision. Used to detect have we that message or not.
ibe_reservation_code Original Reservation Code at platform, where guest create booking. Usually same for all booking revisions. Unique per booking message.
ibe_name Name of IBE where booking was originally created
status
Status of Booking Revision, can be one of three values: new, modified, cancelled.
rooms List of Booking Room objects.
services List of Booking Service objects.
guarantee Guarantee details object. Represent credit card provided with booking.
customer Object with information about Customer.
occupancy
Object with information about total Booking Occupancy, provide three keys: adults, children and infants.
arrival_date
Arrival Date represented as string with date in ISO 8601 format by mask YYYY-MM-DD.
departure_date
Departure Date represented as string with date in ISO 8601 format by mask YYYY-MM-DD.
arrival_hour
Arrival Time represented as string with time in HH:MM format at 24h.
amount Total booking amount.
currency Booking currency code.
notes Customer notes for booking.
inserted_at Timestamp, when Booking Revision was received at BookDirect.com
Booking Room
checkin_date
Checkin Date represented as string with date in ISO 8601 format by mask YYYY-MM-DD.
checkout_date
Checkout Date represented as string with date in ISO 8601 format by mask YYYY-MM-DD.
rate_plan_id Associated Rate Plan identification record. Null if Booking Room is not mapped.
room_type_id Associated Room Type identification record. Null if Booking Room is not mapped.
occupancy
Object with information about Booking Room Occupancy, provide three keys: adults, children and infants.
amount Total Booking Room amount
Booking Service
name String value with service name in English language
nights Integer value represents number of nights this customer has booked the service for.
persons Integer number represents number of persons this service is booked for
price_mode String value with Price mode value (per stay, per night, per person per night).
price_per_unit Numeric value represented as String with unitary price for this service
total_price Numeric value represented as String with total calculated price for this service.
Bookings List
Retrieve list of Bookings associated with User Channels.
Request:
Success Response Example
Status Code: 200 OK
Unauthorised Error Response
Status Code: 401 Unauthorized
Returns
Success
Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a list of Booking objects in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.
Get Booking By ID
Retrieve specific Booking by ID.
Request:
Success Response Example
Status Code: 200 OK
Unauthorised Error Response
Status Code: 401 Unauthorized
Not Found Error
Status Code: 404 Not Found
Returns
Success
Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Booking object in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.
Not Found Error
Method can return a Not Found Error result with 404 Not Found HTTP Code if Booking with provided ID is not present at system.
Booking Revisions List
Retrieve list of Booking Revisions associated with User Channels.
Request:
Success Response Example
Status Code: 200 OK
Unauthorised Error Response
Status Code: 401 Unauthorized
Returns
Success
Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a list of Booking Revision objects in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.
Booking Revisions Feed
Retrieve list of not Acknowledged Booking Revisions associated with User Channels.
Request:
Success Response Example
Status Code: 200 OK
Unauthorised Error Response
Status Code: 401 Unauthorized
Note
If all Booking Revision is acknowledged this request return empty result.
Returns
Success
Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a list of Booking Revision objects in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.
Get Booking Revision by ID
Retrieve specific Booking Revision by ID.
Request:
Success Response Example
Status Code: 200 OK
Unauthorised Error Response
Status Code: 401 Unauthorized
Not Found Error
Status Code: 404 Not Found
Returns
Success
Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Booking Revision object in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.
Not Found Error
Method can return a Not Found Error result with 404 Not Found HTTP Code if Booking Revision with provided ID is not present at system.
Acknowledge Booking Revision receiving
Confirm receiving Booking Revision by creating Acknowledge record.
Request:
Success Response Example
Status Code: 200 OK
Unauthorised Error Response
Status Code: 401 Unauthorized
Not Found Error
Status Code: 404 Not Found
Returns
Success
Method can return a Success result with 200 OK HTTP Code if operation is successful.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.
Not Found Error
Method can return a Not Found Error result with 404 Not Found HTTP Code if Booking Revision with provided ID is not present at system.
Create Booking
API to push Booking into BookDirect.com.
NOTE: Before create booking through API, you should create Booking Engine Channel at Channel Management screen of application. Then use created Channel ID as channel_id at new booking message.
Request:
Query body (JSON):
Success Response Example
Status Code: 200 OK
Unauthorised Error Response
Status Code: 401 Unauthorized
Not Found Error
Status Code: 404 Not Found
Returns
Success
Method can return a Success result with 200 OK HTTP Code if operation is successful. Body will contain created booking.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.
Not Found Error
Method can return a Not Found Error result with 404 Not Found HTTP Code if Booking Revision with provided ID is not present at system.
Last updated
Was this helpful?