Last updated

Troubleshooting error codes

This section enables you to troubleshoot the possible errors you can encounter when working with the Contracting API.

Let us know if you encounter other errors

If you encounter errors that are not addressed in this guide, reach out to Customer Support and we can add those errors to this guide.

400 error codes

The following codes are client-side errors.

You can encounter the following three type of errors:

Missing argument

This section covers the missing argument errors.

Missing required parameter

"errors": [
        {
            "code": "MISSING_ARGUMENT",
            "details": {
                "value": [
                    null
                ],
                "parameter": [
                    "legal_contact_email"
                ]
            },
            "message": "legal_contact_email is required"
        }
    ]

If any required legal detail parameter is missing, the server responds with the preceding error. Add the missing parameter(s) to resolve this issue.

    "errors": [
        {
            "code": "MISSING_ARGUMENT",
            "message": "Legal country code is also required if contract countries are passed!",
            "details": {
                "fields": [
                    "country"
                ]
            }
         }
    ]

If you do not include the legal country in which the Accommodation Partner operates, the server responds with the preceding error. Ensure that you add the "country" element with the relevant country code.

Invalid argument

This section covers the invalid argument errors.

Invalid email address

    "errors": [
        {
            "details": null,
            "message": "Invalid email address!",
            "code": "INVALID_ARGUMENT"
        }
    ]

If you provide an invalid email address, the server responds with the preceding error. Verify whether the email address you send is valid.

Empty country list

    "errors": [
        {
            "message": "Country list can not be empty!",
            "code": "INVALID_ARGUMENT",
            "details": null
        }
    ]

The country array cannot be empty. You must send all the countries in which the Accommodation Partner has properties.

Invalid country code(s)

    "errors": [
        {
            "details": null,
            "message": "Unknown country codes (bbb).",
            "code": "INVALID_ARGUMENT"
        }
    ]

If you sent an incorrect country code, the server responds with the preceding error. Verify whether the country you intended to send is part of the Booking.com country codes.

Brazilian Accommodation Partner adding other country than Brazil

    "errors": [
        {
            "message": "Brazilian legal entity may not sign contracts outside Brazil (nl)",
            "details": null,
            "code": "INVALID_ARGUMENT"
        }
    ]

If you add a country to the country list for a Brazilian Accommodation Partner that is not Brazil, the server responds with the preceding error. Ensure that the Brazilian Accommodation Partner only signs a contract properties in Brazil.

Non-Brazilian Accommodation Partner adding Brazil

    "errors": [
        {
            "message": "Non-brazilian legal entities may not sign contract in Brazil",
            "code": "INVALID_ARGUMENT",
            "details": null
        }
    ]

If you add Brazil to the country list as a non-Brazilian Accommodation Partner, the server responds with the preceding error. Ensure that the non-Brazilian Accommodation Partner does not attempt to sign a contract for properties in Brazil.

Operation not allowed

This section covers the operation not allowed errors.

Duplicating an account

    "errors": [
        {
            "details": null,
            "code": "OPERATION_NOT_ALLOWED",
            "message": "Trying to create a duplicate account!"
        }
    ]

If you attempt to create a legal entity ID (LEID) with an email that you have already used, the server responds with the preceding error. Each LEID has a one-to-one relationship with the Accommodation Partner's legal email. Ensure that you do not use the same emnail twice.

401 error codes

Access denied

The credentials provided in the request was not sufficient for a successful authentication check. | To fix a failed authentication request, see the Authentication page.

403 error codes

This account doesn't have access to this call

Possible reasons are, you are trying to send updates:
- for a property with the wrong hotel ID.
- using machine account that do not have access to the specified hotel ID.
- for a property which is no longer connected to your interface.

Make sure to specify the correct hotel ID or check your machine account credentials. You can then follow the steps:
1. Check if the property is connected to you in the Provider Portal.
2. Check if the connection status is active in the ‘Properties’ tab in the Provider Portal, using the property ID.
3. Check if the property is added to the machine account you use under ‘Machine Accounts’ in the Provider Portal.
To know more about how to use the Provider Portal for the above actions, take a look at this self-help guide.

500 error codes

Internal server error

Possible reason may be that Booking.com systems are experiencing temporary outage. Try calling the endpoint after some time.