Skip to content
FX-Port/Docs
GuidesAPI referenceChangelog
Get API keys
  • Overview
  • Error object

Search and price

  • Search flightsPOST
  • Flexible datesPOST
  • Price an offerPOST
  • Airport autocompleteGET
  • Most searched airportsGET

Book, pay and cancel

  • Book an offerPOST
  • Quote a held orderPOST
  • Pay a held orderPOST
  • Cancel a held orderPOST

After booking

  • Get a bookingPOST
  • Ticket PDFPOST
  • Ticket numberPOST
  • Quote a refundPOST
  • Confirm a cancellationPOST

ACD documents

  • Get the document statePOST
  • Upload passportsPOST

Objects

  • Flight offer
  • Flight booking

Flights ยท Book, pay and cancel

Get the current quote of an order

Get the current price of an order, its status and whether it can still be paid.

POST/api/v1/flights/get_order_quote

Requires an API key with Read permission; a Read+Write key works too.

The step is optional: call it to preview or refresh the price of a held order before pay_order.

Send one of order_id (the supplier's order id, preferred), booking_id and pnr: the first one present wins. The FX-Port UUID is not accepted here. An Amadeus order is answered from the stored booking; a Duffel order is priced by the supplier. The order must be a booking of your agency in the environment of your key: an unknown order and the order of another agency answer the same 404 not_found, before any supplier is asked.

Read success. When the supplier refuses the quote for an order FX-Port knows (a Duffel order that no longer exists at the supplier, for example) the answer is not a 404: it is HTTP 200 with success: false and the supplier's own error, as in the second example.

curl https://api.fx-port.com/api/v1/flights/get_order_quote \
  -H "Authorization: Bearer fxp_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "order_id": "eJzTd9ePNA9wdA0FAAs8AmE"
}'
Response200
{
  "environment": "sandbox",
  "success": true,
  "requestId": "469d8803",
  "orderId": "eJzTd9ePNA9wdA0FAAs8AmE",
  "processingTime": 0.134,
  "orderQuote": {
    "orderId": "eJzTd9ePNA9wdA0FAAs8AmE",
    "bookingReference": "Y7PAEU",
    "status": "awaiting_payment",
    "pricing": {
      "supplierCurrency": "DZD",
      "agencyCurrency": "DZD",
      "basePrice": 3160,
      "taxesAndFees": 1765.44,
      "agencyCommission": 4.93,
      "finalPrice": 4930.37,
      "b2bPrice": 4925.44,
      "additionalServices": [],
      "totalAmount": 4925.44
    },
    "paymentStatus": {
      "awaitingPayment": true,
      "paymentRequiredBy": null,
      "priceGuaranteeExpiresAt": null,
      "priceGuaranteed": true,
      "canPay": true
    },
    "liveMode": false
  },
  "supplier": {
    "id": "amadeus_aqc_dz_1",
    "technology": "amadeus_aqc",
    "name": "Amadeus Algeria"
  },
  "agency": {
    "currency": "DZD"
  },
  "meta": {
    "priceGuaranteed": true,
    "paymentDeadline": null,
    "canPay": true
  }
}
Response200
{
  "environment": "sandbox",
  "requestId": "0582790e",
  "orderId": "ord_000000000000000000000X",
  "processingTime": 0.085,
  "error": {
    "message": "The resource you are trying to access does not exist.",
    "code": "not_found",
    "type": "invalid_request_error",
    "details": [
      {
        "documentation_url": "https://duffel.com/docs/api/overview/response-handling",
        "title": "Not found",
        "type": "invalid_request_error",
        "message": "The resource you are trying to access does not exist.",
        "code": "not_found"
      }
    ]
  },
  "supplier": {
    "id": "duffel_1",
    "technology": "duffel",
    "name": "Duffel"
  },
  "meta": {
    "request_id": "0582790e",
    "status": 200
  },
  "success": false,
  "errors": [
    {
      "code": "not_found",
      "type": "supplier_error",
      "title": "Not found",
      "message": "The resource you are trying to access does not exist.",
      "field": null,
      "details": {
        "supplier_type": "invalid_request_error",
        "supplier_details": [
          {
            "documentation_url": "https://duffel.com/docs/api/overview/response-handling",
            "title": "Not found",
            "type": "invalid_request_error",
            "message": "The resource you are trying to access does not exist.",
            "code": "not_found"
          }
        ]
      },
      "documentation_url": "https://fx-port.com/docs/errors#not_found"
    }
  ],
  "request_id": "0582790e"
}

Request

Body

Required, JSON.

order_idstring

