B2B Flight Booking API (1.0.0)

Download OpenAPI specification:

API Support: technology@infotek.ae

Our Flights API gives you a complete B2B gateway for searching, pricing, booking, and managing flight inventory with precision. It connects your system to real-time availability, rich flight content, multi-fare handling, instant confirmations, and full booking lifecycle controls.

Built for speed, stability, and clean integration, it lets your platform deliver consistent results, automate operations, and scale without friction. Whether you are powering a B2B portal, a mobile app, or a distribution engine, this API provides the structure you need to move fast, stay reliable, and serve your customers with confidence.

What this API covers

Area What it does Endpoints
Airport Autocomplete Find airports while the user types Airports Autocomplete
Booking Flow Search, price, book, hold, pay and issue tickets Search, Collect Results, Fare Families, Check Availability, Fare Rules, Create Order, Hold, Pay and Issue Ticket, Booking Details
Balance Check your agency balance before paying Get Balance
Void Ticket Cancel freshly issued tickets with a refund to your balance Booking Details, Validate Void, Void Ticket

1. Airport Autocomplete

Send what the user types (airport code, airport, city or country name) and show the matching airports. Use the selected airport's IATA_CODE as departure / arrival in Search. No token needed.

User types "cai" ──▶ Airports Autocomplete ──▶ CAI · Cairo International Airport
                                                        │
                                                        ▼  IATA_CODE
                                              Search Flights (departure: CAI)

2. Booking Flow

Search returns priced offers (itineraries), either all at once or progressively with mode: poll and Collect Results. Pick one, optionally choose a branded fare and read its fare rules, confirm the price with Check Availability (its response has the exact trip that will be booked; use it instead of the search result for baggage, fare basis and fare type), then create the order with the passengers. Creating the order only saves it; the PNR and tickets come from the next step. Hold it without payment if the itinerary allows (can_hold), or pay and issue the tickets right away. Ticketing runs in the background, so poll Booking Details until the PNR and tickets appear.

┌─────────────────┐
│  Search Flights │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Fare Families   │ (Optional - if has_fare_families=true)
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│Check Availability│
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│   Fare Rules    │ (Optional)
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Create Order    │
└────────┬────────┘
         │
         ▼
┌─────────────────────────┐
│ Hold Booking (Optional) │
└────────┬────────────────┘
         │
         ▼
┌─────────────────┐
│ Pay & Issue     │
│ Ticket          │
└────────┬────────┘
         │
         ▼
┌─────────────────────────────────┐
│ Poll Booking Details            │
│ (every 10 min for 2 hours)      │
└────────┬────────────────────────┘
         │
         ▼
┌─────────────────┐
│ PNR & Tickets   │
│ Generated       │
└─────────────────┘

Booking status polling

After payment (Pay and Issue Ticket), you must poll the Booking Details endpoint to retrieve the final booking status:

┌──────────────┐     ┌─────────────────┐     ┌──────────────────┐
│ PayAndIssue  │────▶│  Poll Booking   │────▶│  Check Status    │
│ Ticket       │     │  Details        │     │                  │
└──────────────┘     └─────────────────┘     └────────┬─────────┘
                                                      │
                     ┌────────────────────────────────┼────────────────────────────────┐
                     │                                │                                │
                     ▼                                ▼                                ▼
              ┌──────────────┐               ┌──────────────┐               ┌──────────────────┐
              │ PNR & Ticket │               │  Processing  │               │ No PNR/Ticket    │
              │ Generated    │               │  (Continue   │               │ after 2 hours    │
              │ (Confirmed)  │               │   Polling)   │               │                  │
              └──────────────┘               └──────────────┘               └────────┬─────────┘
                                                                                     │
                                                                                     ▼
                                                                            ┌──────────────────┐
                                                                            │ Mark unconfirmed │
                                                                            │ Contact Supplier │
                                                                            └──────────────────┘
  • Polling Frequency: Once every 10 minutes
  • Polling Duration: Continue for 2 hours
  • Success Indicators: PNR and Tickets generated
  • Unconfirmed Status: If no PNR/Tickets after 2 hours, mark as "unconfirmed" and contact supplier

3. Balance

Bookings are paid from your agency balance (in your agency currency). Check it before Pay and Issue Ticket to avoid a payment failure.

Get Balance ──▶ balance ≥ itinerary price? ──yes──▶ Pay and Issue Ticket
                          │
                          no ──▶ top up your balance first

4. Void Ticket

A freshly issued ticket can be voided (cancelled as if never issued) within the airline's void window, usually the day of issue. The ticket amount is refunded to your balance minus the void fee and any airline penalties. Not every ticket can be voided through the API; Booking Details tells you which ones can.

