Hermeseus

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

NameTypeRequiredDescription
SessionIdstringYesYour session id.
UniqueIdstringYesThe 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

FieldTypeDescription
Successbooleantrue on success.
UniqueIdstringThe booking id.
PaymentDeadlinestringUpdated deadline, when the booking stays open.
Category / StatusintegerBooking category and status after the call.
CancelationPolicyChangebooleanWhether the cancellation policy changed.
CanExtendPaymentDeadlinebooleanWhether you can push the deadline out.
CancellationPoliciesarray of objectThe penalty bands that apply.
CancellationPolicyNoteEnstringHuman-readable policy note.
Errorobjectnull 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

CodeMeaningFix
Err0103003Booking not found.Check the UniqueId.
Err0103004The booking cannot be cancelled in its current state.For a ticketed booking, use refund instead.
Err0103005The booking is already cancelled.No action needed.