B2B Flight Booking API (1.0.0)

Download OpenAPI specification:

API Support: technolgy@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.

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

Environments

  • Testing Environment: Use for development and testing with live_booking: false
  • Live Environment: Production bookings with live_booking: true

Booking Flow Diagram

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

Booking Status Polling

After payment (payWallet), you must poll the Booking Details endpoint to retrieve the final booking status:

┌──────────────┐     ┌─────────────────┐     ┌──────────────────┐
│  payWallet   │────▶│  Poll Booking   │────▶│  Check Status    │
│  (payment)   │     │  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

Flights

Search Flights

Search for available flights across multiple airlines with comprehensive filtering options. Supports one-way, round-trip, and multi-city itineraries with flexible passenger combinations and cabin class selections.

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)

Responses

Request samples

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

Response samples

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

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

Validates the current availability and pricing of a selected flight itinerary. This endpoint should be called before proceeding with the booking to ensure price accuracy and seat availability.

If you intend to book a specific branded fare (fare family), you must pass the corresponding fare_family_id as part of the request.

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": true,
  • "price_change": 0,
  • "formatted_price_change": "string",
  • "price": "string"
}

Bookings

Book a Flight

This endpoint initiates the booking process.

  • Returns an initial booking response but does not finalize the booking.
  • You must follow up with either:
    • Hold Booking to reserve without payment, or
    • Pay from Wallet (payWallet) to finalize the booking and generate tickets.
Authorizations:
bearerAuth
path Parameters
itinerary_id
required
string
search_id
required
string
Request Body schema: application/json
required
required
Array of objects (PassengerInformationRequest)
mobile
required
string

Contact mobile number with country code

phone
string

Alternative contact number

email
required
string <email>

Contact email for booking confirmation

object

Responses

Request samples

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

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.

Authorizations:
bearerAuth
path Parameters
itinerary_id
required
string

The unique identifier of the itinerary

session
required
string

Session identifier

Responses

Response samples

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

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 from Wallet (payWallet) endpoint
Authorizations:
bearerAuth
path Parameters
itinerary_id
required
string

The unique identifier of the itinerary

session
required
string

Session identifier

Responses

Response samples

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

Pay from Wallet (payWallet)

This endpoint processes payment from your wallet and finalizes the booking.

  • 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

session
required
string

Session identifier

Responses

Response samples

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