TripJack Hotel Book API (Instant & Hold Modes)
Overview
Executes a hotel booking using the bookingId returned from the Review / Pricing API. The endpoint supports two modes using the same endpoint:
- Instant Booking: Confirmed immediately by including
paymentInfos: [{ amount: price }]. - Hold Booking: Reserves the option until deadline without payment by omitting or providing empty
paymentInfos.
Before invoking the Book API, the backend automatically calls the TripJack Hotel Pricing API (POST https://apitest-hms.tripjack.com/hms/v3/hotel/pricing) to revalidate and obtain the latest pricing metadata.
Original unmasked guest and customer PII is persisted in the local Postgres database (BookingRequest / Booking tables), while sanitized/masked PII (emails, contacts) is included in the outgoing HTTP payload to TripJack.
- Endpoint:
POST /api/search/hotel-book - HTTP Method:
POST(No URL path parameters) - Headers:
Content-Type:application/jsonAuthorization:Bearer <token>(Optional)
Request Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
bookingId | string | Required | Review / Pricing API booking ID (e.g. "TGS208420065548") |
roomTravellerInfo | array | Optional | Array of room traveller info objects |
deliveryInfo | object | Optional | Customer delivery contacts (emails, contacts, code) |
paymentInfos | array | Optional | Payment breakdown array. Required for Instant Booking; omit for Hold Booking |
type | string | Optional | Default: "HOTEL" |
bookingMode | enum | Optional | "INSTANT" or "HOLD". Auto-detected if omitted based on paymentInfos |
hid | string | Optional | TripJack Hotel ID for pre-booking pricing revalidation |
checkIn | string | Optional | Check-in date (YYYY-MM-DD) |
checkOut | string | Optional | Check-out date (YYYY-MM-DD) |
rooms | array | Optional | Room configuration array |
correlationId | string | Optional | Correlation tracking ID |
Sample Request Payload (Instant Booking)
{
"bookingId": "TGS208420065548",
"bookingMode": "INSTANT",
"hid": "100234",
"checkIn": "2026-10-01",
"checkOut": "2026-10-03",
"roomTravellerInfo": [
{
"travellerInfo": [
{ "ti": "Mr", "pt": "ADULT", "fN": "GENIUS", "lN": "WORLD", "pan": "AAACA1111A" },
{ "ti": "Master", "pt": "CHILD", "fN": "JAPANJOT", "lN": "SINGH", "pan": "AAACA1111A" }
]
},
{
"travellerInfo": [
{ "ti": "Mrs", "pt": "ADULT", "fN": "MANMEET", "lN": "KAUR", "pan": "BBBCB1111B" },
{ "ti": "Miss", "pt": "CHILD", "fN": "HARLEEN", "lN": "KAUR", "pan": "BBBCB1111B" }
]
}
],
"deliveryInfo": {
"emails": ["booking@tripjack.com"],
"contacts": ["1234567890"],
"code": ["+91"]
},
"paymentInfos": [{ "amount": 23486.76 }],
"type": "HOTEL"
}
Sample Request Payload (Hold Booking)
{
"bookingId": "TGS208420065548",
"bookingMode": "HOLD",
"roomTravellerInfo": [
{
"travellerInfo": [
{ "ti": "Mr", "pt": "ADULT", "fN": "GENIUS", "lN": "WORLD", "pan": "AAACA1111A" }
]
}
],
"deliveryInfo": {
"emails": ["booking@tripjack.com"],
"contacts": ["1234567890"],
"code": ["+91"]
},
"type": "HOTEL"
}
Response Example (200 OK)
{
"success": true,
"data": {
"bookingMode": "INSTANT",
"bookingId": "TGS208420065548",
"supplierResponse": {
"status": {
"success": true,
"httpStatus": 200
},
"bookingId": "TGS208420065548",
"orderId": "TJ-ORD-998877"
},
"maskedDeliveryInfo": {
"emails": ["b***g@tripjack.com"],
"contacts": ["XXXXXX7890"],
"code": ["+91"]
},
"originalDeliveryInfo": {
"emails": ["booking@tripjack.com"],
"contacts": ["1234567890"],
"code": ["+91"]
}
},
"message": "Hotel Instant Booking executed successfully"
}