Booking Details
      │
      ▼
order.available_actions has { action: "void", product_id }?
      │
      ├── no ──▶ the ticket can't be voided through the API
      │
      └── yes ─▶ Validate Void (optional, shows the void fee)
                       │
                       ▼
                 Void Ticket (product_id) ──▶ refund to your balance

Authentication

All API endpoints require Bearer Token authentication. Each request must include a valid token in the header to ensure secure and authorized access.

Example:

Authorization: Bearer 9f12c3ab-47c8-4e91-bd84-2c7a1f83b6d1

API Versions

Endpoints are served by different services, so their paths carry different prefixes (/api/v1/agency/..., /api/v1/..., /api/v2/...). Use each path exactly as documented; the prefixes are not interchangeable.

Errors

Error responses are JSON with at least a message field. Validation errors (422) also include an errors object keyed by field name.

Account Enablement

Get Balance, Validate Void and Void Ticket must be enabled for your account. If they return 403, contact your account manager.

Environments

  • Test bookings: send live_booking: false in Create Order. Test bookings go through the full flow but are never booked with the airline; their PNR starts with TEST-.
  • Live bookings: send live_booking: true.
  • Not sent: your account environment decides: live for accounts enabled for live bookings, test otherwise. Accounts not enabled for live bookings always make test bookings.

Autocomplete

Airport lookup for building the search form. Use the returned IATA_CODE as departure/arrival in Search Flights.

Airports Autocomplete

Searches airports by code, name, city or country. No authentication is required.

Typical use: send what the user typed as q and show the hits. Use IATA_CODE (also returned as code) in Search Flights.

filter examples:

  • by country: country_code = "EG"
  • by airport code: IATA_CODE = "CAI"
Request Body schema: application/json
required
q
string

Text typed by the user (code, airport, city or country name)

filter
string

Filter expression, e.g. country_code = "EG" or IATA_CODE = "CAI"

sort
Array of strings

Sort rules, e.g. ["order:desc"] to rank preferred airports first

limit
integer
Default: 20
offset
integer
Default: 0

Responses

Request samples

Content type
application/json
{
  • "q": "CAI",
  • "sort": [
    ]
}

Response samples

Content type
application/json
{
  • "hits": [
    ],
  • "query": "",
  • "limit": 20,
  • "offset": 0,
  • "estimatedTotalHits": 1000,
  • "processingTimeMs": 0
}

Flights

Search, fare families, availability and fare rules.

Search Flights

Searches all airlines and suppliers enabled for your agency and returns every bookable offer for the requested route, dates and passengers. Supports one-way (O), round-trip (R) and multi-city (M) searches.

Search modes

Set mode in the request:

  • search (default): the response arrives once every supplier has answered, with the full results.
  • poll: the response arrives immediately with the search_id and no results yet. Call Collect Results with that search_id every 2-3 seconds; each call returns everything found so far (not just the new results), so replace what you show each time. Stop when status is completed (at the latest about 60 seconds after the search).
Search (mode: poll) ──▶ search_id, status: progress
        │
        ▼
Collect Results ──▶ status: progress ──▶ show results, wait 2-3 s, call again
        │
        └──────────▶ status: completed ──▶ final results, stop polling

Polling shows the first results within seconds instead of waiting for the slowest supplier.

Filters

Narrow the results with the optional filters object:

  • direct_only: true returns only non-stop itineraries (every trip is a single flight).
  • airlines: ["SV", "MS"] returns only itineraries operated entirely by those airlines.

Filters are applied to every supplier's results. Combine them as needed, e.g. direct flights on one airline.

How the response is organized

The response is split into itineraries (the offers you show and sell) and aggregations (shared reference data). To keep the payload small, an itinerary does not repeat flight or rule details. It lists their ids, and you look them up in aggregations.

Search response
├── search_id ─────────────────────► pass as {search_id} to every next call
│
├── itineraries[]                    one bookable offer each
│   ├── id ────────────────────────► pass as {itinerary_id} to every next call
│   ├── prices                       total for all passengers
│   ├── passengers[]                 price per passenger type
│   ├── trips[]                      one per direction / leg
│   │   └── flights[] ──── ids ───┐
│   ├── rules[] ────────── ids ───┼──┐
│   ├── has_fare_families         │  │  true → call Get Fare Families
│   └── can_hold                  │  │  true → Hold Booking is allowed
│                                 │  │
└── aggregations                  │  │  reference data shared by all itineraries
    ├── flights[]   ◄─────────────┘  │  segment details, find by `id`
    ├── rules{}     ◄────────────────┘  mini fare rules, keyed by id
    ├── passengers[]                    passenger types in this search
    ├── taxes[]                         tax lines (supplier dependent)
    ├── fares[]                         fare components (supplier dependent)
    └── translations                    airport and airline names

