Modify Booking
How to use the Modify Booking function to update and manage bookings through the Partner-API.
Overview
The Modify Booking function allows you to make changes to existing bookings using the Partner-API. This guide outlines the necessary parameters and instructions to modify bookings within your application.
Endpoints Available
| Method | Endpoint | Description |
|---|---|---|
| PUT | v2023.07.31/booking | Use this endpoint to modify a booking |
Body Parameters
| Parameter | Required / Optional | Description | Data Type |
|---|---|---|---|
"booking_id" | Required | The unique identifier for the booking to modify | int |
"inventory_id" | Unique Identifier for Unit in Inventory | int | |
"organization_id" | The unique identifier for the Supplier associated with the booking | int | |
"type" | Indicates the type of booking, such as "CONFIRMED" | string | |
"source" | Specifies the source of the booking | string | |
"source_id" | An identifier representing the booking source | string | |
"details" | An object containing specific details related to the booking | object | |
"comments" | An object containing comments related to the booking | array | |
"customer_details" | An object containing customer-related details | object | |
"financials" | 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
"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" | Required | 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" | Required | An array containing details about additional Party Members | array |
"party_members" Object Body Parameters
"party_members" Object Body Parameters| Parameter | Required / Optional | Description | Data Type |
|---|---|---|---|
"first_name" | Required | First name of a party member | string |
"last_name" | Required | Last name of a party member | string |
"age" | Required | Age of a party member | int |
"comments" Object Body Parameters
"comments" Object Body Parameters| Parameter | Required / Optional | Description | Data Type |
|---|---|---|---|
"text" | Optional | The text of the comment | string |
"type" | Optional | Type of comment, e.g., "PRIVATE" | string |
"customer_details" Object Body Parameters
"customer_details" Object Body Parameters| Parameter | Required / Optional | Description | Data Type |
|---|---|---|---|
"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
"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 | string |
"source_id" | An identifier associated with the source | string |
"ip_address" | The IP address from which the booking request originated | string |
"customer_details" | An object containing details about the lead guest (main guest) for the reservation | object |
"comments" | An object containing comments related to the booking | object |
"details" | An object containing details about the associated reservation | object |
"financials" | An object containing financial details related to the reservation | object |
"merchant_of_record" | Identifies the merchant of record | string |
"commission_amount" | The commission amount associated with the reservation | long |
"total_amount" | The total amount of the reservation | long |
"amount_decimal_places" | The number of decimal places for the "commission_amount" and "total_amount" | int |
"payment_schedule" | An object containing payment schedule details | object |
"thread_id" | Id identifying relevant message thread for channel | string |
"customer_details" Object
"customer_details" Object| Response Item | Description | Data Type |
|---|---|---|
"id" | Unique identifier for the customer | int |
"type" | Guest type, like "LEAD_GUEST" | string |
"first_name" | The first name of the lead guest | string |
"last_name" | The last name of the lead guest | string |
"phone_numbers" | The phone number(s) of the lead guest | array |
"email_addresses" | The email address(es) of the lead guest | array |
"allow_marketing_emails" | Indicates whether the Lead Guest allows marketing emails | boolean |
"comments" Object
"comments" Object| Response Item | Description | Data Type |
|---|---|---|
"text" | The text of the comment | string |
"type" | Comment type, e.g., "PRIVATE" | string |
"details" Object
"details" Object| Response Item | Description | Data Type |
|---|---|---|
"arrival" | Date and time of the guest's arrival | string |
"departure" | Date and time of the guest's departure | string |
"number_of_adults" | Number of adults in the reservation | int |
"number_of_children" | Number of children in the reservation | int |
"number_of_pets" | Number of pets in the reservation | int |
"party_members" | An array containing details about additional Party Members | array |
"party_members" Object
"party_members" Object| Response Item | 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 |
"financials" Object
"financials" Object| Response Item | Description | Data Type |
|---|---|---|
"charges" | An array containing different charges related to the reservation | array |
"charges" Object
"charges" Object| Response Item | 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 | string |
"amount" | The amount of the charge item | long |
"amount_decimal_places" | The number of decimal places for the | int |
"payment_schedule" Object
"payment_schedule" Object| Response Item | Description | Data Type |
|---|---|---|
"amount_due" | The amount due for payment | long |
"rate_decimal_places" | Number of decimal places for the "amount_due" | int |
"due_date" | Due date for the payment | string |
Sample Request
curl --location --request PUT 'https://api.ciiruspartners.com/v2023.07.31/booking' \
--header 'Content-Type: application/json' \
--data '{
"details": {
"number_of_adults": 2,
"number_of_children": 0,
"number_of_pets": 0,
"arrival": "2024-01-08T16:00:00",
"departure": "2024-01-09T10:00:00",
"origination_date": "2023-10-26T13:06:15.97",
"party_members": [
{
"first_name": "party",
"last_name": "member",
"age": 21
}
]
},
"customer_details": {
"type": "LEAD_GUEST",
"first_name": "KMTest",
"last_name": "Guest Adult 1",
"age": 27
},
"booking_id": 38644296,
"inventory_id": 219264
}'Sample Response
{
"booking_id": 38644032,
"inventory_id": 219264,
"organization_id": 45692,
"type": "CONFIRMED",
"source": "jalapeno",
"source_id": "jalapeno",
"ip_address": "9.8.8.1",
"customer_details": {
"id": 6718931,
"type": "LEAD_GUEST"
},
"details": {
"arrival": "2024-01-08T00:00:00",
"departure": "2024-01-09T00:00:00",
"number_of_adults": 2,
"number_of_children": 0,
"number_of_pets": 0,
"party_members": [
{
"first_name": "party",
"last_name": "member",
"age": 21
}
],
"origination_date": "2023-10-26T12:14:30.317"
},
"financials": {
"charges": [
{
"item": "Rental Rate",
"id": "Rent-38644032",
"code": "Rent",
"applies_to_id": "Rent-38644032",
"quantity": 1,
"type": "RENTAL",
"amount": 93024,
"amount_decimal_places": 2
},
{
"item": "Rental Rate Tax 1",
"id": "Rent-Tax-1-38644032",
"code": "Rent",
"applies_to_id": "Rent-38644032",
"quantity": 1,
"type": "TAX_ONE",
"amount": 6977,
"amount_decimal_places": 2
},
{
"item": "Rental Rate Tax 2",
"id": "Rent-Tax-2-38644032",
"code": "Rent",
"applies_to_id": "Rent-38644032",
"quantity": 1,
"type": "TAX_TWO",
"amount": 5581,
"amount_decimal_places": 2
},
{
"item": "Clean Fee",
"id": "Clean-38644032",
"code": "Clean",
"applies_to_id": "Clean-38644032",
"quantity": 1,
"type": "CLEAN_FEE",
"amount": 19000,
"amount_decimal_places": 2
},
{
"item": "Clean Fee Tax 1",
"id": "Clean-Tax-1-38644032",
"code": "Clean",
"applies_to_id": "Clean-38644032",
"quantity": 1,
"type": "TAX_ONE",
"amount": 1425,
"amount_decimal_places": 2
},
{
"item": "Clean Fee Tax 2",
"id": "Clean-Tax-2-38644032",
"code": "Clean",
"applies_to_id": "Clean-38644032",
"quantity": 1,
"type": "TAX_TWO",
"amount": 1140,
"amount_decimal_places": 2
}
],
"merchant_of_record": "SUPPLIER",
"commission_amount": 93024,
"total_amount": 127147,
"amount_decimal_places": 2
},
"payment_schedule": [
{
"amount_due": 127147,
"rate_decimal_places": 2,
"due_date": "2023-10-26T00:00:00"
}
]
}Updated 3 months ago
