Documentation Index
Fetch the complete documentation index at: https://docs.travelbase.ai/llms.txt
Use this file to discover all available pages before exploring further.
Travel Industry Foundations
Before diving into the code, it is essential to understand the mechanics of global flight distribution.How do flight booking systems work?
How do flight booking systems work?
Flight booking systems connect airlines, inventory, and booking platforms. When a user searches:
- Query: Systems query airline Global Distribution Systems (GDS) or New Distribution Capability (NDC) APIs.
- Calculation: Prices are calculated in real-time based on fare classes.
- Results: Results are returned as flight options.
What is an offer?
What is an offer?
An offer is a priced flight option returned after a search. It acts as a snapshot of a flight’s availability and cost at a specific moment.It includes:
- Flight segments and routes
- Total pricing (including taxes)
- Passenger details & baggage rules
Why do flight prices change frequently?
Why do flight prices change frequently?
Flight prices are dynamic and influenced by Yield Management algorithms. They depend on:
- Real-time demand and historical trends.
- Remaining seat availability in specific “fare buckets.”
- Time remaining before departure.
What is the difference between booking and ticketing?
What is the difference between booking and ticketing?
- Booking (PNR): This reserves the seat in the airline’s system. It generates a Record Locator but does not yet authorize the issuance of a travel document.
- Ticketing: This is the financial settlement. Once the payment is verified, an e-ticket number is issued. A booking is not a guarantee of travel until it is ticketed.
Why can a booking fail?
Why can a booking fail?
Bookings usually fail due to Inventory Drift (someone else took the last seat while you were entering payment details) or Price Changes (the airline updated the fare during the session).
Travelbase Integration
How Travelbase models and simplifies these complex travel industry workflows.How do I authenticate with Travelbase?
How do I authenticate with Travelbase?
We support standard Bearer token and API Key authentication.You can manage your production and sandbox keys from the Travelbase Dashboard.
What environments are available?
What environments are available?
| Environment | Base URL | Purpose |
|---|---|---|
| Sandbox | https://sandbox.travelbase.ai | Testing and development |
| Live | https://live.travelbase.ai | Production bookings |
What is the order lifecycle?
What is the order lifecycle?
Orders move through several states. Your frontend should be built to handle these transitions:
PENDING: Initial state after order creation.PROCESSING: Ticketing is in progress with the carrier.TICKETED: Success! The e-ticket has been issued.FAILED: The booking could not be completed (e.g., payment failure).
Why is idempotency required?
Why is idempotency required?
Idempotency ensures that if a network error occurs, retrying the request won’t result in two seats being booked or two credit card charges.Always include the
Idempotency-Key header:How do webhooks work?
How do webhooks work?
Because ticketing can take anywhere from seconds to minutes, we use webhooks to notify you of status changes.
order.ticketed: Triggered when the e-ticket is ready.order.failed: Triggered if the carrier rejects the final issuance.
Common Integration Mistakes
Avoid these pitfalls to ensure a smooth “Go-Live” process.Not handling retries
Not handling retries
Always retry 5xx errors using the same idempotency key.This ensures that duplicate requests do not result in double bookings or inconsistent state in your system.
Ignoring expiration
Ignoring expiration
Offers are time-sensitive.Always check the
expires_at timestamp before attempting to book.
Using an expired offer will result in failed bookings or pricing mismatches.Skipping webhooks
Skipping webhooks
Polling the API for updates is inefficient and unreliable.Webhooks are the source of truth for asynchronous events such as:
- Order status updates
- Ticket issuance
- Failures and refunds
Assuming sync success
Assuming sync success
A
201 Created response only confirms that the request was accepted.It does not mean the ticket has been issued.Always track the order lifecycle:PENDINGPROCESSINGTICKETEDorFAILED