Itineraries

Each itinerary is one priced, bookable combination of flights.

  • prices is the total for all passengers. passengers[].prices is the price for one passenger of that type.
  • trips holds one entry per direction: 1 for one-way, 2 for round-trip, one per leg for multi-city. Each trip lists its flight segments in travel order, so a trip with several flight ids has connections.
  • Prices are in the requested currency and already include your agency markup.

Aggregations

  • flights: one entry per flight segment (airports, times, carriers, flight number, cabin, booking class, baggage, fare family amenities). A segment shared by several itineraries appears only once.
    • bags_per_pax is the baggage breakdown per passenger type (adult, child, infant), each with check_in and cabin allowance.
    • free_baggage and cabin_baggage are short codes for the adult (ADT) allowance only.
  • rules: mini fare rules, a short summary of refund/change conditions (type is REFUND, CHANGE, REVALIDATE, ...) for showing badges such as "Refundable" in results. Several itineraries can point to the same rule. When the airline gives no detail, the rule says to contact support. For the full conditions of one itinerary, call Get Fare Rules.
  • passengers: the passenger types of the search (ADT, CHI, INF).
  • taxes and fares: tax lines and fare components. They depend on the supplier and may be empty; don't rely on them being present.
  • translations: airport and airline names keyed by code, in the requested locale.

Next steps

  1. If has_fare_families is true, optionally call Get Fare Families to offer branded fares.
  2. Optionally call Get Fare Rules for the full conditions.
  3. Call Check Availability before booking to confirm the price.
Authorizations:
bearerAuth
Request Body schema: application/json
required
adults
required
integer >= 1

Number of adult passengers (16+ years)

children
integer >= 0

Number of child passengers (2-16 years)

infants
integer >= 0

Number of infant passengers (0-2 years)

required
Array of objects (Itinerary)
currency
required
string

Account currency code (e.g., USD)

locale
required
string
Enum: "en" "ar"

Language preference (e.g., en, ar)

direction
required
string
Enum: "R" "O" "M"

Flight type: R (Round Trip), O (One way), M (Multi destination)

cabin
required
string
Enum: "E" "PE" "B" "F"

Cabin class: E (Economy), PE (Premium Economy), B (Business), F (First)

object

Optional filters. Omit them to get all results.

mode
string
Default: "search"
Enum: "search" "poll"

search waits for all suppliers and returns the full results. poll returns immediately, then you collect results with Collect Results until status is completed.

Responses

Request samples

Content type
application/json
{
  • "adults": 1,
  • "infants": 0,
  • "children": 0,
  • "itineraries": [
    ],
  • "currency": "USD",
  • "locale": "en",
  • "direction": "R",
  • "cabin": "E",
  • "mode": "search",
  • "filters": {
    }
}

Response samples

Content type
application/json
{
  • "search_id": "2db5e697-0a85-4907-ba41-68de00ecec48",
  • "aggregations": {
    },
  • "itineraries": [
    ]
}

Collect Results

Returns the results of a search made with mode: poll. Call it every 2-3 seconds with the search_id of the search.

Each call returns all results found so far, in the same structure as the Search response, so replace what you show each time. Keep calling while status is progress; stop when it is completed.

Authorizations:
bearerAuth
path Parameters
search_id
required
string

search_id returned by Search

Responses

Response samples

Content type
application/json
{
  • "search_id": "d5826b15-4ef0-45f4-80df-3b8d5f941dd6",
  • "aggregations": {
    },
  • "itineraries": [
    ],
  • "is_cached": true,
  • "status": "progress",
  • "search_time": 0
}

Get Fare Families

This step is optional. If the itinerary has has_fare_family set to true, you can use it to fetch the branded fare offers.

Authorizations:
bearerAuth
path Parameters
itinerary_id
required
string

Unique identifier of the selected itinerary

search_id
required
string

Search session identifier from the search response

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Check Flight Availability

Confirms that the selected itinerary is still available, re-prices it, and returns the full details of the trip that will be booked. Call it before Create Order.

If you intend to book a specific branded fare (fare family), pass the corresponding fare_family_id.

Use the availability response, not the search result

The flights in order_details.data.flights are the trip that will actually be booked. Baggage (bags_per_pax, free_baggage), fare basis (fare_base), fare type, booking class and branded fare can differ from what Search returned, so replace the flight details you show with these before Create Order; don't rely on the search result.

