Reverse
POST
/api/v1/generic-api-service/flight/reverse
The reverse endpoint performs the actual PNR cancellation using the reverseToken obtained from the Reverse Inquire service. It cancels the ticket(s) and applies the previously quoted penalty and refund amounts.
- cURL
- Request
- Response
- Request Details
- Response Details
- Errors
curl --location 'https://test-api.etscore.com/api/v1/generic-api-service/flight/reverse' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
"orderId": "49661695",
"pnr": "42ED16",
"reverseToken": "00b1804f-0791-4480-9842-758fa48cd119"
}'
{
"orderId": "49661695",
"pnr": "42ED16",
"reverseToken": "00b1804f-0791-4480-9842-758fa48cd119"
}
{
"success": true,
"orderId": 49661695,
"pnr": "42ED16",
"orderStatus": "REFUND_PNR",
"reverseType": "REFUND_PNR",
"totalPenaltyAmount": 68.53,
"totalRefundAmount": 39.85,
"currency": "EUR"
}
| Name | Type | Required | Description |
|---|---|---|---|
| orderId | string | Yes | The unique order identifier of the booking to be cancelled. |
| pnr | string | Yes | The PNR (booking reference) to be cancelled. |
| reverseToken | string | Yes | The reverseToken obtained from the Reverse Inquire service. It must still be valid (before its expireTime). |
| Name | Type | Required | Description |
|---|---|---|---|
| success | boolean | Yes | Indicates whether the cancellation was performed successfully. |
| orderId | int | Yes | The order identifier. |
| pnr | string | Yes | The PNR that was cancelled. |
| orderStatus | string | Yes | Order status after the reverse operation (e.g. REFUND_PNR). |
| reverseType | string | Yes | The type of reverse operation performed (e.g. REFUND_PNR). |
| totalPenaltyAmount | decimal | Yes | Total cancellation penalty charged. |
| totalRefundAmount | decimal | Yes | Total amount refunded after the penalty. |
| currency | string | Yes | Currency of the amounts (e.g. EUR). |
Errors specific to Reverse (6 codes). Common gateway and authentication errors apply to all endpoints and are listed once in the central reference.
🔎
Validation— fix the request and retry
| Group | Code | Message | Description |
|---|---|---|---|
| Validation | 904128 | Inventory validation error. | Returned when the request payload fails schema validation or required fields are missing. Correct the request parameters and send the request again. |
| Validation | 904200 | Flight service validation error: {0} | Returned during flight operations when validation on the remote flight provider side fails. Correct the request parameters and send the request again. |
Timeout— restart the flow or session
| Group | Code | Message | Description |
|---|---|---|---|
| Timeout | 904208 | Reverse token has expired. Please initiate a new reverse inquiry. | Returned when the reverse token has expired. The cancellation quote has timed out; initiate a new reverse inquiry to obtain an active token. |
Rate limit— slow down and retry later
| Group | Code | Message | Description |
|---|---|---|---|
| Rate limit | 901010 | You have exceeded the limit of requests sent per unit time. You can send {1} requests in {0} seconds. | Returned when the rate limit configured for your sales channel / IP is exceeded. Slow down your request rate and retry after the specified window. |
System— retry with backoff; contact support if persistent
| Group | Code | Message | Description |
|---|---|---|---|
| System | 904003 | Unexpected error occured. | Returned when an unexpected system error occurs while processing the flight request. Retry after a short wait; if the issue persists, contact Etscore support. |
| System | 904201 | Flight service system error: {0} | Returned when an internal system error occurs within the remote flight provider service. Retry with backoff; contact support if persistent. |
Common errors not shown here. Gateway, authentication and header errors apply to every endpoint. → See the central Error Codes reference.