Reservations
Understanding flight and hotel reservations within booking orders
Reservations
Reservations are the individual travel bookings within an order. While an order represents the overall transaction, reservations represent the actual services being booked—flights, hotels, or components of a travel package.
Reservation Structure
Each reservation contains:
| Field | Description |
|---|---|
id | Internal reservation ID |
reservationId | External ID from travel supplier (IRIX) |
orderId | Parent order reference |
service | Type: AIR (flight) or HOTEL |
status | Current status: OK, IN_PROGRESS, REFUNDED |
price | Reservation amount |
currency | Currency code (default: IQD) |
serviceStartDate | Travel start date |
serviceEndDate | Travel end date |
bnplFeeAmount | BNPL fee (if applicable) |
Reservation Types
Flight Reservations (AIR)
Flight reservations represent air travel bookings. They include:
- One or more flight segments (legs)
- Traveler information
- Ticket numbers (after issuance)
- Baggage and fare details
Ticketing Process:
- Reservation Created: Booking confirmed with airline via IRIX
- Ticket Issued: E-tickets generated (manual or auto)
- Status Updated: Reservation marked as
OK
For auto-ticketing suppliers, ticket issuance happens automatically after booking. For others, the system issues tickets immediately after reservation creation.
Hotel Reservations (HOTEL)
Hotel reservations represent accommodation bookings. They include:
- Hotel and room details
- Check-in/check-out dates
- Guest information
- Meal plans and amenities
Hotel reservations don't require a separate ticketing step—they're confirmed immediately upon successful booking.
Reservation Statuses
| Status | Description |
|---|---|
OK | Reservation successfully confirmed |
IN_PROGRESS | Reservation being processed (awaiting confirmation) |
REFUNDED | Reservation has been cancelled and refunded |
Status Transitions
Multi-Reservation Orders
An order can contain multiple reservations. Common scenarios:
Flight + Hotel Package
Order
├── Reservation 1: AIR (outbound flight)
├── Reservation 2: AIR (return flight)
└── Reservation 3: HOTEL (accommodation)Multi-City Flight
Order
├── Reservation 1: AIR (City A → City B)
├── Reservation 2: AIR (City B → City C)
└── Reservation 3: AIR (City C → City A)Each reservation is processed independently. If one fails, the order status reflects the overall outcome, but individual reservation statuses are tracked separately.
External Reservation Integration
Reservations in Rahal are linked to external bookings in IRIX (the travel content provider). The reservationId field stores the external reference.
Data Flow
- Prebook Session: Initial availability and pricing cached
- Order Created: Payment initiated
- Payment Verified: External reservation created via IRIX API
- Reservation Linked: External ID stored, service dates fetched
- Documents Available: E-tickets and vouchers accessible
External Data Sync
When viewing a reservation, the system fetches current details from IRIX:
- Flights: PNR, ticket numbers, segments, travelers
- Hotels: Confirmation number, room details, policies
Reservation Pricing
Each reservation tracks its own pricing:
| Component | Description |
|---|---|
price | Base reservation amount |
bnplFeeAmount | Additional fee for BNPL payments |
currency | Currency code |
The total order amount is the sum of all reservation prices plus any applicable fees.
Prices are stored in the smallest currency unit. For IQD, values are in fils (1000 fils = 1 IQD).
Service Dates
Service dates define when the travel occurs:
serviceStartDate: First day of service (departure/check-in)serviceEndDate: Last day of service (return/check-out)
These dates are fetched from the external reservation after creation and are used for:
- Display in reservation lists
- Filtering past vs. upcoming reservations
- Budget period allocation
Reservation Documents
After a reservation is confirmed, documents become available:
Flight Documents
- E-Ticket: Electronic ticket receipt
- Itinerary: Flight schedule and details
- Invoice: Payment receipt
Hotel Documents
- Voucher: Hotel confirmation voucher
- Invoice: Payment receipt
Documents can be downloaded from the reservation details view.