Cancel a flight booking
Void a reservation before the ticket is issued.
POST/Air/AirCancel
Access requires the permission air_cancel
Use this on a booking that is held but not ticketed (status 10). Once a ticket is issued, cancel is no longer valid. Refund the ticket instead with refund.
Path parameters
None.
Query parameters
None.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
SessionId | string | Yes | Your session id. |
UniqueId | string | Yes | The booking id from book. |
Request
curl -X POST https://api.hermeseus.com/api/Air/AirCancel \
-H "Content-Type: application/json" \
-d '{
"SessionId": "8f3c81d2-4a5b-4c6d-9e0f-1a2b3c4d5e6f",
"UniqueId": "TP-2026-000512"
}'const res = await fetch("https://api.hermeseus.com/api/Air/AirCancel", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
SessionId: "8f3c81d2-4a5b-4c6d-9e0f-1a2b3c4d5e6f",
UniqueId: "TP-2026-000512"
})
});
const data = await res.json();import requests
res = requests.post(
"https://api.hermeseus.com/api/Air/AirCancel",
json={
"SessionId": "8f3c81d2-4a5b-4c6d-9e0f-1a2b3c4d5e6f",
"UniqueId": "TP-2026-000512",
},
)
data = res.json()Response
| Field | Type | Description |
|---|---|---|
Success | boolean | true on success. |
UniqueId | string | The booking id. |
PaymentDeadline | string | Updated deadline, when the booking stays open. |
Category / Status | integer | Booking category and status after the call. |
CancelationPolicyChange | boolean | Whether the cancellation policy changed. |
CanExtendPaymentDeadline | boolean | Whether you can push the deadline out. |
CancellationPolicies | array of object | The penalty bands that apply. |
CancellationPolicyNoteEn | string | Human-readable policy note. |
Error | object | null on success. |
{
"Success": true,
"UniqueId": "TP-2026-000512",
"PaymentDeadline": "2026-10-10T18:00:00",
"Category": 10,
"Status": 10,
"CancelationPolicyChange": false,
"CanExtendPaymentDeadline": true,
"CancellationPolicies": [
{ "FromDate": "2026-09-20T00:00:00", "ToDate": "2026-10-10T00:00:00", "Amount": 0.00, "Currency": "USD" }
],
"CancellationPolicyNoteEn": "Free cancellation until the payment deadline.",
"CancellationPolicyNote": null,
"Remarks": null,
"Error": null
}Errors
| Code | Meaning | Fix |
|---|---|---|
Err0103003 | Booking not found. | Check the UniqueId. |
Err0103004 | The booking cannot be cancelled in its current state. | For a ticketed booking, use refund instead. |
Err0103005 | The booking is already cancelled. | No action needed. |

