Skip to content
Developer documentation
DEVELOPER DOCSREST v1 • OpenAPI 3.1

Partner API

Flights, hotels, eSIM and transfers: the same keys and conventions, paid from your FlightOTA deposit.

X-Api-Key & X-Api-SecretBDT minor unitsIdempotency-Key

Getting started

EnvironmentBase URLKey prefix
Sandboxhttps://sandbox.flightota.com/api/v1ak_test_
Productionhttps://api.flightota.com/api/v1ak_live_
  1. Get a key in the agent portal under API access, enabled for the product. The secret is shown once.
  2. Whitelist your server's public IP on the key. Never call the API from a browser or app.
  3. Send the two headers on every request. No login call, no token.
  4. Call GET /ping first. It returns your agency code and the IP we saw.
Headers
X-Api-Key: ak_test_your_key_id
X-Api-Secret: <your secret>
Accept: application/json
Content-Type: application/json

Conventions

  • Money is {"amount": <integer minor units>, "currency": "BDT"} in your billing currency. A key with Amounts switched on the API access page gets currency units instead (15161.94).
  • Errors are {"error": {"code": "…", "message": "…"}}. Branch on code.
  • Ignore fields you do not know; new ones are added without notice.
  • Send an Idempotency-Key header when you book or order. The same request with the same key returns what was already made.

Times and ids differ by product; each guide lists its own.

API overview

Errors

Access errors are the same across the products. Each guide lists its own codes.

HTTPerror.codeFix
401unauthenticatedHeaders missing, or key or secret wrong.
401credential_inactiveKey revoked or expired.
403ip_whitelist_required, ip_not_whitelistedWhitelist your server's IP on the key.
403product_not_allowedThe key is not enabled for this product.
403partner_inactive, subscription_*, environment_not_activatedAccount or API plan not active; live keys work after certification.
429rate_limitedWait a minute.

Retries

503, 429 and timeouts are safe to retry. Retry booking only with the same Idempotency-Key.

Updates

There are no webhooks yet. Read the booking to follow it: GET /flights/bookings/{booking_ref}, GET /hotels/bookings/{ref}.

Code examples

Every endpoint has examples in cURL, JavaScript, TypeScript, Python and PHP. Here is an eSIM order:

curl -X POST "https://sandbox.flightota.com/api/v1/esims/orders" \
  -H "X-Api-Key: $FLIGHTOTA_API_KEY" \
  -H "X-Api-Secret: $FLIGHTOTA_API_SECRET" \
  -H "Accept: application/json" \
  -H "Idempotency-Key: sim-7731" \
  -H "Content-Type: application/json" \
  -d '{
  "place_code": "AE",
  "plan_id": "burj-mobile-7days-1gb",
  "quantity": 1,
  "email": "guest@example.com",
  "name": "Arif Rahman",
  "client_reference": "SIM-7731"
}'
Read the eSIM guide