Errors
Introduction
Ratemarkt API might raise errors in certain cases.
In order to distinguish different return types, Ratemarkt uses conventional HTTP status codes mapped to certain circumstances.
As the HTTP standard stated, all successful queries return HTTP status 20X with the desired result object in JSON format.
For any unsuccessful result, Ratemarkt again tries to map the error to the most relevant HTTP status with an explanatory Error
object in response body using JSON format.
Error Object
Argument | Type | Nullable | Description |
---|---|---|---|
errorCode |
integer |
no | Predefined error code. Refer to error status reference. |
errorMessage |
string |
no | Explanatory error description |
errorCode |
integer |
yes | More detailed information about the error if available. |
Example Error Object
1 2 3 4 5 6 7 | HTTP1/1 410 Gone { "errorCode": 41000, "message": "Not available error", "detail": "Requested rate is no longer available" } |
Error Reference
HTTP Status Code | Error Code | Description | Resolution |
---|---|---|---|
400 |
4000 |
Validation Error | Check your query object and fix arguments if needed according to relevant Query Object reference |
401 |
40100 |
Authentication Error | No valid API key provided. |
403 |
40300 |
Authorization Error | You're not permitted to access to the requested resource. Try with an authorized API key. |
404 |
40400 |
Not Found Error | Requested resource does not exists. Check your API resource url. |
409 |
40900 |
Illegal State Error | Some conflict occured. Please consult to detail message for further resolution. |
410 |
41000 |
Not Available Error | Requested hotel or rate no more available. Try another one or change your date range or pax infromation. |
429 |
42900 |
Rate Limit Exceeded Error | You have limited number of API access within a certain amount of time. Reduce your number of API access. |
500 |
50000 |
System Error | Consult to detail message for further resolution. |
500 |
51000 |
Payment Error | Payment could not be received. Try another payment option or provide another payment data. |
503 |
50300 |
Service Unavailable Error | Unknown system error occured. Consult to detail message for further resolution. |