Hotel Supplier API (1.0)
Download OpenAPI specification: Download · Download Postman collection: Download
Tourmind hotel pull API for supplier
Integration Process
- The supplier develops and tests the API.
- The supplier provides the test environment URL, api key, and secret. Tourmind will create some test bookings.
- The supplier completes the production environment configuration and provides the production environment URL, api key, and secret.
- Tourmind creates a cancellable test booking in the production environment.
- Go live
Authentication
All endpoints require an Authorization header using HMAC-SHA256 signature scheme.
Signature Generation Steps
- Get the current Unix timestamp (integer seconds):
timestamp - Concatenate the signature input:
message = apiKey + apiSecret + timestamp - Compute HMAC-SHA256 of
messageusingapiSecretas the key, then Base64-encode the result to getsignature - Assemble the Authorization header:
HMAC-SHA256 apikey={apiKey}, timestamp={timestamp}, signature={signature}
Example
Authorization: HMAC-SHA256 apikey=myApiKey, timestamp=1715000000, signature=Base64EncodedHmacSha256ResultPostman Script
const CryptoJS = require('crypto-js');
const apiKey = pm.environment.get("apiKey");
const apiSecret = pm.environment.get("secret");
if (!apiKey || !apiSecret) {
console.error("Missing apiKey or secret");
return;
}
const timestamp = Math.floor(Date.now() / 1000);
const message = apiKey + apiSecret + timestamp.toString();
const signature = CryptoJS.HmacSHA256(message, apiSecret).toString(CryptoJS.enc.Base64);
const authHeader = `HMAC-SHA256 apikey=${apiKey}, timestamp=${timestamp}, signature=${signature}`;
pm.request.headers.upsert({
key: "Authorization",
value: authHeader
});Parameter Reference
| Parameter | Description |
|---|---|
apiKey | The API key is provided by the supplier |
apiSecret | The API Secret is provided by the supplier |
timestamp | Unix timestamp (seconds) at request time; server allows ±300 seconds tolerance |
signature | Base64-encoded result of HMAC-SHA256(apiKey + apiSecret + timestamp, apiSecret) |
Availability & Booking
Search
Search for bookable hotels and rooms that meet specific criteria. Note: When searching for multiple rooms, the same room type and rate plan apply to all rooms, but each room may have a different occupancy count. The returned price is the total amount (including taxes and fees, if applicable) for all rooms.
API Call Schema
| Name | Value |
|---|---|
| Request URL | /search |
| Request method | POST |
{
"hotels": [
"12345",
"67891"
],
"checkIn": "2026-08-15",
"checkOut": "2026-08-16",
"occupancies": [
{
"roomId": 1,
"adults": 2,
"childrenAges": [
8
]
},
{
"roomId": 2,
"adults": 2,
"childrenAges": [
8
]
}
],
"currency": "USD",
"nationality": "US",
"timeout": 3000,
"requestId": "16c74e57-9a86-4e17-843c-3dd66cf84788"
}{
"requestId": "16c74e57-9a86-4e17-843c-3dd66cf84788",
"errors": null,
"data": [
{
"hotelCode": "12345",
"hotelName": "Hotel Name",
"rooms": [
{
"roomType": {
"code": "12345#DBL",
"name": "Single room city view",
"area": 25,
"bedTypes": [
{
"code": "DBL",
"name": "single bed",
"quantity": 1
}
],
"maxOccupancy": 1,
"maxAdults": 1,
"maxChildren": 0,
"relatedCode": {
"Expedia": "1352345323",
"HotelBed": "3432423423"
}
},
"options": [
{
"token": "12345|12345#DBL#16#RF#32235",
"ratePlanCode": "17",
"ratePlanName": "Room Only",
"mealPlan": {
"code": "RO",
"name": "Room Only",
"isIncludeChildren": false
},
"price": {
"net": 99.99,
"gross": 99.99,
"currency": "USD",
"commission": 0
},
"fees": [
{
"type": "TAX_AND_SERVICE_FEE",
"name": "tax and service fee",
"amount": 12.12,
"currency": "USD",
"included": false
},
{
"type": "EXTRA_PERSON_FEE",
"name": "Resort Fee",
"amount": 12.12,
"currency": "USD",
"included": true
}
],
"taxes": [
{
"type": "CITY_TAX",
"name": "city tax",
"amount": 12.12,
"currency": "USD",
"included": false
}
],
"refundable": true,
"cancelPenalties": [
{
"deadline": "2026-04-17T16:58:48.131Z",
"penaltyType": "PERCENT",
"value": 100,
"currency": "USD"
},
{
"deadline": "2026-04-15T16:58:48.131Z",
"penaltyType": "AMOUNT",
"value": 20.2,
"currency": "USD"
}
],
"nightlyRate": {
"2026-04-17": {
"net": 99.99,
"gross": 99.99,
"allotment": 9
}
},
"allotment": 9,
"onRequest": false,
"remark": ""
}
]
}
]
}
]
}Prebook
Call this API before making a reservation. This operation will verify the real-time price and availability of the selected room type and return a bookingToken for use in subsequent booking requests. The bookingToken must be valid for at least 10 minutes. Timeout: 12s
API Call Schema
| Name | Value |
|---|---|
| Request URL | /prebook |
| Request method | POST |
{
"requestId": "16c74e57-9a86-4e17-843c-3dd6653453434",
"hotelCode": "12345",
"checkIn": "2026-03-23",
"checkOut": "2026-03-24",
"occupancies": [
{
"roomId": 1,
"adults": 2,
"childrenAges": null
}
],
"roomCode": "12345#DBL",
"ratePlanCode": "1734534",
"optionToken": "12345|12345#DBL#16#RF#32235",
"nationality": "US"
}{
"requestId": "16c74e57-9a86-4e17-843c-3dd6653453434",
"errors": null,
"data": {
"hotelCode": "12345",
"hotelName": "hotel name",
"roomCode": "12345#DBL",
"roomName": "Single room city view",
"ratePlanCode": "17",
"ratePlanName": "Room Only",
"bookingToken": "12345|12345#DBL#16#RF#32235|2026-03-23|2026-03-24|2",
"mealPlan": {
"code": "RO",
"name": "Room Only",
"isIncludeChildren": true
},
"price": {
"net": 99.99,
"gross": 99.99,
"currency": "USD",
"commission": 0
},
"fees": [
{
"type": "VALUE_ADDED_TAX",
"name": "Resort Fee",
"amount": 12.12,
"currency": "USD",
"included": false
}
],
"taxes": [
{
"type": "VALUE_ADDED_TAX",
"name": "Resort Fee",
"amount": 12.12,
"currency": "USD",
"included": true
}
],
"nightlyRate": {
"2026-04-17": {
"net": 99.99,
"gross": 99.99,
"allotment": 2
}
},
"refundable": true,
"cancelPenalties": [
{
"deadline": "2026-08-03T14:15:22.123Z",
"penaltyType": "PERCENT",
"value": 100,
"currency": "USD"
}
],
"allotment": 2,
"onRequest": true,
"remark": ""
}
}Booking
The Booking operation requests a reservation confirmation for the specified rate option Timeout: 60s.
API Call Schema
| Name | Value |
|---|---|
| Request URL | /booking |
| Request method | POST |
{
"requestId": "16c74e57-9a86-4e34-843c-3dd66534ef434",
"referenceId": "532432532",
"hotelCode": "12345",
"checkIn": "2026-08-24",
"checkOut": "2026-08-25",
"bookingToken": "12345|12345#DBL#16#RF#32235|2026-03-23|2026-03-24|2",
"holder": {
"firstName": "Shan",
"lastName": "Zhang",
"phone": "13212341234",
"email": "xxx@xx.com"
},
"occupancies": [
{
"roomId": 1,
"paxes": [
{
"firstName": "Shan",
"lastName": "Zhang",
"type": "ADULT"
},
{
"age": 8,
"type": "CHILD"
}
]
}
],
"totalPrice": 99.99,
"currency": "USD",
"nationality": "US",
"customerRequirements": "xxxxx"
}{
"requestId": "16c74e57-9a86-4e34-843c-3dd66534ef434",
"errors": null,
"data": {
"bookingCode": "fef2fsf",
"status": "CONFIRMED",
"referenceId": "532432532",
"hotelConfirmationNumber": "KHKHG324",
"hotelCode": "12345",
"hotelName": "hotel name",
"checkIn": "2026-08-24",
"checkOut": "2026-08-25",
"holder": {
"firstName": "Shan",
"lastName": "Zhang",
"phone": "13212341234",
"email": "xxx@xx.com"
},
"rooms": [
{
"roomId": 1,
"paxes": [
{
"firstName": "Shan",
"lastName": "Zhang",
"type": "ADULT"
},
{
"age": 8,
"type": "CHILD"
}
]
}
],
"totalPrice": 99,
"penaltyAmount": 0,
"currency": "USD",
"commission": 0,
"cancelPenalties": [
{
"deadline": "2026-08-03T14:15:22.123Z",
"penaltyType": "PERCENT",
"value": 100,
"currency": "USD"
}
],
"remark": "",
"customerRequirements": "xxxxx",
"bookedTime": "2026-08-20T14:15:22.123Z"
}
}Cancel
Cancel a confirmed reservation using the referenceId or bookingCode. Returns the cancellation status and the actual penalty amount incurred. Timeout: 60s.
API Call Schema
| Name | Value |
|---|---|
| Request URL | /cancel |
| Request method | POST |
{
"requestId": "16c74e57-9a86-4e17-843c-3dd66cf86524",
"referenceId": "532432532"
}{
"requestId": "16c74e57-9a86-4e17-843c-3dd66cf86524",
"errors": null,
"data": {
"referenceId": "532432532",
"bookingCode": "fef2fsf",
"status": "CANCELED",
"penaltyAmount": 99.99,
"currency": "USD"
}
}Booking List
Search for booking details using the following criteria:
- referenceId: TourMind booking ID
- bookingCode: Supplier booking ID
- date range: Check-in / Booking Time Note: The supplier must support searching for bookings by referenceId or date range. When create or canceling a booking, network timeouts may prevent us from receiving a response; in such cases, we can only retrieve the booking status using the referenceId or date range. Timeout: 30s.
API Call Schema
| Name | Value |
|---|---|
| Request URL | /bookings |
| Request method | POST |
{
"requestId": "16c74e57-9a86-4e34-843c-3dd66534ef434",
"referenceId": "532432532"
}{
"requestId": "16c74e57-9a86-4e34-843c-3dd66534ef434",
"errors": null,
"data": [
{
"bookingCode": "fef2fsf",
"status": "CONFIRMED",
"referenceId": "532432532",
"hotelConfirmationNumber": "KHKHG324",
"hotelCode": "12345",
"hotelName": "hotel name",
"checkIn": "2026-08-24",
"checkOut": "2026-08-25",
"holder": {
"firstName": "Shan",
"lastName": "Zhang",
"phone": "13212341234",
"email": "xxx@xx.com"
},
"rooms": [
{
"roomId": 1,
"paxes": [
{
"firstName": "Shan",
"lastName": "Zhang",
"type": "ADULT"
},
{
"age": 8,
"type": "CHILD"
}
]
}
],
"totalPrice": 99,
"penaltyAmount": 0,
"currency": "USD",
"commission": 0,
"cancelPenalties": [
{
"deadline": "2026-08-03T14:15:22.123Z",
"penaltyType": "PERCENT",
"value": 100,
"currency": "USD"
}
],
"remark": "",
"customerRequirements": "xxxxx",
"bookedTime": "2026-08-20T14:15:22.123Z"
}
]
}Static Data
Hotel List
Retrieve hotel static data including basic hotel information and room type lists. Supports filtering by hotel code, country, or last update time. Results are paginated.
API Call Schema
| Name | Value |
|---|---|
| Request URL | /hotels |
| Request method | POST |
{
"hotels": [
"12345"
],
"page": 1,
"perPage": 100
}{
"errors": null,
"data": {
"pagination": {
"page": 1,
"perPage": 100,
"pages": 1,
"total": 1
},
"hotels": [
{
"hotelCode": "12345",
"hotelName": "hotel name",
"starRating": 3,
"category": "Hotel",
"countryCode": "US",
"country": "USA",
"cityCode": "CA",
"city": "Burlingame",
"address": "600 Airport Boulevard",
"latitude": "37.59002",
"longitude": "-122.342915",
"email": "",
"phone": "1-650-340-8500",
"relatedCode": {
"expedia": "1232353"
},
"rooms": [
{
"code": "DBL",
"name": "Double Room",
"area": 20,
"bedTypes": [
{
"code": "2",
"name": "Single Bed",
"quantity": 2
}
],
"maxOccupancy": 2,
"maxAdults": 2,
"maxChildren": 0,
"relatedCode": {
"expedia": "3253252"
}
}
]
}
]
}
}Reference
Booking Status
| Value | Description |
|---|---|
PENDING | Booking is being processed; confirmation is pending. |
CONFIRMED | Booking has been confirmed by the supplier. |
FAILURE | Booking failed to be confirmed. |
CANCELED | Booking has been cancelled. |
Meal Plan Codes
| Code | Description |
|---|---|
RO | Room Only |
BB | Bed & Breakfast |
HB | Half Board (Breakfast + Dinner) |
FB | Full Board (Breakfast + Lunch + Dinner) |
AI | All Inclusive |
BF1 | Breakfast for 1 person |
BF2 | Breakfast for 2 persons |
BF3 | Breakfast for 3 persons |
BF4 | Breakfast for 4 persons |
LC | Lunch |
DN | Dinner |
LD | Lunch & Dinner |
Fee / Tax Types
| Value | Description |
|---|---|
VALUE_ADDED_TAX | Value Added Tax (VAT) |
SALES_TAX | Sales Tax |
CITY_TAX | City Tax |
TOURISM_TAX | Tourism Tax |
TAX_AND_SERVICE_FEE | Combined Tax & Service Fee |
PROPERTY_FEE | Property Fee |
DEPOSIT | Security Deposit |
RESORT_FEE | Resort Fee |
EXTRA_PERSON_FEE | Extra Person Fee |
PLATFORM_FEE | Platform Fee |
Date Type
| Value | Description |
|---|---|
CHECKIN | Filter bookings by check-in date. |
BOOK | Filter bookings by booking creation date. |
Guest Type
| Value | Description |
|---|---|
ADULT | Adult (18 years or older). |
CHILD | Child (17 years or younger). |
Error Codes
| Code | Description |
|---|---|
VALIDATION_ERROR | Request parameter validation failed. |
TIMEOUT | The upstream supplier request timed out. |
RATE_LIMIT | Request rate limit exceeded. |
SYSTEM_ERROR | Internal system error. |
NO_AVAILABILITY | No availability for the requested criteria. |
PRICE_CHANGED | The price has changed since the last search or prebook. |
INSUFFICIENT_CREDIT | Account credit is insufficient to complete the booking. |
UNKNOWN | An unknown error occurred. |
