{"openapi":"3.1.0","info":{"title":"Air Travel API","version":"v1","description":"One REST API sells every airline we carry: search, book, ticket, refund and reissue, paid from your FlightOTA deposit. A booking takes five calls: search, confirm the price, read what to send, book, issue. Most fares are held first and issued later from your deposit. Fares marked instant_ticket: true are paid and ticketed in the booking call itself."},"servers":[{"url":"https://api.flightota.com/api/v1","description":"Production"},{"url":"https://sandbox.flightota.com/api/v1","description":"Sandbox"}],"security":[{"X-Api-Key":[],"X-Api-Secret":[]}],"paths":{"/ping":{"get":{"operationId":"flights-ping","summary":"Ping","description":"Call ping first. It tells you which agency and key you are, and the IP we saw, which is the address to whitelist if you get a 403.","tags":["Getting started"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"example":{"ok":true,"partner":"PTR-000020","key_id":"ak_test_your_key_id","environment":"test","from_ip":"203.0.113.10","server_time":"2026-09-22T13:25:02+00:00"}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}}}}},"/flights/search":{"post":{"operationId":"flights-search","summary":"Search flights","description":"Shops every airline source at once and answers in 5–30 seconds. The trip type is simply the number of slices: 1 is one-way, 2 is round trip, 3 to 6 is multi-city. Offers stay bookable for 15 minutes (expires_at).","tags":["Search"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"example":{"search_id":"srh_01m34mpemkpjehfke5rdpwrd8q","expires_at":"2026-09-22T13:40:45Z","currency":"BDT","fares":"standard","passengers":{"adults":1,"children":1,"infants":1},"offers":[{"offer_id":"ofr_01m34mpempz46w64zzecwd3p6z","total":{"amount":9440600,"currency":"BDT"},"price":{"base":{"amount":6417600,"currency":"BDT"},"taxes":{"amount":3023000,"currency":"BDT"},"fees":{"amount":0,"currency":"BDT"},"service_fee":{"amount":0,"currency":"BDT"}},"passenger_prices":[{"type":"adult","code":"ADT","count":1,"base":{"amount":3375700,"currency":"BDT"},"taxes":{"amount":1469200,"currency":"BDT"},"fees":{"amount":0,"currency":"BDT"},"each":{"amount":4844900,"currency":"BDT"},"subtotal":{"amount":4844900,"currency":"BDT"}},{"type":"child","code":"CHD","count":1,"each":{"amount":3804100,"currency":"BDT"},"subtotal":{"amount":3804100,"currency":"BDT"}},{"type":"infant","code":"INF","count":1,"each":{"amount":791600,"currency":"BDT"},"subtotal":{"amount":791600,"currency":"BDT"}}],"passengers":{"adults":1,"children":1,"infants":1},"brand":{"code":"ECONOMY_CLASSIC","name":"ECONOMY CLASSIC","tier":null,"attributes":[{"classification":"CheckedBag","inclusion":"Included"},{"classification":"Refund","inclusion":"Chargeable"}]},"baggage":{"checked":{"pieces":null,"weight_kg":25},"cabin":{"pieces":1,"weight_kg":7}},"baggage_by_passenger":{"adult":{"checked":{"pieces":null,"weight_kg":25},"cabin":{"pieces":1,"weight_kg":7}},"child":{"checked":{"pieces":null,"weight_kg":25},"cabin":{"pieces":1,"weight_kg":7}}},"conditions":{"refundable":true,"changeable":true,"refund_fee":{"amount":1731100,"currency":"BDT"},"change_fee":{"amount":989200,"currency":"BDT"}},"ticketing_deadline":null,"instant_ticket":false,"carrier":"QR","seats_available":9,"itinerary_key":"itn_4267f9d93e7870fb","slices":[{"origin":"DAC","destination":"DXB","duration_minutes":1095,"baggage":{"checked":{"pieces":null,"weight_kg":25},"cabin":{"pieces":1,"weight_kg":7}},"segments":[{"origin":"DAC","destination":"DOH","origin_terminal":"1","destination_terminal":null,"departs_at":"2026-10-22T11:10:00","departs_at_utc":"2026-10-22T05:10:00Z","arrives_at":"2026-10-22T13:50:00","arrives_at_utc":"2026-10-22T10:50:00Z","marketing_carrier":"QR","operating_carrier":"QR","flight_number":"641","aircraft":"77W","cabin":"economy","booking_class":"O","duration_minutes":340,"seats_available":9},{"origin":"DOH","destination":"DXB","departs_at":"2026-10-23T01:05:00","arrives_at":"2026-10-23T03:25:00","marketing_carrier":"QR","operating_carrier":"QR","flight_number":"1002","aircraft":"77W","cabin":"economy","booking_class":"O","duration_minutes":80}]}]}]}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"422":{"description":"validation_failed: See errors, keyed by field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"value":{"error":{"code":"validation_failed","message":"See errors, keyed by field."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}},"503":{"description":"supplier_unavailable: The airline did not answer; nothing changed; retry.\npricing_unavailable: Our pricing is unavailable; retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"supplier_unavailable":{"value":{"error":{"code":"supplier_unavailable","message":"The airline did not answer; nothing changed; retry."}}},"pricing_unavailable":{"value":{"error":{"code":"pricing_unavailable","message":"Our pricing is unavailable; retry."}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["slices[]","slices[].origin","slices[].destination","slices[].departure_date","passengers.adults"],"properties":{"slices[]":{"type":"object","description":"One per flight direction, in travel order."},"slices[].origin":{"type":"object","description":"Origin airport or city."},"slices[].destination":{"type":"object","description":"Destination airport or city."},"slices[].departure_date":{"type":"object","description":"Today or later."},"passengers.adults":{"type":"object","description":"12 years and over."},"passengers.children":{"type":"object","description":"2–11 years on the travel date."},"passengers.infants":{"type":"object","description":"Under 2, on an adult's lap; not more than adults."},"cabin":{"type":"object","description":"Default economy."},"fares":{"type":"object","description":"standard (default): the cheapest fare per itinerary. branded: every fare family (Saver, Classic, Flex…) as its own offer."},"filters.nonstop":{"type":"boolean","description":"Direct flights only."},"filters.carriers[]":{"type":"object","description":"Only these airlines."},"filters.exclude_carriers[]":{"type":"object","description":"Never these airlines."},"filters.max_offers":{"type":"object","description":"Default 50. Caps each source's results, so the combined list can be longer."}}},"example":{"slices":[{"origin":"DAC","destination":"DXB","departure_date":"2026-10-22"}],"passengers":{"adults":1,"children":1,"infants":1},"cabin":"economy","fares":"standard","filters":{"max_offers":20}}}}}}},"/flights/search/{search_id}":{"get":{"operationId":"flights-search-get","summary":"Read a search again","description":"Returns the same search again while it is valid. An expired or unknown id answers 410 offer_expired.","tags":["Search"],"parameters":[{"name":"search_id","in":"path","required":true,"description":"The search id.","schema":{"type":"string"},"example":"srh_01m34mpemkpjehfke5rdpwrd8q"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"example":{"search_id":"srh_01m34mpemkpjehfke5rdpwrd8q","expires_at":"2026-09-22T13:40:45Z","currency":"BDT","fares":"standard","passengers":{"adults":1,"children":1,"infants":1},"offers":[{"offer_id":"ofr_01m34mpempz46w64zzecwd3p6z","total":{"amount":9440600,"currency":"BDT"},"price":{"base":{"amount":6417600,"currency":"BDT"},"taxes":{"amount":3023000,"currency":"BDT"},"fees":{"amount":0,"currency":"BDT"},"service_fee":{"amount":0,"currency":"BDT"}},"passenger_prices":[{"type":"adult","code":"ADT","count":1,"base":{"amount":3375700,"currency":"BDT"},"taxes":{"amount":1469200,"currency":"BDT"},"fees":{"amount":0,"currency":"BDT"},"each":{"amount":4844900,"currency":"BDT"},"subtotal":{"amount":4844900,"currency":"BDT"}},{"type":"child","code":"CHD","count":1,"each":{"amount":3804100,"currency":"BDT"},"subtotal":{"amount":3804100,"currency":"BDT"}},{"type":"infant","code":"INF","count":1,"each":{"amount":791600,"currency":"BDT"},"subtotal":{"amount":791600,"currency":"BDT"}}],"passengers":{"adults":1,"children":1,"infants":1},"brand":{"code":"ECONOMY_CLASSIC","name":"ECONOMY CLASSIC","tier":null,"attributes":[{"classification":"CheckedBag","inclusion":"Included"},{"classification":"Refund","inclusion":"Chargeable"}]},"baggage":{"checked":{"pieces":null,"weight_kg":25},"cabin":{"pieces":1,"weight_kg":7}},"baggage_by_passenger":{"adult":{"checked":{"pieces":null,"weight_kg":25},"cabin":{"pieces":1,"weight_kg":7}},"child":{"checked":{"pieces":null,"weight_kg":25},"cabin":{"pieces":1,"weight_kg":7}}},"conditions":{"refundable":true,"changeable":true,"refund_fee":{"amount":1731100,"currency":"BDT"},"change_fee":{"amount":989200,"currency":"BDT"}},"ticketing_deadline":null,"instant_ticket":false,"carrier":"QR","seats_available":9,"itinerary_key":"itn_4267f9d93e7870fb","slices":[{"origin":"DAC","destination":"DXB","duration_minutes":1095,"baggage":{"checked":{"pieces":null,"weight_kg":25},"cabin":{"pieces":1,"weight_kg":7}},"segments":[{"origin":"DAC","destination":"DOH","origin_terminal":"1","destination_terminal":null,"departs_at":"2026-10-22T11:10:00","departs_at_utc":"2026-10-22T05:10:00Z","arrives_at":"2026-10-22T13:50:00","arrives_at_utc":"2026-10-22T10:50:00Z","marketing_carrier":"QR","operating_carrier":"QR","flight_number":"641","aircraft":"77W","cabin":"economy","booking_class":"O","duration_minutes":340,"seats_available":9},{"origin":"DOH","destination":"DXB","departs_at":"2026-10-23T01:05:00","arrives_at":"2026-10-23T03:25:00","marketing_carrier":"QR","operating_carrier":"QR","flight_number":"1002","aircraft":"77W","cabin":"economy","booking_class":"O","duration_minutes":80}]}]}]}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"410":{"description":"offer_expired: Search again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"offer_expired":{"value":{"error":{"code":"offer_expired","message":"Search again."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}}}}},"/flights/offers/{offer_id}":{"get":{"operationId":"flights-offer","summary":"Read an offer","description":"The offer again, same shape as in search. Read-only; it reserves nothing.","tags":["Offer details"],"parameters":[{"name":"offer_id","in":"path","required":true,"description":"The offer from search, within 15 minutes.","schema":{"type":"string"},"example":"ofr_01m34mpempz46w64zzecwd3p6z"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"example":{"offer":{"offer_id":"ofr_01m34mpempz46w64zzecwd3p6z","…":"same shape as in search"}}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"409":{"description":"offer_unavailable: The airline no longer sells the fare.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"offer_unavailable":{"value":{"error":{"code":"offer_unavailable","message":"The airline no longer sells the fare."}}}}}}},"410":{"description":"offer_expired: Search again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"offer_expired":{"value":{"error":{"code":"offer_expired","message":"Search again."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}}}}},"/flights/offers/{offer_id}/price":{"post":{"operationId":"flights-offer-price","summary":"Confirm the price","description":"The airline confirms the price now. No body. Optional: booking re-prices anyway, but this lets you show a confirmed total before collecting passenger details. If the airline's price moved, you get the offer at its new price under the same offer_id. Booking that id books the new price.","tags":["Offer details"],"parameters":[{"name":"offer_id","in":"path","required":true,"description":"The offer from search, within 15 minutes.","schema":{"type":"string"},"example":"ofr_01m34mpemkpjehfke5rdpwrd8r"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"example":{"status":"confirmed","offer":{"offer_id":"ofr_01m34mpemkpjehfke5rdpwrd8r","total":{"amount":6863200,"currency":"BDT"},"…":"the full offer"}}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"409":{"description":"price_changed: New price attached as offer.\noffer_unavailable: Means the airline no longer sells the fare.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"price_changed":{"value":{"error":{"code":"price_changed","message":"New price attached as offer."}}},"offer_unavailable":{"value":{"error":{"code":"offer_unavailable","message":"Means the airline no longer sells the fare."}}}}}}},"410":{"description":"offer_expired: Means search again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"offer_expired":{"value":{"error":{"code":"offer_expired","message":"Means search again."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}},"503":{"description":"pricing_unavailable: Our pricing is unavailable; retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"pricing_unavailable":{"value":{"error":{"code":"pricing_unavailable","message":"Our pricing is unavailable; retry."}}}}}}}}}},"/flights/offers/{offer_id}/rules":{"get":{"operationId":"flights-offer-rules","summary":"Read fare rules","description":"The fare rules as text. An empty rules list means the airline gave none; conditions on the offer still applies.","tags":["Offer details"],"parameters":[{"name":"offer_id","in":"path","required":true,"description":"The offer from search, within 15 minutes.","schema":{"type":"string"},"example":"ofr_01m34mpemkpjehfke5rdpwrd8r"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"example":{"rules":[{"title":"Changes","text":"Before departure: not permitted.\nAfter departure: not permitted."},{"title":"Refunds","text":"Before departure: not permitted.\nAfter departure: not permitted."},{"title":"Fare family — Economy Basic","text":"Included: 05 Percent Miles Earned, Hand Bag, Food And Beverage.\nFor a fee: Standard Seat Selection, …"}]}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"409":{"description":"offer_unavailable: The airline no longer sells the fare.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"offer_unavailable":{"value":{"error":{"code":"offer_unavailable","message":"The airline no longer sells the fare."}}}}}}},"410":{"description":"offer_expired: Search again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"offer_expired":{"value":{"error":{"code":"offer_expired","message":"Search again."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}}}}},"/flights/offers/{offer_id}/extras":{"get":{"operationId":"flights-offer-extras","summary":"Read extras and what to send","description":"Who the booking must name, and the seats, bags and meals on sale. Call it before building the passenger form: travellers is the exact list the booking must send, in this order and of these types. An empty list means nothing is on sale for that kind, which is common.","tags":["Offer details"],"parameters":[{"name":"offer_id","in":"path","required":true,"description":"The offer from search, within 15 minutes.","schema":{"type":"string"},"example":"ofr_01m34mpempz46w64zzecwd3p6z"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"example":{"offer_id":"ofr_01m34mpempz46w64zzecwd3p6z","travellers":[{"position":1,"type":"adult"},{"position":2,"type":"child"},{"position":3,"type":"infant"}],"travel_dates":{"first":"2026-10-22","last":"2026-10-23"},"infant_min_days":7,"instant_ticket":false,"passenger_requests":{"frequent_flyer":false,"wheelchair":true,"wheelchair_price":null},"extras":{"baggage":[{"id":"anc_01m34…","label":"Extra bag 20 kg (DAC–DXB)","weight_kg":20,"price":{"amount":450000,"currency":"BDT"}}],"seats":[{"origin":"DAC","destination":"DOH","carrier":"QR","flight_number":"641","all_or_none":false,"columns":["A","B","C","D","E","F","G","H","J","K"],"rows":[{"row":"10","seats":[{"id":"anc_01m34n6ehrp4y2xd2b88xznwej","name":"10A","row":"10","column":"A","available":true,"characteristics":["chargeable","bulkhead","window"],"price":{"amount":0,"currency":"BDT"}}]}]}],"meals":[{"origin":"DAC","destination":"DOH","carrier":"QR","flight_number":"all flights","options":[{"id":"anc_01m34mqcj8cxr9j4xv1drv4q9a","code":"BBML","label":"Baby meal","price":{"amount":0,"currency":"BDT"}}]}]}}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"409":{"description":"offer_unavailable: The airline no longer sells the fare.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"offer_unavailable":{"value":{"error":{"code":"offer_unavailable","message":"The airline no longer sells the fare."}}}}}}},"410":{"description":"offer_expired: Search again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"offer_expired":{"value":{"error":{"code":"offer_expired","message":"Search again."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}}}}},"/flights/bookings":{"post":{"operationId":"flights-book","summary":"Book","description":"Reserves the seats. The airline re-prices the offer first; your request names the offer, never a price. Most fares come back held with a hold_expires_at; an instant_ticket fare is paid from your deposit and comes back ticketed.","tags":["Book"],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Unique per booking attempt (your order number works). Reusing a key with a different body answers 409 duplicate_request.","schema":{"type":"string"},"example":"docs-demo-003"}],"responses":{"201":{"description":"Successful response","content":{"application/json":{"example":{"booking":{"booking_ref":"TFL-Y678QNFB","state":"held","created_at":"2026-09-22T13:27:52Z","hold_expires_at":"2026-09-22T21:27:00Z","ticketed_at":null,"client_reference":"DOCS-DEMO-003","airline_reference":"7EAQKO","gds_reference":"HN8TYB","validating_carrier":"QR","route":"DAC → DXB","total":{"amount":9440600,"currency":"BDT"},"price":{"base":{"amount":6417600,"currency":"BDT"},"taxes":{"amount":3023000,"currency":"BDT"},"fees":{"amount":0,"currency":"BDT"}},"travellers":[{"position":1,"type":"adult","title":"MR","given_name":"ARIF","family_name":"RAHMAN","date_of_birth":"1988-05-12","ticket_number":null,"frequent_flyer":{"number":"EK123456","carrier":"EK"},"wheelchair":null},{"position":2,"type":"child","title":"MSTR","given_name":"AYAN","family_name":"RAHMAN","date_of_birth":"2018-09-22","ticket_number":null,"frequent_flyer":null,"wheelchair":{"requested":true,"remark":"Cannot climb stairs"}},{"position":3,"type":"infant","title":"MISS","given_name":"ANAYA","family_name":"RAHMAN","date_of_birth":"2025-10-22","ticket_number":null,"frequent_flyer":null,"wheelchair":null}],"extras":[{"kind":"seat","label":"Seat 10A","traveller":1,"price":{"amount":0,"currency":"BDT"},"added_after_booking":false},{"kind":"baggage","label":"Checked bag 20 kg · DAC–DXB","traveller":1,"price":{"amount":450000,"currency":"BDT"},"added_after_booking":false}],"tickets":[],"slices":[{"origin":"DAC","destination":"DXB","duration_minutes":1095,"segments":["… as in the offer …"]}],"rejection_reason":null,"after_sales":[]},"warnings":[]}}}},"400":{"description":"idempotency_key_required: Send the header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_required":{"value":{"error":{"code":"idempotency_key_required","message":"Send the header."}}}}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"402":{"description":"insufficient_funds: An instant fare your deposit does not cover; balance and shortfall are included.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_funds":{"value":{"error":{"code":"insufficient_funds","message":"An instant fare your deposit does not cover; balance and shortfall are included."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"409":{"description":"price_changed: The response carries offer at the new price; book again to accept.\noffer_unavailable: The fare is gone; pick another offer.\nhold_unavailable: The airline will not hold this fare; it is now instant_ticket: true. Booking again pays and tickets at once.\nduplicate_booking: A passenger already holds a booking on this flight (or the same route and day), with us or refused by the airline. Cancel it before booking again; booking_ref names it when it is yours.\nbooking_limit_reached: A passenger has been booked (and cancelled) on this flight as many times as the airline allows. Nothing was reserved.\nchurn_limit_reached: Most of your recent bookings with this airline ended without a ticket, so new holds with it are paused until tomorrow. Nothing was reserved; an instant-ticket fare can still be booked.\nhold_limit_reached: Your agency has made as many bookings with this airline today as it allows. Book again tomorrow (Asia/Dhaka day).\nduplicate_request: Idempotency-Key reused with a different body.\nrequest_in_progress: The same key is still being booked; read it back shortly.\nbooking_failed: The airline declined; try again or pick another offer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"price_changed":{"value":{"error":{"code":"price_changed","message":"The response carries offer at the new price; book again to accept."}}},"offer_unavailable":{"value":{"error":{"code":"offer_unavailable","message":"The fare is gone; pick another offer."}}},"hold_unavailable":{"value":{"error":{"code":"hold_unavailable","message":"The airline will not hold this fare; it is now instant_ticket: true. Booking again pays and tickets at once."}}},"duplicate_booking":{"value":{"error":{"code":"duplicate_booking","message":"A passenger already holds a booking on this flight (or the same route and day), with us or refused by the airline. Cancel it before booking again; booking_ref names it when it is yours."}}},"booking_limit_reached":{"value":{"error":{"code":"booking_limit_reached","message":"A passenger has been booked (and cancelled) on this flight as many times as the airline allows. Nothing was reserved."}}},"churn_limit_reached":{"value":{"error":{"code":"churn_limit_reached","message":"Most of your recent bookings with this airline ended without a ticket, so new holds with it are paused until tomorrow. Nothing was reserved; an instant-ticket fare can still be booked."}}},"hold_limit_reached":{"value":{"error":{"code":"hold_limit_reached","message":"Your agency has made as many bookings with this airline today as it allows. Book again tomorrow (Asia/Dhaka day)."}}},"duplicate_request":{"value":{"error":{"code":"duplicate_request","message":"Idempotency-Key reused with a different body."}}},"request_in_progress":{"value":{"error":{"code":"request_in_progress","message":"The same key is still being booked; read it back shortly."}}},"booking_failed":{"value":{"error":{"code":"booking_failed","message":"The airline declined; try again or pick another offer."}}}}}}},"410":{"description":"offer_expired: Search again.\nextras_expired: The extras you read have expired. Call /extras again and book with the new ids.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"offer_expired":{"value":{"error":{"code":"offer_expired","message":"Search again."}}},"extras_expired":{"value":{"error":{"code":"extras_expired","message":"The extras you read have expired. Call /extras again and book with the new ids."}}}}}}},"422":{"description":"validation_failed: See errors, keyed by field.\npassenger_name_refused: A passenger name looks made up (TEST, AAA, initials only). Send every name exactly as printed on the passport.\nduplicate_passenger: The same person is on the booking twice. Send each passenger once.\nfrequent_flyer_invalid: The airline rejected a frequent-flyer number.\ndocument_required: The route needs complete passport details.\nextras_invalid: An extra cannot be booked as sent. problems[] names each. Reasons: unknown, no_such_traveller, not_for_traveller, seat_unavailable, seat_taken_twice, two_seats_one_flight, all_or_none.\nwheelchair_unavailable: The airline offers no wheelchair assistance on these flights. Book without it and ask the airline, or pick another offer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"value":{"error":{"code":"validation_failed","message":"See errors, keyed by field."}}},"passenger_name_refused":{"value":{"error":{"code":"passenger_name_refused","message":"A passenger name looks made up (TEST, AAA, initials only). Send every name exactly as printed on the passport."}}},"duplicate_passenger":{"value":{"error":{"code":"duplicate_passenger","message":"The same person is on the booking twice. Send each passenger once."}}},"frequent_flyer_invalid":{"value":{"error":{"code":"frequent_flyer_invalid","message":"The airline rejected a frequent-flyer number."}}},"document_required":{"value":{"error":{"code":"document_required","message":"The route needs complete passport details."}}},"extras_invalid":{"value":{"error":{"code":"extras_invalid","message":"An extra cannot be booked as sent. problems[] names each. Reasons: unknown, no_such_traveller, not_for_traveller, seat_unavailable, seat_taken_twice, two_seats_one_flight, all_or_none."}}},"wheelchair_unavailable":{"value":{"error":{"code":"wheelchair_unavailable","message":"The airline offers no wheelchair assistance on these flights. Book without it and ask the airline, or pick another offer."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["offer_id","travellers[]","travellers[].type","travellers[].title","travellers[].given_name","travellers[].family_name","travellers[].gender","travellers[].date_of_birth","travellers[].nationality","travellers[].document.number","travellers[].document.issuing_country","travellers[].document.expires_on","contact.email","contact.dial_code","contact.mobile"],"properties":{"offer_id":{"type":"string","description":"From search, within 15 minutes."},"travellers[]":{"type":"object","description":"Exactly the list from /extras, same order and type."},"travellers[].type":{"type":"object","description":"The traveller type."},"travellers[].title":{"type":"string","description":"MR, MS, MRS for adults; MSTR, MISS for children and infants."},"travellers[].given_name":{"type":"string","description":"As on the passport; letters, spaces and hyphens only."},"travellers[].family_name":{"type":"string","description":"As on the passport; letters, spaces and hyphens only."},"travellers[].gender":{"type":"object","description":"The traveller's gender."},"travellers[].date_of_birth":{"type":"object","description":"Must fit the type on the travel dates."},"travellers[].nationality":{"type":"string","description":"ISO country code."},"travellers[].document.number":{"type":"string","description":"Passport; must not have expired."},"travellers[].document.issuing_country":{"type":"string","description":"Passport; must not have expired."},"travellers[].document.expires_on":{"type":"object","description":"Passport; must not have expired."},"travellers[].frequent_flyer_number":{"type":"string","description":"Sent to the airline only when /extras says it takes one; otherwise the booking goes ahead without it and says so in warnings."},"travellers[].frequent_flyer_carrier":{"type":"string","description":"The programme's airline code (e.g. EK) when it is not the flight's airline. loyalty: {\"carrier\": \"EK\", \"number\": \"…\"} is accepted as well."},"travellers[].wheelchair":{"type":"object","description":"{ \"requested\": true, \"remark\": \"Cannot walk long distances\" }. Same rule as the frequent-flyer number."},"contact.email":{"type":"string","description":"The passenger contact the airline receives."},"contact.dial_code":{"type":"string","description":"The passenger contact the airline receives. dial_code without + or with it."},"contact.mobile":{"type":"string","description":"The passenger contact the airline receives."},"extras[]":{"type":"array","items":{},"description":"\"<extra id>:<traveller position>\" from /extras. Every one is checked before anything is booked: see extras_invalid."},"client_reference":{"type":"string","description":"Your own reference, up to 64 characters. Returned on the booking and searchable."}}},"example":{"offer_id":"ofr_01m34mpempz46w64zzecwd3p6z","travellers":[{"type":"adult","title":"MR","given_name":"ARIF","family_name":"RAHMAN","gender":"M","date_of_birth":"1988-05-12","nationality":"BD","document":{"type":"passport","number":"A01234567","issuing_country":"BD","expires_on":"2032-09-22"}},{"type":"child","title":"MSTR","given_name":"AYAN","family_name":"RAHMAN","gender":"M","date_of_birth":"2018-09-22","nationality":"BD","document":{"type":"passport","number":"A07654321","issuing_country":"BD","expires_on":"2032-09-22"}},{"type":"infant","title":"MISS","given_name":"ANAYA","family_name":"RAHMAN","gender":"F","date_of_birth":"2025-10-22","nationality":"BD","document":{"type":"passport","number":"A09876543","issuing_country":"BD","expires_on":"2032-09-22"}}],"contact":{"email":"ops@agency.example","dial_code":"880","mobile":"1711000000"},"client_reference":"DOCS-DEMO-003"}}}}},"get":{"operationId":"flights-bookings-list","summary":"List bookings","description":"Newest first, 25 a page.","tags":["Ticket, read and cancel"],"parameters":[{"name":"state","in":"query","required":false,"description":"held, ticketed, cancelled…","schema":{"type":"string"},"example":"held"},{"name":"client_reference","in":"query","required":false,"description":"Your own reference.","schema":{"type":"string"}},{"name":"created_from","in":"query","required":false,"description":"Created on or after this date.","schema":{"type":"object","description":"YYYY-MM-DD"}},{"name":"created_to","in":"query","required":false,"description":"Created on or before this date.","schema":{"type":"object","description":"YYYY-MM-DD"}},{"name":"page","in":"query","required":false,"description":"The page.","schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"description":"per_page up to 100.","schema":{"type":"integer"},"example":5}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"example":{"bookings":[{"booking_ref":"TFL-Y678QNFB","state":"held","…":"…"}],"page":1,"per_page":5,"total":1,"last_page":1}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"422":{"description":"validation_failed: See errors, keyed by field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_failed":{"value":{"error":{"code":"validation_failed","message":"See errors, keyed by field."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}}}}},"/flights/bookings/{booking_ref}":{"get":{"operationId":"flights-booking-get","summary":"Read one booking","description":"Returns the booking in the shape shown under Book, and is always the source of truth. In place of the booking_ref you may send the booking's airline_reference (the airline PNR) or gds_reference; if a PNR was booked again after a release, the live booking is returned, else the newest. A reference that is not yours answers 404 booking_not_found.","tags":["Ticket, read and cancel"],"parameters":[{"name":"booking_ref","in":"path","required":true,"description":"The booking_ref, airline_reference or gds_reference.","schema":{"type":"string"},"example":"TFL-Y678QNFB"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"example":{"booking":{"booking_ref":"TFL-Y678QNFB","state":"held","…":"the shape shown under Book"}}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"404":{"description":"booking_not_found: Unknown, or not your agency's.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"booking_not_found":{"value":{"error":{"code":"booking_not_found","message":"Unknown, or not your agency's."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}}}}},"/flights/bookings/{booking_ref}/issue":{"post":{"operationId":"flights-issue","summary":"Issue tickets","description":"Pays a held booking from your deposit and tickets it. Issue before hold_expires_at; we release unpaid holds a few minutes before it (5 by default). We ask the airline first whether the reservation still stands at the agreed price. If the fare changed, the call is refused with the new price and nothing is charged; to accept, call again with that exact figure. A 202 status: ticketing means paid, the airline is still issuing: read the booking every 30 seconds until ticketed or rejected.","tags":["Ticket, read and cancel"],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Retry issuing only with the same Idempotency-Key.","schema":{"type":"string"},"example":"docs-demo-003-issue"},{"name":"booking_ref","in":"path","required":true,"description":"The booking reference, TFL-XXXXXXXX.","schema":{"type":"string"},"example":"TFL-Y678QNFB"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"example":{"status":"ticketed","booking":{"booking_ref":"TFL-Y678QNFB","state":"ticketed","ticketed_at":"2026-09-22T13:28:45Z","airline_reference":"7EAQKO","gds_reference":"HN8TYB","total":{"amount":9440600,"currency":"BDT"},"tickets":[{"position":1,"number":"1572134359166","issued_at":"2026-09-22T13:28:45Z"},{"position":2,"number":"1572134359165","issued_at":"2026-09-22T13:28:45Z"},{"position":3,"number":"1572134359167","issued_at":"2026-09-22T13:28:45Z"}],"…":"the rest of the booking, with ticket_number on each traveller"}}}}},"202":{"description":"ticketing","content":{"application/json":{"example":{"status":"ticketing","booking":{"booking_ref":"TFL-Y678QNFB","state":"ticketing","…":"…"}}}}},"400":{"description":"idempotency_key_required: Send the header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_required":{"value":{"error":{"code":"idempotency_key_required","message":"Send the header."}}}}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"402":{"description":"insufficient_funds: Top up; balance and shortfall included. Nothing charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_funds":{"value":{"error":{"code":"insufficient_funds","message":"Top up; balance and shortfall included. Nothing charged."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"409":{"description":"fare_changed: Carries new_total; send accept_fare_change with expected_total to accept.\nhold_invalid: The airline no longer holds the seats; book again.\nticketing_rejected: The airline declined; the amount is returned to your deposit.\ninvalid_state: Not a held booking (for example expired or cancelled).\nrequest_in_progress: The same request is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"fare_changed":{"value":{"error":{"code":"fare_changed","message":"Carries new_total; send accept_fare_change with expected_total to accept."}}},"hold_invalid":{"value":{"error":{"code":"hold_invalid","message":"The airline no longer holds the seats; book again."}}},"ticketing_rejected":{"value":{"error":{"code":"ticketing_rejected","message":"The airline declined; the amount is returned to your deposit."}}},"invalid_state":{"value":{"error":{"code":"invalid_state","message":"Not a held booking (for example expired or cancelled)."}}},"request_in_progress":{"value":{"error":{"code":"request_in_progress","message":"The same request is still running."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}},"503":{"description":"supplier_unavailable: Nothing charged; retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"supplier_unavailable":{"value":{"error":{"code":"supplier_unavailable","message":"Nothing charged; retry."}}}}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"accept_fare_change":{"type":"boolean","description":"To accept a changed fare, call again with this set to true."},"expected_total":{"type":"object","description":"The exact new_total from fare_changed."}}},"example":{}}}}}},"/flights/bookings/{booking_ref}/cancel":{"post":{"operationId":"flights-cancel","summary":"Cancel a hold","description":"Releases held seats; nothing is charged. A ticketed booking is not cancelled; void or refund it. If the airline does not confirm the release, the booking stays held and you get 503 supplier_unavailable; retry, or let it lapse. Some airline test systems never release unpaid holds; on the sandbox those lapse on their own.","tags":["Ticket, read and cancel"],"parameters":[{"name":"booking_ref","in":"path","required":true,"description":"The booking reference, TFL-XXXXXXXX.","schema":{"type":"string"},"example":"TFL-Y678QNFB"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"example":{"status":"cancelled","booking":{"booking_ref":"TFL-…","state":"cancelled","…":"…"}}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"404":{"description":"booking_not_found: Unknown, or not your agency's.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"booking_not_found":{"value":{"error":{"code":"booking_not_found","message":"Unknown, or not your agency's."}}}}}}},"409":{"description":"invalid_state: Not allowed in the booking's current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_state":{"value":{"error":{"code":"invalid_state","message":"Not allowed in the booking's current state."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}},"503":{"description":"supplier_unavailable: The airline did not answer; nothing changed; retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"supplier_unavailable":{"value":{"error":{"code":"supplier_unavailable","message":"The airline did not answer; nothing changed; retry."}}}}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"reason":{"type":"string","description":"Body optional."}}},"example":{"reason":"Customer changed plans"}}}}}},"/flights/bookings/{booking_ref}/extras":{"get":{"operationId":"flights-booking-extras-get","summary":"Read extras after booking","description":"What can be added now, each with its id and price. Bags, meals and seats the airline still sells on a booking that is held or ticketed. Not every airline sells extras after booking; available: false says so.","tags":["Extras after booking"],"parameters":[{"name":"booking_ref","in":"path","required":true,"description":"The booking reference, TFL-XXXXXXXX.","schema":{"type":"string"},"example":"TFL-Y678QNFB"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"example":{"booking_ref":"TFL-Y678QNFB","available":true,"travellers":[{"position":1,"type":"adult"},{"position":2,"type":"child"}],"extras":{"baggage":[{"id":"anc_01m3…","label":"Checked bag 10 kg","weight_kg":10,"price":{"amount":250000,"currency":"BDT"}}],"seats":[],"meals":[]}}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"404":{"description":"booking_not_found: Unknown, or not your agency's.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"booking_not_found":{"value":{"error":{"code":"booking_not_found","message":"Unknown, or not your agency's."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}}}},"post":{"operationId":"flights-booking-extras-post","summary":"Buy extras after booking","description":"Buy them from your deposit. On a ticketed booking the extras are paid from your deposit at once (charged). On a held booking nothing is taken now: charged is zero, pay_at_issue is true, and added_to_total is added to booking.total, which you pay once when you issue. The same request with the same key answers 200 with the same body and buys nothing more.","tags":["Extras after booking"],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"The same request with the same key answers 200 with the same body and buys nothing more.","schema":{"type":"string"},"example":"po-4471-extras-1"},{"name":"booking_ref","in":"path","required":true,"description":"The booking reference, TFL-XXXXXXXX.","schema":{"type":"string"},"example":"TFL-Y678QNFB"}],"responses":{"201":{"description":"Successful response","content":{"application/json":{"example":{"status":"added","charged":{"amount":250000,"currency":"BDT"},"added_to_total":{"amount":250000,"currency":"BDT"},"pay_at_issue":false,"booking":{"…":"…"}}}}},"400":{"description":"idempotency_key_required: Send the header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_required":{"value":{"error":{"code":"idempotency_key_required","message":"Send the header."}}}}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"402":{"description":"insufficient_funds: Top up; balance and shortfall are included.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_funds":{"value":{"error":{"code":"insufficient_funds","message":"Top up; balance and shortfall are included."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"409":{"description":"extras_refused: The airline did not add them; nothing was charged.\nextras_not_available: Not held or ticketed, a request is open on it, or the airline sells none after booking.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"extras_refused":{"value":{"error":{"code":"extras_refused","message":"The airline did not add them; nothing was charged."}}},"extras_not_available":{"value":{"error":{"code":"extras_not_available","message":"Not held or ticketed, a request is open on it, or the airline sells none after booking."}}}}}}},"422":{"description":"extras_invalid: An id is not on sale for this booking now (unknown[] lists them); read the extras again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"extras_invalid":{"value":{"error":{"code":"extras_invalid","message":"An id is not on sale for this booking now (unknown[] lists them); read the extras again."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["extras[]"],"properties":{"extras[]":{"type":"array","items":{},"description":"\"<extra id>:<traveller position>\" from the extras read above."}}},"example":{"extras":["anc_01m3…:1"]}}}}}},"/flights/bookings/{booking_ref}/refund-quote":{"get":{"operationId":"flights-refund-quote","summary":"Read a refund quote","description":"Changes nothing. refund is what the airline returns, penalties what it keeps, service_charge our handling fee, net what reaches your deposit. When the airline cannot quote by itself you get {\"available\": false}, and the refund goes to our desk, which quotes it by hand.","tags":["After-sales"],"parameters":[{"name":"booking_ref","in":"path","required":true,"description":"The booking reference, TFL-XXXXXXXX.","schema":{"type":"string"},"example":"TFL-Y678QNFB"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"example":{"available":true,"refund":{"amount":2200000,"currency":"BDT"},"penalties":{"amount":800000,"currency":"BDT"},"service_charge":{"amount":100000,"currency":"BDT"},"net":{"amount":2100000,"currency":"BDT"},"tickets":["1572134359166"]}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"404":{"description":"booking_not_found: Unknown, or not your agency's.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"booking_not_found":{"value":{"error":{"code":"booking_not_found","message":"Unknown, or not your agency's."}}}}}}},"409":{"description":"invalid_state: Only a ticketed booking can be voided, refunded or reissued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_state":{"value":{"error":{"code":"invalid_state","message":"Only a ticketed booking can be voided, refunded or reissued."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}}}}},"/flights/bookings/{booking_ref}/refund":{"post":{"operationId":"flights-refund","summary":"Request a refund","description":"auto (default): the airline quotes, we accept for you and settle; the answer's request.status is completed and net is in your deposit. If the airline will not answer, the request falls back to our desk (mode: manual, status: requested). manual: straight to our desk. We quote; you accept or decline with POST /quote.","tags":["After-sales"],"parameters":[{"name":"booking_ref","in":"path","required":true,"description":"The booking reference, TFL-XXXXXXXX.","schema":{"type":"string"},"example":"TFL-Y678QNFB"}],"responses":{"202":{"description":"Successful response","content":{"application/json":{"example":{"request":{"…":"…"},"booking":{"…":"…"}}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"409":{"description":"invalid_state: Only a ticketed booking can be voided, refunded or reissued.\nrequest_open: One request at a time; wait for the open one.\nnot_settled: The airline quoted but settlement failed; our desk has it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_state":{"value":{"error":{"code":"invalid_state","message":"Only a ticketed booking can be voided, refunded or reissued."}}},"request_open":{"value":{"error":{"code":"request_open","message":"One request at a time; wait for the open one."}}},"not_settled":{"value":{"error":{"code":"not_settled","message":"The airline quoted but settlement failed; our desk has it."}}}}}}},"422":{"description":"special_fare: This fare cannot be refunded or changed (for example a group fare).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"special_fare":{"value":{"error":{"code":"special_fare","message":"This fare cannot be refunded or changed (for example a group fare)."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"mode":{"type":"object","description":"Default auto."},"reason":{"type":"string","description":"Why the refund is requested."}}},"example":{"mode":"auto","reason":"Trip cancelled"}}}}}},"/flights/bookings/{booking_ref}/void":{"post":{"operationId":"flights-void","summary":"Void tickets","description":"A void cancels the tickets inside the airline's void window, which ends at 23:59 on the day of issue (Asia/Dhaka, UTC+06:00 time). The option closes 5 minutes before that; a later void answers 409 void_window_closed, and a refund is the way instead. Voided at once: request.mode is auto, request.status is completed and the booking is cancelled, with the fare less our void charge back in your deposit. Voided by our desk: request.mode is manual and request.status is requested until it is done.","tags":["After-sales"],"parameters":[{"name":"booking_ref","in":"path","required":true,"description":"The booking reference, TFL-XXXXXXXX.","schema":{"type":"string"},"example":"TFL-Y678QNFB"}],"responses":{"202":{"description":"Successful response","content":{"application/json":{"example":{"request":{"request_id":"01a0c94e-618a-71c6-81bc-19d403d07a93","kind":"void","status":"requested","mode":"manual","…":"…"},"booking":{"booking_ref":"TFL-Y678QNFB","state":"ticketed","after_sales":[{"kind":"void","status":"requested","…":"…"}],"…":"…"}}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"409":{"description":"invalid_state: Only a ticketed booking can be voided, refunded or reissued.\nrequest_open: One request at a time; wait for the open one.\nvoid_window_closed: The void window has closed; request a refund instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_state":{"value":{"error":{"code":"invalid_state","message":"Only a ticketed booking can be voided, refunded or reissued."}}},"request_open":{"value":{"error":{"code":"request_open","message":"One request at a time; wait for the open one."}}},"void_window_closed":{"value":{"error":{"code":"void_window_closed","message":"The void window has closed; request a refund instead."}}}}}}},"422":{"description":"special_fare: This fare cannot be refunded or changed (for example a group fare).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"special_fare":{"value":{"error":{"code":"special_fare","message":"This fare cannot be refunded or changed (for example a group fare)."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"reason":{"type":"string","description":"Body optional."}}},"example":{}}}}}},"/flights/bookings/{booking_ref}/reissue/search":{"post":{"operationId":"flights-reissue-search","summary":"Search reissue flights","description":"The traveller positions moving and one date per leg of the booking (a round trip needs two dates). exchanges: true means the airline reissues by itself and the offers are its exchange fares; false means the offers are the airline's current fares and our desk does the reissue.","tags":["After-sales"],"parameters":[{"name":"booking_ref","in":"path","required":true,"description":"The booking reference, TFL-XXXXXXXX.","schema":{"type":"string"},"example":"TFL-Y678QNFB"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"example":{"exchanges":false,"travellers":[1,2,3],"dates":["2026-10-29"],"offers":[{"offer_id":"ofr_01m34mwr1a0zywbzyex186g74n","carrier":"QR","total":{"amount":9242700,"currency":"BDT"},"slices":["…"],"…":"offer shape as in search"}]}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"409":{"description":"invalid_state: Only a ticketed booking can be voided, refunded or reissued.\nrequest_open: One request at a time; wait for the open one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_state":{"value":{"error":{"code":"invalid_state","message":"Only a ticketed booking can be voided, refunded or reissued."}}},"request_open":{"value":{"error":{"code":"request_open","message":"One request at a time; wait for the open one."}}}}}}},"422":{"description":"special_fare: This fare cannot be refunded or changed (for example a group fare).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"special_fare":{"value":{"error":{"code":"special_fare","message":"This fare cannot be refunded or changed (for example a group fare)."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}},"503":{"description":"supplier_unavailable: The airline did not answer; nothing changed; retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"supplier_unavailable":{"value":{"error":{"code":"supplier_unavailable","message":"The airline did not answer; nothing changed; retry."}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["travellers","dates"],"properties":{"travellers":{"type":"array","items":{},"description":"The traveller positions moving."},"dates":{"type":"array","items":{},"description":"One date per leg of the booking (a round trip needs two dates)."}}},"example":{"travellers":[1,2,3],"dates":["2026-10-29"]}}}}}},"/flights/bookings/{booking_ref}/reissue":{"post":{"operationId":"flights-reissue","summary":"Ask for a reissue","description":"Within 30 minutes of the reissue search. With exchanges: true the airline quotes at once: request.status is quoted and request.quote is the total charge (fare difference, airline change fee and our service charge; quote_note itemises it). Otherwise our desk quotes.","tags":["After-sales"],"parameters":[{"name":"booking_ref","in":"path","required":true,"description":"The booking reference, TFL-XXXXXXXX.","schema":{"type":"string"},"example":"TFL-Y678QNFB"}],"responses":{"202":{"description":"Successful response","content":{"application/json":{"example":{"request":{"…":"…"},"booking":{"…":"…"}}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"409":{"description":"invalid_state: Only a ticketed booking can be voided, refunded or reissued.\nrequest_open: One request at a time; wait for the open one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_state":{"value":{"error":{"code":"invalid_state","message":"Only a ticketed booking can be voided, refunded or reissued."}}},"request_open":{"value":{"error":{"code":"request_open","message":"One request at a time; wait for the open one."}}}}}}},"422":{"description":"special_fare: This fare cannot be refunded or changed (for example a group fare).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"special_fare":{"value":{"error":{"code":"special_fare","message":"This fare cannot be refunded or changed (for example a group fare)."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["offer_id"],"properties":{"offer_id":{"type":"string","description":"An offer from the reissue search."},"mode":{"type":"object","description":"How the reissue is handled."},"remark":{"type":"string","description":"A note on the change."}}},"example":{"offer_id":"ofr_01m34mwr1a0zywbzyex186g74n","mode":"auto","remark":"Passenger moves to 29 Oct"}}}}}},"/flights/bookings/{booking_ref}/quote":{"post":{"operationId":"flights-quote","summary":"Accept or decline a quote","description":"Before quote_expires_at. Accepting a reissue charges your deposit and, when the airline quoted it, reissues on the spot: request.status becomes completed and the booking carries the new ticket numbers and flights. {\"accept\": false, \"reason\": \"…\"} declines and the tickets stay as they are. 402 insufficient_funds means top up and accept again before the quote expires.","tags":["After-sales"],"parameters":[{"name":"booking_ref","in":"path","required":true,"description":"The booking reference, TFL-XXXXXXXX.","schema":{"type":"string"},"example":"TFL-Y678QNFB"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"example":{"request":{"…":"…"},"booking":{"…":"…"}}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"402":{"description":"insufficient_funds: Deposit too low; nothing charged. balance and shortfall are included.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_funds":{"value":{"error":{"code":"insufficient_funds","message":"Deposit too low; nothing charged. balance and shortfall are included."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"409":{"description":"no_quote: Nothing is waiting for an answer.\nquote_expired: Ask again for a fresh quote.\nnot_settled: The airline quoted but settlement failed; our desk has it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_quote":{"value":{"error":{"code":"no_quote","message":"Nothing is waiting for an answer."}}},"quote_expired":{"value":{"error":{"code":"quote_expired","message":"Ask again for a fresh quote."}}},"not_settled":{"value":{"error":{"code":"not_settled","message":"The airline quoted but settlement failed; our desk has it."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["accept"],"properties":{"accept":{"type":"boolean","description":"true accepts, false declines."},"reason":{"type":"string","description":"Why the quote is declined."}}},"example":{"accept":true}}}}}},"/account/balance":{"get":{"operationId":"flights-balance","summary":"Read the deposit balance","description":"Check it before issuing large bookings; an issue your deposit cannot cover answers 402 insufficient_funds and charges nothing. Top up in the agent portal under Deposit.","tags":["Deposit"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"example":{"partner_code":"PTR-000020","currency":"BDT","balance":{"amount":20000000,"currency":"BDT"}}}}},"401":{"description":"unauthenticated: Headers missing, or key or secret wrong.\ncredential_inactive: The key was revoked or expired; issue a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"value":{"error":{"code":"unauthenticated","message":"Headers missing, or key or secret wrong."}}},"credential_inactive":{"value":{"error":{"code":"credential_inactive","message":"The key was revoked or expired; issue a new one."}}}}}}},"403":{"description":"ip_whitelist_required: Add your server's public IP to the key.\nip_not_whitelisted: This server's IP is not on the key; GET /ping from it shows the IP.\nproduct_not_allowed: The key is not enabled for flights.\npartner_inactive: Your agency account is suspended or pending.\nsubscription_required: API plan not active; see API access in the portal.\nsubscription_pending: API plan not active; see API access in the portal.\nsubscription_suspended: API plan not active; see API access in the portal.\nsubscription_cancelled: API plan not active; see API access in the portal.\nenvironment_not_activated: Live keys work after certification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"ip_whitelist_required":{"value":{"error":{"code":"ip_whitelist_required","message":"Add your server's public IP to the key."}}},"ip_not_whitelisted":{"value":{"error":{"code":"ip_not_whitelisted","message":"This server's IP is not on the key; GET /ping from it shows the IP."}}},"product_not_allowed":{"value":{"error":{"code":"product_not_allowed","message":"The key is not enabled for flights."}}},"partner_inactive":{"value":{"error":{"code":"partner_inactive","message":"Your agency account is suspended or pending."}}},"subscription_required":{"value":{"error":{"code":"subscription_required","message":"API plan not active; see API access in the portal."}}},"subscription_pending":{"value":{"error":{"code":"subscription_pending","message":"API plan not active; see API access in the portal."}}},"subscription_suspended":{"value":{"error":{"code":"subscription_suspended","message":"API plan not active; see API access in the portal."}}},"subscription_cancelled":{"value":{"error":{"code":"subscription_cancelled","message":"API plan not active; see API access in the portal."}}},"environment_not_activated":{"value":{"error":{"code":"environment_not_activated","message":"Live keys work after certification."}}}}}}},"429":{"description":"rate_limited: Slow down; wait a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Slow down; wait a minute."}}}}}}}}}}},"components":{"securitySchemes":{"X-Api-Key":{"type":"apiKey","in":"header","name":"X-Api-Key"},"X-Api-Secret":{"type":"apiKey","in":"header","name":"X-Api-Secret"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"}}}}}}}}