Last updated

Modifying booking requests

This article covers all endpoints that provides means to modify a booking request. For detailed information on the object schema of the RtB API, please refer to the [object schema] article.

ModifyBookingRequest object

ModifyBookingRequest object is used to communicate BookingRequest state changes in modification requests.

{
  "status": "REJECTED", 
  "rejectionReason": "POLICY_DONT_FIT_NEEDS",
  "rejectionReasonText": null
}
KeyValueDescription
statusStringStatus that you want to move the booking request to.
This can contain the following values:
- APPROVED: Request is approved by partner.
- REJECTED: Request is declined by partner.
rejectionReasonStringSpecifies the rejection reason from one of the available options.
This can contain the following values:
- DATES_NOT_AVAILABLE
- POLICY_DONT_FIT_NEEDS
- OUTSIDE_HOURS_CHECKIN
- MISSING_INFORMATION
- NOT_COMFORTABLE
Required, if status is REJECTED.
rejectionReasonTextStringFree text about why the request is being denied in case of rejectionReason: NOT_COMFORTABLE. This information is private and is not shared with the guest.
This text is only allowed when rejectionReason is NOT_COMFORTABLE. For any other status the value is ignored.
Text limit is 255 characters. Longer text are trimmed without returning a warning.
- Required if rejectionReason is NOT_COMFORTABLE.
- Pass this as null (if not it's ignored) for any other status.

Update booking request by ID

Use the /rtb/properties/{property_id}/requests/{id} endpoint to update a booking request by its ID.

Method and URL

POST https://supply-xml.booking.com/rtb/properties/{property_id}/requests/{id}

Request body parameters

ParameterDescriptionTypeRequired
statusStatus that you want to move the booking request to.

This can contain the following values:
- APPROVED: Request is approved by partner.
- REJECTED: Request is declined by partner.
StringTrue
rejectionReasonSpecifies the rejection reason from one of the available options.

This can contain the following values:
- DATES_NOT_AVAILABLE
- POLICY_DONT_FIT_NEEDS
- OUTSIDE_HOURS_CHECKIN
- MISSING_INFORMATION
- NOT_COMFORTABLE
StringTrue, if status is REJECTED.
rejectionReasonTextFree text about why the request is being denied in case of rejectionReason: NOT_COMFORTABLE. This information is private and is not shared with the guest.

This text is only allowed when rejectionReason is NOT_COMFORTABLE. For any other status the value is ignored.

Text limit is 255 characters. Longer text are trimmed without returning a warning.

StringTrue, if rejectionReason is NOT_COMFORTABLE.

False (and ignored) for any other status.

Sample request

curl --location 'https://supply-xml.booking.com/rtb/properties/2342343/requests/fc521d813a3423b2fc521d813a3423b2' \
--header 'Authorization: Basic {your_base64_encoded_credentials}' \
--header 'X-Booking-Api-Version: {version_number}' \
--data '{"status": "REJECTED", "rejectionReason": "POLICY_DONT_FIT_NEEDS",}'

Sample responses

In case of a successful request, you'll receive an empty response with status code 200.

In case of an error, you'll receive the following:

  • an error code
  • a message explaining the error, and
  • an RUID in the metadata

Success

{
    "warnings": [],
    "errors": [],
    "meta": {
        "ruid": "0000000000000000000000000000000000000000000000000000000000000000000000000000"
    }
}

Error

{
    "meta": {
        "ruid": "0000000000000000000000000000000000000000000000000000000000000000000000000000"
    },
    "warnings": [],
    "errors": [
          {
            "message": "The Rtb request is expired, so status cannot be updated.",
            "code": "RTB_STATUS_CAN_NOT_CHANGE"
          }
    ]
}

Declining a booking request

Connectivity providers must include an option for partners to select the reason for rejecting a request. If a partner chooses the reason NOT_COMFORTABLE, they must also provide an additional rejection reason text field for the partners to share any extra information.

Rejection Reason Is Kept Private

The rejection reason information the property shares is kept private and is only used to improve the overall experience.

This is how we show this option in the Booking.com Extranet.

Decline reason example from Extranet