Booking Service
This API is used to book a flight based on a previously created itinerary. The booking process finalizes the itinerary and issues a booking reference or PNR (Passenger Name Record).
API Request Response Structure
Path Parameters
Parameter | Type | Description |
---|---|---|
itineraryCode | String | Unique identifier for the itinerary to be booked. |
Request Body Structure
Key | Type | Description |
---|---|---|
traceId | String | Unique identifier for tracking the booking request. |
Sample Request
{
"traceId": "{{traceId}}"
}
Response Body Structure
Root Level
Key | Type | Description |
---|---|---|
results | Object | Contains booking confirmation details. |
results
Object
results
ObjectKey | Type | Description |
---|---|---|
itineraryCode | String | Unique identifier for the booked itinerary. |
details | Array | List of booked flight details. |
details
Array (Booking Details)
details
Array (Booking Details)Each flight booking contains:
Key | Type | Description |
---|---|---|
itemCode | String | Unique identifier for the booking item. |
bmsBookingCode | String | Unique booking code |
isBookingSucessfullOnBMS | Boolean | true if booking is successful on the BMS platform. |
isBookingSuccessfullByProvider | Boolean | true if booking is successfully processed by the provider. |
pnr | String | Passenger Name Record (PNR) for the booking. |
pnrDetails | Array | Contains details of booked flights (see below). |
bookingStatus | String | Status of the booking ("CONFIRMED" , "PENDING" , "FAILED" ). |
isSuccessful | Boolean | true if the booking was completed successfully. |
pnrDetails
Array (PNR Information)
pnrDetails
Array (PNR Information)Key | Type | Description |
---|---|---|
origin | String | IATA code of the departure airport. |
destination | String | IATA code of the arrival airport. |
pnr | String | Passenger Name Record for the booking. |
Sample Response
{
"results": {
"itineraryCode": "itrjier",
"details": [
{
"itemCode": "itmj0vw",
"provider": "P2",
"bmsBookingCode": "trxp4",
"isBookingSucessfullOnBMS": true,
"isBookingSuccessfullByProvider": true,
"pnr": "TESTPNR",
"pnrDetails": [
{
"origin": "DEL",
"destination": "BOM",
"pnr": "TESTPNR"
}
],
"bookingStatus": "CONFIRMED",
"isSuccessful": true
}
]
}
}
Understanding Booking Status and Next Action Items
In the Create Booking API response, the bookingStatus
key should be used to determine the current status of a booking.
1. CONFIRMED
✅ Meaning:
- The booking is successfully confirmed.
- The ticket or reservation is guaranteed, and no further action is required.
- The provider has issued a confirmation (e.g., PNR or ticket).
2. PENDING
⏳ Meaning:
- The booking is still being processed.
- The final outcome (CONFIRMED or FAILED) is not yet available.
🔹 Next Steps:
Scenario 1:isBookingSucessfullOnBMS = true
and bookingStatus = PENDING
isBookingSucessfullOnBMS = true
and bookingStatus = PENDING
- Call
getBookingDetails
API every 2 minutes for a maximum of 1 hour. - If the status remains PENDING after 1 hour, contact the OPS Team via the TravClan Portal.
Scenario 2:isBookingSucessfullOnBMS = false
and bookingStatus = PENDING
isBookingSucessfullOnBMS = false
and bookingStatus = PENDING
- Directly contact the OPS Team via the TravClan Portal.
- Our OPS team is actively monitoring such cases and may already be working on the pending booking.
3. FAILED
❌ Meaning:
- The booking attempt was unsuccessful.
- Possible reasons:
- Lack of availability
- Technical errors
- Connection issues with airline/provider
💰 Refund Process:
- If the failure occurs due to inventory issues or airline/provider errors, money will be refunded instantly to your wallet.
- In case of technical errors or connection breaks, the OPS Team will process the refund.
- Usual processing time: 2 hours
- Maximum delay: 48 hours from the time of booking
4. HOLD & RELEASED
⚠️ Note:
- Hold functionality is not yet available for API integrations.
- Once this feature is rolled out, we will notify you.
How to Raise Cancel/Reschedule Requests?
- You can raise a cancellation or reschedule request via the TravClan Portal in the My Bookings section.
- All API bookings will be listed with details.
- On the right side, there is an option to Raise a Request for each booking.
Booking Rules and TraceID Sessions
Only one itinerary can be booked within a single TraceID session.
Explanation:
- For Domestic Oneway, International Oneway, and International Return bookings, only one booking is created in the backend.
- For Domestic Roundtrip, two separate bookings are created:
- One for the outbound journey
- One for the inbound journey
- These two bookings belong to the same itinerary.
- However, multiple itineraries can be created within the same session. The user can then choose to proceed with one of them.
Booking Confirmation Emails
Two emails will be sent:
1. Email to Agent Organization Email ID
- Sent to the email ID used for registration on our portal.
- Contains TravClan branding.
- Includes a PDF voucher attachment.
2. Email to Agent Organization Email ID
- Sent to the email ID used for registration on our portal.
- Does not have TravClan branding.
- Includes a PDF voucher attachment.
Important Note:
🚨 On Sandbox Environment, emails are not sent to external email IDs. You will not receive confirmation, pending, or failure emails on Sandbox Environment.
API Reference
Updated 20 days ago