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

MethodEndpointDescription
PUTv2023.07.31/bookingUse this endpoint to modify a booking

Body Parameters

ParameterRequired / OptionalDescriptionData Type
"booking_id"RequiredThe unique identifier for the booking to modifyint
"inventory_id"Unique Identifier for Unit in Inventoryint
"organization_id"The unique identifier for the Supplier associated with the bookingint
"type"Indicates the type of booking, such as "CONFIRMED"string
"source"Specifies the source of the bookingstring
"source_id"An identifier representing the booking sourcestring
"details"An object containing specific details related to the bookingobject
"comments"An object containing comments related to the bookingarray
"customer_details"An object containing customer-related detailsobject
"financials"An object containing financial details related to the bookingarray
"total_amount"The total amount of the booking, including all chargeslong
"amount_decimal_places"The number of decimal places in the "total_amount" valueint
"thread_id"Id identifying relevant message thread for channelstring

"details" Object Body Parameters

ParameterRequired / OptionalDescriptionData Type
"arrival"RequiredThe arrival date for the bookingdate-time
"departure"RequiredThe departure date for the bookingdate-time
"origination_date"RequiredThe origination date of the bookingdate-time
"number_of_adults"RequiredThe number of adults included in the bookingint
"number_of_children"RequiredThe number of children included in the bookingint
"number_of_pets"RequiredThe number of pets included in the bookingint
"party_members"RequiredAn array containing details about additional Party Membersarray

"party_members" Object Body Parameters

ParameterRequired / OptionalDescriptionData Type
"first_name"RequiredFirst name of a party memberstring
"last_name"RequiredLast name of a party memberstring
"age"RequiredAge of a party memberint

"comments" Object Body Parameters

ParameterRequired / OptionalDescriptionData Type
"text"OptionalThe text of the commentstring
"type"OptionalType of comment, e.g., "PRIVATE"string

"customer_details" Object Body Parameters

ParameterRequired / OptionalDescriptionData Type
"type"RequiredType of customer, "LEAD_GUEST"string
"first_name"RequiredThe first name of the lead gueststring
"last_name"RequiredThe last name of the lead gueststring
"age"RequiredThe age of the lead guestint
"phone_numbers"RequiredThe phone number(s) of the lead guestarray
"email_addresses"RequiredThe email address(es) of the lead guestarray
"notes"OptionalAdditional notes to add against the Lead Gueststring
"allow_marketing_emails"OptionalIndicates whether the Lead Guest allows marketing emailsboolean
"airbnb_guest_id"OptionalUnique identifier for an Airbnb gueststring

"financials" Object Body Parameters

ParameterRequired / OptionalDescriptionData Type
"item"The name of the charge itemstring
"id"The unique identifier for the charge itemstring
"code"The code associated with the charge itemstring
"applies_to_id"The identifier specifying the charge item it applies tostring
"quantity"The quantity of the charge itemint
"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 feesstring
"amount"The amount of the charge itemlong
"amount_decimal_places"The number of decimal places for the "amount"int

Response Definition

Response ItemDescriptionData Type
"booking_id"Unique identifier for the reservationint
"inventory_id"Unique identifier for the unit associated with the reservationint
"type"Status of the reservation (e.g., CONFIRMED)string
"source"Denotes the source of the bookingstring
"source_id"An identifier associated with the sourcestring
"ip_address"The IP address from which the booking request originatedstring
"customer_details"An object containing details about the lead guest (main guest) for the reservationobject
"comments"An object containing comments related to the bookingobject
"details"An object containing details about the associated reservationobject
"financials"An object containing financial details related to the reservationobject
"merchant_of_record"Identifies the merchant of recordstring
"commission_amount"The commission amount associated with the reservationlong
"total_amount"The total amount of the reservationlong
"amount_decimal_places"The number of decimal places for the "commission_amount" and "total_amount"int
"payment_schedule"An object containing payment schedule detailsobject
"thread_id"Id identifying relevant message thread for channelstring

"customer_details" Object

Response ItemDescriptionData Type
"id"Unique identifier for the customerint
"type"Guest type, like "LEAD_GUEST"string
"first_name"The first name of the lead gueststring
"last_name"The last name of the lead gueststring
"phone_numbers"The phone number(s) of the lead guestarray
"email_addresses"The email address(es) of the lead guestarray
"allow_marketing_emails"Indicates whether the Lead Guest allows marketing emailsboolean

"comments" Object

Response ItemDescriptionData Type
"text"The text of the commentstring
"type"Comment type, e.g., "PRIVATE"string

"details" Object

Response ItemDescriptionData Type
"arrival"Date and time of the guest's arrivalstring
"departure"Date and time of the guest's departurestring
"number_of_adults"Number of adults in the reservationint
"number_of_children"Number of children in the reservationint
"number_of_pets"Number of pets in the reservationint
"party_members"An array containing details about additional Party Membersarray

"party_members" Object

Response ItemDescriptionData Type
"first_name"First name of a party memberstring
"last_name"Last name of a party memberstring
"age"Age of a party memberint

"financials" Object

Response ItemDescriptionData Type
"charges"An array containing different charges related to the reservationarray

"charges" Object

Response ItemDescriptionData Type
"item"The name of the charge itemstring
"id"The unique identifier for the charge itemstring
"code"The code associated with the charge itemstring
"applies_to_id"The identifier specifying the charge item it applies tostring
"quantity"The quantity of the charge itemint
"type"The type of the charge itemstring
"amount"The amount of the charge itemlong
"amount_decimal_places"The number of decimal places for theint

"payment_schedule" Object

Response ItemDescriptionData Type
"amount_due"The amount due for paymentlong
"rate_decimal_places"Number of decimal places for the "amount_due"int
"due_date"Due date for the paymentstring

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"
        }
    ]
}