The supplier's order id (booking.reference of the booking response). Preferred: a PNR is not unique.

booking_idstring

The PNR of the booking.

pnrstring

The airline record locator.

supplier_idstring

Only used when the booking has no supplier of its own.

agency_idstring

Not needed: the agency of a call is always the one of your API key. The field is accepted so that older clients keep working, and it is ignored.

orderIdstringdeprecated

Legacy name, still accepted. Use order_id instead.

The previous spelling of order_id: The supplier's order id (booking.reference of the booking response).

bookingIdstringdeprecated

Legacy name, still accepted. Use booking_id instead.

The previous spelling of booking_id: The PNR of the booking.

supplierIdstringdeprecated

Legacy name, still accepted. Use supplier_id instead.

The previous spelling of supplier_id: Only used when the booking has no supplier of its own.

agencyIdstringdeprecated

Legacy name, still accepted. Use agency_id instead.

The previous spelling of agency_id: Not needed: the agency of a call is always the one of your API key.

Response

200The quote. success: false with error when the supplier refused it.

environmentstring

The environment of the key that made the call: sandbox for fxp_test_ keys, live for fxp_live_ keys. Present in every JSON body.

One of sandbox, live.

request_idstring

The id of the request, also in the X-Request-Id header.

warningsarray of object

Present only when the request used a previous spelling of a field or something the endpoint ignored.

ShowHide 5 attributes
codestring

What the warning is about.

One of deprecated_field, ignored_field, coerced_value, deprecated_value, deprecated_endpoint.

fieldstring

The request field the warning is about.

replacementstring

The name to use instead, for deprecated_* warnings.

messagestring

A sentence that says what happened and what to do.

documentation_urlstring

Where the naming rules are explained.

successboolean

true when the quote could be built.

requestIdstringdeprecated

Legacy name, still accepted. Use request_id instead.

The id of this request, 8 characters, for support.

orderIdstringdeprecated

Legacy name, still accepted. Use order_id instead.

The supplier's order id.

order_idstring

The supplier's order id. The snake_case twin of orderId, with the same value: use this name.

processingTimenumberdeprecated

Legacy name, still accepted. Use processing_time instead.

Seconds spent.

processing_timenumber

Seconds spent. The snake_case twin of processingTime, with the same value: use this name.

orderQuoteobject

The quote.

ShowHide 8 attributes
orderIdstringdeprecated

Legacy name, still accepted. Use order_id instead.

The supplier's order id.

order_idstring

The supplier's order id. The snake_case twin of orderId, with the same value: use this name.

bookingReferencestringdeprecated

Legacy name, still accepted. Use pnr instead.

The PNR.

pnrstring

The PNR. The snake_case twin of bookingReference, with the same value: use this name.

statusstring

The status of the booking: awaiting_payment, confirmed, cancelled.

pricingobject

The agency-facing price of an offer, a booking or a quote. Every amount is in agencyCurrency; the rate, when the currencies differ, is exchangeRate at the top level of the response.

ShowHide 17 attributes
supplierCurrencystring

ISO 4217 currency in which the supplier prices the fare.

agencyCurrencystring

ISO 4217 currency of your agency. Every amount of the block is in it.

basePricenumberdeprecated

Legacy name, still accepted. Use base_price instead.

The airline's base fare, before taxes, in the agency currency.

base_pricenumber

The airline's base fare, before taxes, in the agency currency. The snake_case twin of basePrice, with the same value: use this name.

taxesAndFeesnumberdeprecated

Legacy name, still accepted. Use taxes_and_fees instead.

Taxes plus the platform's fees, folded together. Excludes your agency commission.

taxes_and_feesnumber

Taxes plus the platform's fees, folded together. Excludes your agency commission. The snake_case twin of taxesAndFees, with the same value: use this name.

agencyCommissionnumberdeprecated

Legacy name, still accepted. Use agency_commission instead.

The commission of your agency on this sale.

agency_commissionnumber

The commission of your agency on this sale. The snake_case twin of agencyCommission, with the same value: use this name.

finalPricenumberdeprecated

Legacy name, still accepted. Use final_price instead.

What the traveler pays: basePrice + taxesAndFees + agencyCommission.

final_pricenumber

What the traveler pays: basePrice + taxesAndFees + agencyCommission. The snake_case twin of finalPrice, with the same value: use this name.

b2bPricenumberdeprecated

Legacy name, still accepted. Use b2b_price instead.

The amount debited from your agency balance: finalPrice - agencyCommission.

b2b_pricenumber

The amount debited from your agency balance: finalPrice - agencyCommission. The snake_case twin of b2bPrice, with the same value: use this name.

