Beta version

This API endpoint is currently in beta. Make sure to direct any questions during the beta phase to your Booking.com contact person via the appropriate channels.

Troubleshooting Policy error codes

This section captures the list of common HTTP errors you can encounter together with possible solutions to fix them.

HTTP Error Code Error Text Reason Possible Fix
400 Expecting exactly 1 hotel ID in the request The request has 0 or more than 1 hotel ID specified. Make sure to specify only one hotel ID.
400 Bad request The request contains invalid or missing body parameters. Make sure to specify all the required body parameters. For a complete list of body parameters when creating/updating a policy, see Managing Policies.
400 Policy ID is not valid The request contains an incorrect policy ID. Make sure to specify the correct policy ID. To get the list of policy IDs created for a property, see Retrieving policy details.
400 Reached maximum number of allowed policies... The policy limit count of 7 for individual properties has been reached. Edit an existing policy to specify the new policy code. For more information on how to edit a policy, see Edit policy details.
400 Missing required field 'cancelpenalty' The request does not contain the mandatory cancelpenalty parameter. Make sure to specify the cancelpenalty parameter. See Managing Policies. for more information
400 CANCEL_PENALTY_NOT_AVAILABLE The specified cancellation code does not exist in the list of available codes. Make sure to specify an existing cancellation code. See List of cancellation policy codes. for more information
403 Request for forbidden hotel ID(s) The specified hotel ID is invalid or the machine account credentials do not have access to the specified hotel ID. Make sure to specify the correct hotel ID or check your machine account credentials.
500 Internal server error The web server is currently not responding. Booking.com servers are currently busy. Make sure to try again a little later.

Creating a duplicate policy returns an error

When creating a duplicate cancellation policy with the same combination of penalty code, guarantee payment and no show penalty conditions, the API returns an error along with the details of the existing cancellation policy.

<?xml version='1.0' encoding='UTF-8'?>
<Response>
    <Policies>
        <Policy Id="341337682" GroupName="general" Type="Cancellation">
            <CancelPenalty PolicyCode="568"/>
            <NoShowPolicy Penalty="default"/>
            <GuaranteePayment Required="false" EffectiveFrom="after_reservation_is_made"/>
            <Tags>
                <Default/>
            </Tags>
        </Policy>
    </Policies>
    <Errors>
        <Error Code="DUPLICATE_POLICY" ShortText="Cannot have 2 policies with the same cancellation and prepayment codes">
            <Details>
                <PolicyCode>341337682</PolicyCode>
            </Details>
        </Error>
    </Errors>
</Response>
<!-- RUID: [UmFuZG9tSVYkc2RlIyh9Yc2VQEtEQcWis2P7po9uf/HW/V97Zg8yxXcJRBupSbBiP1BtpRH5az5Fe10g+nziEQ==] --