Hotel API ERRORS

Response Status Codes

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.

401 Not Authorized - Apikey or X-signature sent in the header are incorrect. Revise your apikey or the algorithm to generate the x-signature.
403

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

Developer Over Qps - You have exceeded your API 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.

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.

 Example of error messages

<?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>

 

In the error/code part of the response you could receive 4 different values:

  • 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).
  • 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 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). 

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. 

Docs Navigation