totalAmountnumber

Order quote only: an alias of b2bPrice.

taxAmountnumber

Order quote of a Duffel order only: the airline's taxes in your agency currency.

originalTaxAmountnumber

Order quote of a Duffel order only: the same taxes in the supplier currency.

additionalServicesarray of object

Paid extras. A list in the offers of a search (empty for most offers).

acdobject

Whether the fare is an ACD fare. Present on the offers of Amadeus Algeria, absent on Duffel offers. An ACD fare carries more keys with the amounts of the adjustment: they are informational, can change without notice and are not part of the contract.

ShowHide 4 attributes
appliedboolean

true for an ACD fare: the booking needs one passport copy for every traveler, sent with upload_acd_documents. false for an ordinary fare.

scenariostring

Only on an ACD fare: the rule that adjusted the price. Informational.

One of A, B.

exemptboolean

true when the search named an ACD-exempt company of your agency: the fare is priced without ACD.

reasonstring

Only on some ACD fares: why the rule applied. Informational; the wording can change.

paymentStatusobject

Whether and until when the order can be paid.

ShowHide 5 attributes
awaitingPaymentboolean

true for a hold.

paymentRequiredBystringnullable

The payment deadline, when there is one.

priceGuaranteeExpiresAtstringnullable

Until when the price is guaranteed.

priceGuaranteedboolean

Whether the price of the hold is guaranteed.

canPayboolean

Whether pay_order can pay the order now.

liveModeboolean

false in the sandbox.

supplierobject

The supplier of the order.

ShowHide 7 attributes
idstringdeprecated

Legacy name, still accepted. Use supplier_id instead.

Id of the supplier.

supplier_idstring

Id of the supplier. The snake_case twin of id, with the same value: use this name.

technologystring

The technology of the supplier: amadeus_aqc or duffel.

namestringdeprecated

Legacy name, still accepted. Use supplier_name instead.

Name of the supplier.

supplier_namestring

Name of the supplier. The snake_case twin of name, with the same value: use this name.

offerIdstringnullabledeprecated

Legacy name, still accepted. Use supplier_offer_id instead.

The supplier's own id of the offer.

supplier_offer_idstringnullable

The supplier's own id of the offer. The snake_case twin of offerId, with the same value: use this name.

agencyobject

Your agency. The id of the agency is not returned: you know it.

ShowHide 1 attribute
currencystring

ISO 4217 currency of your agency. Every amount of the response is in it.

metaobject

priceGuaranteed, paymentDeadline, canPay.

exchangeRateobjectdeprecated

Legacy name, still accepted. Use exchange_rate instead.

Duffel orders: { rate, marginPercent, fromCurrency, toCurrency }.

exchange_rateobject

Duffel orders: { rate, marginPercent, fromCurrency, toCurrency }. The snake_case twin of exchangeRate, with the same value: use this name.

errorobject

Only when success is false: the refusal of the supplier for get_order_quote.

ShowHide 5 attributes
messagestring

The supplier's message.

codestring

The supplier's code: a number as text for Amadeus (4926), a name for Duffel (order_not_cancellable).

typestring

The supplier's error type.

detailsarray of object

The supplier's details, in its own format.

userMessagestring

A sentence the supplier wrote for the traveler, when there is one.

errorsarray of object

Only when success is false: the unified error list. errors[0].code is the supplier's code in lower case and errors[0].type is supplier_error.

ShowHide 7 attributes
codestring

Stable, machine-readable code in snake_case. Branch on this, never on the message.

typestring

The family of the error: tells you how to react.

One of authentication_error, permission_error, validation_error, not_found, conflict, payment_error, rate_limit_error, supplier_error, internal_error.

titlestring

A short label of the error.

messagestring

A sentence for a human: what is wrong and how to fix it. Wording can change; the code does not.

fieldstringnullable

The request field the error is about, when there is one.

detailsobjectnullable

Structured extras of the error (for example available and required for an insufficient balance).

documentation_urlstring

The documentation of this error code.

Errors

StatusCodeExample message
400bad_requestMissing required parameter: order_id (or booking_id / pnr)
400invalid_booking_id`order_id` is not a valid identifier (letters, digits and - _ . : = ~ only, up to 128 characters).
404not_foundBooking not found for order_id: ZZZZZZ

The shape of the error body depends on the endpoint. See Errors for every shape and code.

Related guides

  • Get an order quote
  • Pay for a held order
  • Booking flows
PreviousBook a flight offerNext Pay a held order and issue the tickets

ยฉ 2026 FX-Port

TermsPrivacy[email protected]