Last updated

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 CodeError TextReasonPossible Fix
400Expecting exactly 1 hotel ID in the requestThe request has 0 or more than 1 hotel ID specified.Make sure to specify only one hotel ID.
400Bad requestThe 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.
400Policy ID is not validThe 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.
400Reached 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.
400Missing 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
400CANCEL_PENALTY_NOT_AVAILABLEThe 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
403Request 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.
500Internal server errorThe 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==] -->