Also check price_changed / price_change: if the price changed, show the new price to the customer before continuing.

Authorizations:
bearerAuth
path Parameters
itinerary_id
required
string

Unique identifier of the selected itinerary

search_id
required
string

Search session identifier from the search response

query Parameters
fare_family_id
string

Optional fare family ID to book a specific branded fare

Responses

Response samples

Content type
application/json
{
  • "available": true,
  • "price_changed": false,
  • "price_change": 0,
  • "formatted_price_change": "SAR 0.00",
  • "price": "SAR 854.49",
  • "session_id": "46a7beae-b13b-4f36-811c-faaa5f919a59",
  • "order_session_id": "8500000-46a7beae-b13b-4f36-811c-faaa5f919a59",
  • "order_details": {
    }
}

Get Fare Rules

Returns the fare rules (cancellation, change and no-show conditions) for a selected itinerary.

This step is optional and informational — it does not affect pricing or booking. It can be called any time after search, within the same search session.

If the customer selected a branded fare (fare family), pass the same fare_family_id you use for Check Availability, so the returned rules match that fare.

If no rules are available for the itinerary, rules is an empty object and text is null.

Authorizations:
bearerAuth
path Parameters
itinerary_id
required
string

Unique identifier of the selected itinerary

search_id
required
string

Search session identifier from the search response

query Parameters
fare_family_id
string

Optional fare family ID, to get the rules of a specific branded fare

Responses

Response samples

Content type
application/json
{
  • "rule_level": "ITINERARY",
  • "rules": {
    },
  • "text": "CAI -> JED:\n\nAFTER_DEP: INR 3360.00\nNO_SHOW: INR 17760.00 (before 2026-11-26 07:25 UTC)\nPRIOR_TO_DEP: INR 3360.00\n\nJED -> CAI:\n\nAFTER_DEP: INR 3360.00\nNO_SHOW: INR 17760.00 (before 2026-11-28 03:15 UTC)\nPRIOR_TO_DEP: INR 3360.00\n\nCAI -> JED:\n\nAFTER_DEP: INR 6720.00\nNO_SHOW: Not permitted (before 2026-11-26 07:25 UTC)\nPRIOR_TO_DEP: INR 6720.00\n\nJED -> CAI:\n\nAFTER_DEP: INR 6720.00\nNO_SHOW: Not permitted (before 2026-11-28 03:15 UTC)\nPRIOR_TO_DEP: INR 6720.00"
}

Bookings

Create, hold, pay for and track a booking.

Create Order

Creates the order for the selected itinerary and saves the passengers and contact details.

This endpoint does not book with the airline. It doesn't create a PNR, take payment or issue tickets; it only saves the order so you can continue with one of the next steps:

  • Hold Booking: creates the PNR without payment (only when the itinerary allows hold), then pay later with Pay and Issue Ticket.
  • Pay and Issue Ticket: pays from your agency balance, creates the PNR and issues the tickets.

Call Check Availability before this endpoint to confirm the price.

Authorizations:
bearerAuth
path Parameters
itinerary_id
required
string
search_id
required
string

Search session identifier from the search response

Request Body schema: application/json
required
required
Array of objects (BookingPassenger)

One entry per passenger. The count must match the adults + children + infants of the search.

mobile
required
string <= 20 characters

Contact mobile number with country code, digits only with optional leading +

phone
string or null <= 20 characters

Alternative contact number

email
required
string <email>

Contact email for booking confirmation

live_booking
boolean or null

false makes this a test booking (never sent to the airline). true makes a live booking. When omitted, your account environment decides: live for accounts enabled for live bookings, test otherwise. Accounts not enabled for live bookings always make test bookings.

Responses

Request samples

Content type
application/json
{
  • "passengers": [
    ],
  • "mobile": "+966565565655",
  • "phone": "",
  • "email": "John.Doe@example.com",
  • "live_booking": false
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "message": "passenger information stored successfully"
}

Retrieve Booking Details

This endpoint retrieves comprehensive details of a specific flight booking, including:

  • Passenger information.
  • PNR (Passenger Name Record).
  • Tickets.
  • Booking status.

Usage Instructions:

  • Call this endpoint every 10 minutes for up to 2 hours after the booking is created.
  • Check for the generation of PNR and tickets during this time-frame.

Timeout Behavior:

  • If neither the PNR nor tickets are generated within 2 hours, the booking is considered unconfirmed.
  • In such cases, contact the supplier directly to verify the final booking status.

