Skip to content
FX-Port/Docs
GuidesAPI referenceChangelog
Get API keys
  • Introduction
  • Quickstart
  • Security
  • Authentication
  • Environments and Postman
  • Sandbox
  • Conventions and naming
  • Legacy names and twins
  • Errors
  • Rate limits and fair use
  • Streaming search results

Concepts

  • Overview
  • Booking flows
  • Passengers and ages
  • Pricing
  • Post-booking operations

Search and price

  • Airport autocomplete
  • Search flights
  • Basic routes
  • Passengers and cabins
  • Filters
  • Supplier selection
  • Open-jaw and multi-city
  • Flexible dates
  • Price an offer

Book, pay and cancel

  • Book
  • Quote a held booking
  • Pay a held booking
  • Cancel a held booking
  • Quote a cancellation
  • Confirm a cancellation

After booking

  • Get a booking
  • Get the ticket PDF
  • Get the ticket number
  • ACD passport uploads
  • Use these docs with AI

Flights · Book, pay and cancel

Cancel a held booking

Cancel a held (unpaid) flight reservation to release the PNR. This is not a refund.

POST/api/v1/flights/cancel_order

Cancel a held (unpaid) reservation. The reservation is deleted at the supplier and the PNR is released.

Permission: Read+Write. Rate group: booking (1,200 requests per minute per key).

This is not a refund and it does not apply to issued (paid) tickets. A held reservation was never paid, so nothing is refunded: the reservation is deleted and the PNR released. To get money back for an issued Duffel order use Cancel quote and Confirm cancel; void, exchange or refund of an issued Amadeus Algeria ticket is manual: see Post-booking operations.

Why cancel a hold

If you create a hold and abandon it, the airline can refuse a new booking for the same passenger on the same route while the old reservation is pending. Cancel the old hold to release the PNR before you book that passenger again.

Identifying the order

FieldDescription
order_idThe supplier's order id returned when the hold was created (booking.reference). Preferred.
booking_idThe PNR of the booking.
pnrThe airline record locator.

Send one: the first one present wins, in this order, and another one that holds a different value is dropped with an ignored_field warning. PNRs are not unique across suppliers: prefer order_id. Legacy names: orderId, bookingId.

Conditions

The call is refused unless all of these hold:

  • the booking belongs to your agency (another agency's booking is answered like an unknown one);
  • the supplier is Amadeus Algeria or Travelport (a Duffel order is answered with 400: Duffel has no holds);
  • the booking status is awaiting_payment (a confirmed or already cancelled booking is 409 invalid_booking_status).

Request example

curl https://api.fx-port.com/api/v1/flights/cancel_order \
  -H "Authorization: Bearer fxp_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "order_id": "eJzTd9ePNA90dHUGAAsuAlA"
}'

Response example

Real response of 2026-11-01 for a hold created two seconds earlier:

{
  "environment": "sandbox",
  "success": true,
  "requestId": "11487aa1",
  "orderId": "eJzTd9ePNA90dHUGAAsuAlA",
  "processingTime": 2.147,
  "booking": {
    "reference": "Y7QAEC",
    "status": "cancelled",
    "pnr": "Y7QAEC",
    "type": "hold",
    "createdAt": "2026-11-01T15:26:27.977426+00:00",
    "cancelledAt": "2026-11-01T15:26:30.748257",
    "content": "managed",
    "syncedAt": "2026-11-01T15:26:30.748257",
    "availableActions": [],
    "voidableUntil": null,
    "cancellation": { "type": "void", "deleted": true, "deletedAt": "2026-11-01T15:26:30.748257" }
  },
  "supplier": { "id": "amadeus_aqc_dz_1", "technology": "amadeus_aqc", "name": "Amadeus Algeria", "offerId": null },
  "agency": { "currency": "DZD" },
  "cancellation": {
    "status": "deleted",
    "deleted": true,
    "deletedAt": "2026-11-01T15:26:30.748257",
    "refundAmount": 0,
    "refundCurrency": "DZD",
    "refundTo": null,
    "message": "Reservation deleted successfully."
  },
  "meta": {
    "supportHold": true,
    "supportVoid": true,
    "voidDeadline": "2026-11-01T23:00:00Z",
    "voidWindowEndsAt": null,
    "airlineInitiatedChanges": [],
    "changes": [],
    "users": [],
    "orderMetadata": { "supplierStatusCode": 204, "supplierDeleteErrorIgnored": false, "supplierDeleteErrorCode": 204, "supplierDeleteErrorMessage": null }
  },
  "postProcessing": { "bookingStatusUpdated": true }
}

Field meanings

FieldMeaning
orderIdThe supplier's order id of the booking (twin: order_id).
booking.referenceThe PNR in this endpoint (in the book and pay responses it is the order id): read orderId for the order.
booking.statuscancelled on success.
booking.availableActionsEmpty: nothing more can be done with this order.
booking.cancellation and cancellationdeleted: true when the reservation was released at the supplier.
cancellation.refundAmountAlways 0 here: a hold was never paid.
cancellation.messageA human-readable outcome, for your logs.
postProcessing.bookingStatusUpdatedtrue when the FX-Port booking is now cancelled.

Cancelling a hold does not touch your balance: nothing was ever debited. The booking stays readable with get_booking (status cancelled).

Errors

StatusCodeWhenWhat to do
400bad_requestNone of order_id, booking_id, pnr (Missing required parameter: order_id (or booking_id / pnr)).Send one.
400bad_requestThe booking is not an Amadeus Algeria or Travelport hold (for example a Duffel order). Message: "Delete reservation is currently only supported for Amadeus Algeria and Travelport hold bookings."For an issued Duffel order see Cancel quote.
403read_write_permission_requiredA read-only key.Use a read+write key.
404not_foundThe booking is unknown for your agency and environment: Booking not found for order_id: <id>. The booking of another agency is answered the same.Check the id.
409invalid_booking_statusThe booking is not awaiting_payment: it is confirmed (paid) or already cancelled.Read it with get_booking.
500booking_update_failedThe reservation was deleted but the FX-Port booking could not be updated.Read the booking; contact support with the request_id if it is still awaiting_payment.

A supplier failure while deleting is answered with the supplier's status and message.

Related

  • Book a flight (hold), Pay a held booking and Booking flows.
PreviousPay a held bookingNext Quote a cancellation

On this page

  • Why cancel a hold
  • Identifying the order
  • Conditions
  • Request example
  • Response example
  • Field meanings
  • Errors
  • Related

© 2026 FX-Port

TermsPrivacy[email protected]