How to use the AddBooking function to initiate new bookings through the Partner-API.
Overview
The Add Booking function allows you to create and add new Bookings using the Partner-API. This guide provides detailed instructions on the required parameters and values to successfully generate bookings for available units within your Inventory. With this feature, you can seamlessly integrate booking functionality into your application.
Endpoints Available
Method
Endpoint
Description
POST
v2023.07.31/booking
Use this endpoint to create a booking
Body Parameters
Parameter
Required / Optional
Description
Data Type
"inventory_id"
Required
Unique Identifier for Unit in Inventory
int
"organization_id"
Optional
The unique identifier for the Supplier associated with the booking
int
"type"
Required
Indicates the type of booking, such as "CONFIRMED"
An object containing financial details related to the booking
array
"total_amount"
The total amount of the booking, including all charges
long
"amount_decimal_places"
The number of decimal places in the "total_amount" value
int
"thread_id"
Id identifying relevant message thread for channel
string
"details" Object Body Parameters
Parameter
Required / Optional
Description
Data Type
"arrival"
Required
The arrival date for the booking
date-time
"departure"
Required
The departure date for the booking
date-time
"origination_date"
The origination date of the booking
date-time
"number_of_adults"
Required
The number of adults included in the booking
int
"number_of_children"
Required
The number of children included in the booking
int
"number_of_pets"
Required
The number of pets included in the booking
int
"party_members"
An array containing details about additional Party Members
array
"party_members" Object Body Parameters
Parameter
Required / Optional
Description
Data Type
"first_name"
First name of a party member
string
"last_name"
Last name of a party member
string
"age"
Age of a party member
int
"comments" Object Body Parameters
Parameter
Required / Optional
Description
Data Type
"text"
The text of the comment
string
"type"
Type of comment, e.g., "PRIVATE"
string
"customer_details" Object Body Parameters
Parameter
Required / Optional
Description
Data Type
"customer_type"
Required
Type of customer, "LEAD_GUEST"
string
"first_name"
Required
The first name of the lead guest
string
"last_name"
Required
The last name of the lead guest
string
"age"
Required
The age of the lead guest
int
"phone_numbers"
Required
The phone number(s) of the lead guest
array
"email_addresses"
Required
The email address(es) of the lead guest
array
"notes"
Optional
Additional notes to add against the Lead Guest
string
"allow_marketing_emails"
Optional
Indicates whether the Lead Guest allows marketing emails
boolean
"airbnb_guest_id"
Optional
Unique identifier for an Airbnb guest
string
"financials" Object Body Parameters
Parameter
Required / Optional
Description
Data Type
"item"
The name of the charge item
string
"id"
The unique identifier for the charge item
string
"code"
The code associated with the charge item
string
"applies_to_id"
The identifier specifying the charge item it applies to
string
"quantity"
The quantity of the charge item
int
"type"
The type of the charge item which can be "RENTAL" for rental rate, "CLEAN_FEE" for cleaning fee, "TAX_ONE" for tax one, "TAX_TWO" for tax two, or "EXTRA" for additional fees
string
"amount"
The amount of the charge item
long
"amount_decimal_places"
The number of decimal places for the "amount"
int
Response Definition
Response Item
Description
Data Type
"booking_id"
Unique identifier for the reservation
int
"inventory_id"
Unique identifier for the unit associated with the reservation
int
"type"
Status of the reservation (e.g., CONFIRMED)
string
"source"
Denotes the source of the booking, like "TestSource"
string
"source_id"
An identifier associated with the source (e.g., "CiiRUSTeST")
string
"ip_address"
The IP address from which the booking request originated