Example Workflow:

  1. Create a flight booking.
  2. Poll this endpoint every 10 minutes for updates.
  3. If the booking remains unconfirmed after 2 hours, escalate to the supplier for resolution.

This ensures timely and accurate updates to the booking status while minimizing manual intervention.

Baggage

Baggage breakdown per passenger type (adult, child, infant), each with check_in and cabin allowance. Use this for the exact allowance of every passenger. free_baggage and cabin_baggage on the flight are short codes for the adult (ADT) allowance only.

Available actions

order.available_actions lists what you can do on the booking now. Currently only void, and only when the ticket can be voided through the API; see Void Ticket.

Authorizations:
bearerAuth
path Parameters
itinerary_id
required
string

The unique identifier of the itinerary

search_id
required
string

Search session identifier from the search response

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "order": {
    }
}

Hold Booking

This endpoint allows placing a hold on a booking.

  • Applicable only for itineraries where can_hold = true. (Needs to be activated on the account)
  • Creates a PNR without deducting credit from the user.
  • Booking must be confirmed later using the Pay and Issue Ticket endpoint
Authorizations:
bearerAuth
path Parameters
itinerary_id
required
string

The unique identifier of the itinerary

search_id
required
string

Search session identifier from the search response

Responses

Response samples

Content type
application/json
{
  • "order": {
    },
  • "data": {
    }
}

Pay and Issue Ticket

Pays for the booking from your agency balance and issues the tickets.

Previously named payWallet. The old path /api/v2/orders/payWallet/{itinerary_id}-{search_id} still works, but is deprecated; use this one.

  • Can confirm both held bookings and direct bookings.
  • Deducts credit from the agency account, creates a PNR, and initiates ticket issuance.
  • Once this endpoint is called, the booking enters a processing state.

Important Notes:

  • After payment, the system begins processing the PNR and ticket issuance.
  • Polling is required after payment to monitor the booking status.
  • Use the Booking Details endpoint every 10 minutes for up to 2 hours to track the generation of the PNR and tickets.
  • If neither the PNR nor tickets are available after 2 hours, the booking is considered unconfirmed, and you must contact the supplier directly for resolution.

This polling mechanism ensures accurate tracking of the booking lifecycle after payment.

Authorizations:
bearerAuth
path Parameters
itinerary_id
required
string

The unique identifier of the itinerary

search_id
required
string

Search session identifier from the search response

Responses

Response samples

Content type
application/json
{
  • "order": {
    },
  • "data": {
    }
}

Account

Agency account information.

Get Balance

Returns the available balance of your agency as a plain number, in the agency currency.

This endpoint must be enabled for your account. If it returns 403, contact your account manager.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
85104.87

Void Ticket

Cancel freshly issued tickets within the airline's void window; the ticket amount is refunded to your agency balance minus the void fee and any airline penalties.

Flow

  1. Call Booking Details and look for an entry with action: void in order.available_actions. If it isn't there, the ticket can't be voided through the API.
  2. Optional: call Validate Void with its product_id to see the void fee.
  3. Call Void Ticket with the same product_id.

Validate Void

Returns the void fee for the product's tickets, in your agency currency, before voiding.

Only call it for a product listed with action: void in order.available_actions of Booking Details. This endpoint must be enabled for your account. If it returns 403, contact your account manager.

Authorizations:
bearerAuth
path Parameters
session_id
required
string
Example: 10400003-9db3b1de-7be1-4028-9b61-23f3624a1dcf

Order session, {itinerary_id}-{search_id} (the order session_id)

Request Body schema: application/json
required
product_id
required
integer

product_id of the void entry in order.available_actions (Booking Details)

Responses

Request samples

Content type
application/json
{
  • "product_id": 12001
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "message": "Void Validation Result",
  • "status": true
}

Void Ticket

Voids the product's tickets. The tickets are cancelled as if never issued, and the ticket amount minus the void fee and any airline penalties is returned to your agency balance.

Only products listed with action: void in order.available_actions of Booking Details can be voided; any other product is rejected. This endpoint must be enabled for your account. If it returns 403, contact your account manager.

Authorizations:
bearerAuth
path Parameters
session_id
required
string
Example: 10400003-9db3b1de-7be1-4028-9b61-23f3624a1dcf

Order session, {itinerary_id}-{search_id} (the order session_id)

Request Body schema: application/json
required
product_id
required
integer

product_id of the void entry in order.available_actions (Booking Details)

Responses

Request samples

Content type
application/json
{
  • "product_id": 12001
}

Response samples

Content type
application/json
{
  • "data": [ ],
  • "message": "Ticket Voided Successfully",
  • "status": true
}