Hotel API ERRORS

The errors in APItude can be returned in two ways:

  • HTTP Response Errors: you'll get a HTTP status code and a short message.
  • Formatted Response Errors: you'll get a HTTP status code as well, and an error message formatted in XML or JSON.

HTTP Response Errors

The error description will be returned in a basic format in the response body.

HTTP status code
Description
200 OK - The request has succeeded. The client can read the result of the request in the body and the headers of the response.
400

Bad Request - The request could not be understood by the server due to malformed syntax. The message body will contain more information.

The card data are not correctly tokenized. Card Number o CVC is not tokenized. -

401 Not Authorized - Apikey or X-signature sent in the header are incorrect. Revise your apikey or the algorithm to generate the x-signature.
402 Payment Required - Booking requieres payment information. Revise the paymentType of the rate and include the payment details.
403

Forbidden - The server understood the request, but is refusing to fulfill it.

Developer Over Qps - You have exceeded your API throttle limit.

Developer Over Rate - You have exceeded your API daily quota.

Developer Inactive - The apikey sent in the header is wrong or inactive.

Not authorized - The X-Signature parameter is incorrect. Check its creation and server time.

NOTE: Please check the response body or the response header "X-Mashery-Error-Code" to be sure which error you are having.

404 Not Found - The requested resource could not be found. This error can be due to a temporary or permanent condition.
406 Not Acceptable: The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.
415 Unsupported Media Type - Use the Content-Type header to set application/json or application/xml based on the format of your payload.
500 Internal Server Error. Make sure to read the error message details for more information on the error.
502 Bad Gateway - The server was acting as a gateway or proxy and received an invalid response from the upstream server.
503

Service Unavailable - The server is currently unable to handle the request due to a temporary condition which will be alleviated after some delay. You can choose to resend the request again.

Insufficient allotment - The allotment for a given hotel is not enough to satisfy the requested passenger distribution.

504

Gateway Timeout - The server was unable to handle the request under the expected time due to a temporary condition which will be alleviated after some delay. You can choose to resend the request again.

NOTE: Be aware that in the event of receiving this error at booking confirmation, it's possible that the booking was made despite not having a response. You can check this using the BookingList operation.

513 Application error - Indicates that an involved backend application returned an error or warning, which is passed back in the response message.
596 Service Not Found - an invalid endpoint has being reached. Please check that the endpoint you are using to send the petitions is correct.

Formatted Response Errors

The value returned after the code is an internal value that should not be used to map any error as it will be different in each response. It's advised to attach the whole message when reporting errors.

HTTP status code
Description
500

PRODUCT_ERROR: these errors are produce due account set up or product restrictions, for example: Service not available.

SYSTEM_ERROR: these are internal system errors, please send us these errors with the complete logs (xml/json petitions and responses so we can review them).

400

INVALID_REQUEST: the request was not properly created, there is an error in the creation that needs to be fixed, for example a field could be misspelled (writing chekIn instead of checkIn).

INVALID_DATA: The card data are not correctly tokenized. Card Number o CVC is not tokenized.

INVALID_DATA: The request was properly created but the information that contains is incorrect. For example incorrect check in date (requesting for the day before or for the 30th of February) or incorrect number of adults (requesting 0 adults).

Example of formatted error message

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<availabilityRS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.hotelbeds.com/schemas/messages" schemaLocation="http://www.hotelbeds.com/schemas/messages HotelValuedAvailRS.xsd">
    <auditData timestamp="2015-05-01 18:09:02.056" serverId="ws3xmi01" environment="[itest, HOTEL_CONTENT_UPDATER-ITEST]" release="2878"/>
    <error>
        <code>INVALID_REQUEST-BCDBF0DE2CDA4D86B1C6A82D8317493D</code>
        <message>The data of this request is not compliant with the specified version of the API. Error at property occupancies: The number of children are wrong</message>
    </error>
</availabilityRS>

Docs Navigation