Booking Workflow
Complete workflow for booking flights through the API.
Step 1: Search for Flights
POST /api/flight/search
Step 2: Lock Price
POST /api/flight/offer
Request body: { "flightOffer": <one offer from search> }. Response: { "meta": { "count", "currency" }, "data": [ ... ] }. Use data[0] as flightOffer in the next step.
Step 3: Create Reservation
POST /api/flight/reserve/agent
Step 4: Retrieve Ticket
GET /api/flight/tickets?ticketId=<TICKET_ID>
Payment Flow
- Wallet balance is checked
- If sufficient, reservation is created
- Funds are deducted from wallet
- Ticket is issued
- Confirmation is sent (if notifications enabled)