Return Codes
Error Codes returned:
If there's an application-level error, you will receive a standard response, containing the application error code, a generic message and a detailed message describing the specific reason for the error.
The specific reason will be created dynamically for every error, as follows:
Application Status | Description | Mapped HTTP Status Code | Mapped HTTP Status Description |
---|---|---|---|
-112 | Destination is bad | 400 | Bad Request |
-123 | Message badly formatted | 400 | Bad Request |
-125 | Bad input data - One of the elements is missing or the data is wrong. | 400 | Bad Request |
-150 | System error - The server encountered an unexpected condition that prevented it from fulfilling the request. | 500 | Internal Server Error |
-160 | URI not found - The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible | 404 | Not Found |
-168 | Data integrity failed | 409 | Conflict |
-174 | Too many items | 400 | Bad Request |
-175 | The server timed out, waiting for the request. According to HTTP specifications: "The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at a later time. | 408 | Request Time-out |
-179 | Bad input parameter | 400 | Bad Request |
-180 | User is blocked and can not use PCI Booking | 426 | USER_BLOCKED |
-1003 | Not authorized to access this resource - Authentication failed or the user doesn't have the necessary credentials for PCI Booking service. | 401 | Unauthorized |
-1004 | The card number does not match the card type | 400 | Bad Request |
-1005 | Card type is missing | 400 | Bad Request |
Success codes returned:
Mapped HTTP Status Code | Mapped HTTP Status Description | Description |
---|---|---|
200 | Ok | The request was fulfilled |
201 | Created | The request has been fulfilled, creating a new resource. |
You can find all relevant response content within the methods description
Sample Error Response
<?xml version="1.0" encoding="utf-8"?>
<ErrorBlock xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<code>-112</code>
<message>http://www.w3.org/2001/XMLSchema</message>
<moreInfo>Bad or missing custom header X-pciBooking-Destination</moreInfo>
</ErrorBlock>
{
"code":-112,
"message":"Destination is bad",
"moreInfo":"Bad or missing custom header X-pciBooking-Destination"
}
Updated over 5 years ago