POST /api/v1/flights/price_flight
Price a cached flight offer to confirm the current fare. Required before booking — book_flight reads the priced offer from this cache.
Price a cached offer to get the current, confirmed fare. This step is required before
calling book_flight. book_flight reads the priced offer from cache; booking without
pricing first will fail.
Permission: Read
Use the supplier-level searchId from suppliers[n].searchId, not the top-level requestId.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
search_id | string | Yes | searchId from the supplier entry in the search response |
offer_id | string | Yes | Offer id from the search results |
Request example
curl --request POST \
--url https://api.fx-port.com/api/v1/flights/price_flight \
--header 'Authorization: Bearer fxp_live_YOUR_KEY' \
--header 'Content-Type: application/json' \
--data '{
"search_id": "fs_9fa52bad-a7be-42aa-9ad6-d3f9fa642dc3",
"offer_id": "fx_offer_a1b2c3d4"
}'Response example
exchangeRate appears at the top level when supplier and agency currencies differ.
The pricing block never contains an exchange rate field.
{
"success": true,
"environment": "sandbox",
"requestId": "a1b2c3d4",
"offerId": "fx_offer_a1b2c3d4",
"offerType": "flight_offer",
"supplierCurrency": "USD",
"agencyCurrency": "DZD",
"exchangeRate": 250.0,
"processingTime": 1.2,
"results": {
"offers": [
{
"id": "fx_offer_a1b2c3d4",
"type": "flight_offer",
"supplier": {
"id": "duffel_1",
"name": "Duffel"
},
"supportHold": false,
"supportVoid": false,
"voidDeadline": null,
"bookableSeats": 9,
"pricing": {
"supplierCurrency": "USD",
"agencyCurrency": "DZD",
"basePrice": 6170.0,
"taxesAndFees": 4926.8,
"agencyCommission": 11.1,
"finalPrice": 11107.9,
"b2bPrice": 11096.8,
"additionalServices": []
},
"travelerPricing": [
{
"travelerId": "1",
"travelerType": "ADULT",
"price": {
"supplierCurrency": "USD",
"agencyCurrency": "DZD",
"base": 4800.0,
"total": 11107.9,
"b2bPrice": 11096.8
}
}
],
"conditions": {
"refundBeforeDeparture": { "allowed": true },
"changeBeforeDeparture": { "allowed": true }
}
}
]
}
}supportHold and voidDeadline are inside the offer in the results.offers[0] array, not
at the top level. Check them here before deciding whether to book as hold or issue.
If the offer expired between search and pricing, you get HTTP 410 with "error": "offer_expired".
Re-run the search to get a fresh offer.
See Flight pricing for what each price field means.