Tourmind Hotel Distribution API - TMS API (2.0)
Download OpenAPI specification: Download
TMS API.
Overall Overview
Welcome to the TourMind Developer Documentation. This guide provides all the information you need to integrate TourMind into your applications. Whether you are looking for hotel booking processes or AI-powered solutions, we've got you covered.
Key Features
- Hotel APIs: Provides a comprehensive suite of APIs designed for streamlined hotel reservation processes.
- TourMind AI APIs: Leverages advanced algorithms for room matching, room mapping, and rate prediction, enhancing pricing strategies and optimize inventory utilization rate.
Technical Specifications
- All communications from agents to the TourMind API are conducted via HTTP POST.
- The format of request payloads is based on JSON.
- All requests should accept GZIP encoding, and all responses are returned in GZIP format.
- All requests include a common request header, which contains authentication information.
API Development Process

Changelog
| Version | Date | Description |
|---|---|---|
| v1.0.1 | 2023.05.01 | Initial API documentation. |
| v2.0.1 | 2023.05.25 | Adjustments to hotel API fields. |
| v2.0.2 | 2026.03.19 | Add Query Bookings endpoint; add new fields to Retrieve Booking response (HotelCode, RoomCount, CheckIn, CheckOut, PaxRooms, Contact, ContactPhone, BookingTime). |
| v2.0.3 | 2026.08.14 | Align the Prebook MealType table with Search; document that the first guest of each PaxRoom is the primary guest. |
Authorization
1. Common Request Field
All requests require a common field named RequestHeader, in which account information must be provided. example:
{
"AgentCode": "your agent code",
"UserName": "your username",
"Password": "your password",
"RequestTime": "2018-07-26T09:51:32.999Z",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}2. Http Header
Please add the following two items to the Http header:
- X-Agent-Code: your agent code
- X-Username: your username
3. Test Environment Credential
| API Test Credential | |
|---|---|
| AgentCode | tms_test |
| UserName | tms_test |
| Password | tms_test |
Availability & Booking
Search
Search hotel room rates and available inventory for a specific property, enabling users to view detailed room availability and pricing information.
API Call Schema
| Name | Value |
|---|---|
| Request URL | http://developers.tourmind.cn/v2/HotelDetail |
| Request method | POST |
{
"CheckIn": "2018-08-25",
"CheckOut": "2018-08-26",
"HotelCodes": [
8268393
],
"Nationality": "CN",
"PaxRooms": [
{
"Adults": 4,
"Children": 0,
"ChildrenAges": [],
"RoomCount": 2
}
],
"Timeout": 6000,
"RequestHeader": {
"AgentCode": "tms_test",
"Password": "tms_test",
"RequestTime": "2018-07-26T09:51:32.123Z",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"UserName": "tms_test"
}
}{
"Error": {
"ErrorCode": "101",
"ErrorMessage": "invaild param"
},
"Hotels": [
{
"CheckIn": "2018-08-25",
"CheckOut": "2018-08-26",
"HotelCode": "740650",
"RoomTypes": [
{
"Name": "Suite 3 bedrooms",
"NameCN": "Triple Room",
"RateInfos": [
{
"Allotment": 2,
"CancelPolicyInfos": [
{}
],
"CurrencyCode": "CNY",
"DailyPriceInfo": [
{}
],
"MealInfo": {
"MealCount": 2,
"MealType": "breakfast"
},
"Name": "SUITE THREE BEDROOMS",
"RateCode": "13800206",
"TotalPrice": 688.88
}
],
"RoomTypeCode": "4613"
}
]
}
],
"ResponseHeader": {
"ResponseTime": "2018-07-26 09:51:32",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}Prebook
Check the availability and price of a specific room rate selected, usually requested when the user selects a room to book and submits a booking.
API Call Schema
| Name | Value |
|---|---|
| Request URL | http://developers.tourmind.cn/v2/CheckRoomRate |
| Request method | POST |
{
"CheckIn": "2018-08-25",
"CheckOut": "2018-08-26",
"HotelCodes": [
8268393
],
"Nationality": "CN",
"PaxRooms": [
{
"Adults": 4,
"Children": 0,
"ChildrenAges": [],
"RoomCount": 2
}
],
"RateCode": "13800206",
"RequestHeader": {
"AgentCode": "tms_test",
"Password": "tms_test",
"RequestTime": "2018-07-26T09:51:32.123Z",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"UserName": "tms_test"
},
"TotalPrice": 688.88
}{
"Error": {
"ErrorCode": "101",
"ErrorMessage": "invaild param"
},
"Hotels": [
{
"CheckIn": "2018-08-25",
"CheckOut": "2018-08-26",
"HotelCode": "740650",
"RoomTypes": [
{
"Name": "Suite 3 bedrooms",
"NameCN": "Triple Room",
"RateInfos": [
{
"Allotment": 2,
"CancelPolicyInfos": [
{}
],
"CurrencyCode": "CNY",
"DailyPriceInfo": [
{}
],
"MealInfo": {
"MealCount": 2,
"MealType": "breakfast"
},
"Name": "SUITE THREE BEDROOMS",
"RateCode": "13800206",
"TotalPrice": 688.88
}
],
"RoomTypeCode": "4613"
}
]
}
],
"ResponseHeader": {
"ResponseTime": "2018-07-26 09:51:32",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}Booking
Note: If the request times out, returns a PENDING status, or returns an error, please poll the Retrieve Booking API to obtain the final status of the booking.
API Call Schema
| Name | Value |
|---|---|
| Request URL | http://developers.tourmind.cn/v2/CreateOrder |
| Request method | POST |
{
"AgentRefID": "213415",
"CheckIn": "2018-08-15",
"CheckOut": "2018-08-18",
"ContactInfo": {
"Email": "xxx@google.com",
"FirstName": "Tom",
"LastName": "Lee",
"PhoneNo": "1521777777"
},
"CurrencyCode": "CNY",
"HotelCode": 235113,
"PaxRooms": [
{
"Adults": 2,
"Children": 0,
"ChildrenAges": [],
"PaxNames": [
{
"FirstName": "Tom",
"LastName": "Lee",
"Type": "ADU"
}
],
"RoomCount": 1
}
],
"RateCode": "2132151",
"RequestHeader": {
"AgentCode": "tms_test",
"Password": "tms_test",
"RequestTime": "2018-07-26T09:51:32.123Z",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"UserName": "tms_test"
},
"SpecialRequest": "Non-smoking room",
"TotalPrice": 88.88
}{
"Error": {
"ErrorCode": "101",
"ErrorMessage": "invaild param"
},
"OrderInfo": {
"OrderStatus": "CONFIRMED",
"ReservationID": "10470379"
},
"ReservationID": "10470379",
"ResponseHeader": {
"ResponseTime": "2018-07-26 09:51:32",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}Cancel
Send a cancel request to cancel refundable and pending bookings.
Note: If the request times out or returns an error, please poll the Retrieve Booking API to obtain the final status of the booking.
API Call Schema
| Name | Value |
|---|---|
| Request URL | http://developers.tourmind.cn/v2/CancelOrder |
| Request method | POST |
{
"AgentRefID": "213415",
"RequestHeader": {
"AgentCode": "tms_test",
"Password": "tms_test",
"RequestTime": "2018-07-26T09:51:32.123Z",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"UserName": "tms_test"
}
}{
"CancelResult": {
"CancelFee": 42,
"CurrencyCode": "CNY",
"OrderStatus": "CANCELLED"
},
"Error": {
"ErrorCode": "101",
"ErrorMessage": "invaild param"
},
"ResponseHeader": {
"ResponseTime": "2018-07-26 09:51:32",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}Retrieve Booking
Retrieve booking to check its status in the booking process.
API Call Schema
| Name | Value |
|---|---|
| Request URL | http://developers.tourmind.cn/v2/SearchOrder |
| Request method | POST |
{
"AgentRefID": "21345555",
"RequestHeader": {
"AgentCode": "tms_test",
"Password": "tms_test",
"RequestTime": "2018-07-26T09:51:32.123Z",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"UserName": "tms_test"
}
}{
"Error": {
"ErrorCode": "101",
"ErrorMessage": "invaild param"
},
"OrderInfo": {
"AgentRefID": "213415",
"CurrencyCode": "CNY",
"HotelConfirmationNo": "10470374",
"OrderStatus": "CANCELLED",
"ReservationID": "10470374",
"TotalPrice": 888.89,
"HotelCode": 0,
"RoomCount": 0,
"CheckIn": "2020-01-01",
"CheckOut": "2020-01-02",
"PaxRooms": [
{
"Adults": 2,
"Children": 0,
"ChildrenAges": [],
"PaxNames": [
{
"FirstName": "Tom",
"LastName": "Lee",
"Type": "ADU"
}
],
"RoomCount": 1
}
],
"BookingTime": "2020-01-03 12:00:00"
},
"ResponseHeader": {
"ResponseTime": "2018-07-26 09:51:32",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}Query Bookings
Query bookings by date range with pagination. Use this endpoint to retrieve a list of orders filtered by check-in date, check-out date, or booking date. The actual API endpoint is POST /v2/SearchOrder (same URL as Retrieve Booking, but with different request parameters).
API Call Schema
| Name | Value |
|---|---|
| Request URL | http://developers.tourmind.cn/v2/SearchOrder |
| Request method | POST |
{
"DateType": "CheckIn",
"From": "2024-01-01",
"To": "2024-01-31",
"Page": 1,
"PageSize": 50,
"RequestHeader": {
"AgentCode": "tms_test",
"Password": "tms_test",
"RequestTime": "2018-07-26T09:51:32.123Z",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"UserName": "tms_test"
}
}{
"Error": {
"ErrorCode": "101",
"ErrorMessage": "invaild param"
},
"OrderList": {
"OrderList": [
{
"AgentRefID": "213415",
"CurrencyCode": "CNY",
"HotelConfirmationNo": "10470374",
"OrderStatus": "CANCELLED",
"ReservationID": "10470374",
"TotalPrice": 888.89,
"HotelCode": 0,
"RoomCount": 0,
"CheckIn": "2020-01-01",
"CheckOut": "2020-01-02",
"PaxRooms": [
{
"Adults": 2,
"Children": 0,
"ChildrenAges": [],
"PaxNames": [
{
"FirstName": "Tom",
"LastName": "Lee",
"Type": "ADU"
}
],
"RoomCount": 1
}
],
"BookingTime": "2020-01-03 12:00:00"
}
],
"Page": 1,
"PageSize": 50,
"Total": 100
},
"ResponseHeader": {
"ResponseTime": "2018-07-26 09:51:32",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}Static Data
MealCode
Meal code
| MealCode | Description |
|---|---|
| 1 | No Breakfast |
| 2 | Breakfast |
| 3 | Lunch |
| 4 | Dinner |
| 5 | Lunch and Dinner |
| 6 | HalfBoard |
| 7 | FullBoard |
| 8 | AllInclusive |
| 9 | SelfCatering |
Hotel List
Retrieve static data for hotels.
API Call Schema
| Name | Value |
|---|---|
| Request URL | http://developers.tourmind.cn/v2/HotelStaticList |
| Request method | POST |
{
"CountryCode": "CN",
"HotelIds": [],
"Lang": "zh-CN",
"Pagination": {
"PageIndex": 1,
"PageSize": 10
},
"RequestHeader": {
"AgentCode": "tms_test",
"Password": "tms_test",
"RequestTime": "2018-07-26T09:51:32.123Z",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"UserName": "tms_test"
}
}{
"Error": {
"ErrorCode": "101",
"ErrorMessage": "invaild param"
},
"HotelStaticListResult": {
"Hotels": [
{
"Address": "3007 Santa Monica Blvd, 90404",
"AmenitiesHotel": [
{
"name": "Golfing nearby"
}
],
"AmenitiesRoom": [
{
"name": "Golfing nearby"
}
],
"CityCode": "14209",
"CityName": "ShangHai",
"CityNameCN": "Shanghai",
"CountryCode": "CN",
"Description": {
"Attractions": "Qijang Park - 1 km / 0.6 mi. Xingzhong Plaza - 1 km / 0.6 mi.",
"BusinessAmenities": "Featured amenities include a business center, limo/town car service, and express check-in.",
"Headline": "In Zhongshan (West District)",
"Location": "You'll be centrally located in Zhongshan, within a 15-minute walk of Qijang Park and Xingzhong Plaza.",
"Rooms": "Make yourself at home in one of the 362 air-conditioned rooms featuring refrigerators and LCD televisions."
},
"HotelId": "739315",
"Images": [
{
"links": {}
}
],
"Latitude": "34.03644",
"Longitude": "-118.47048",
"Name": "Days Inn Santa Monica/Los Angeles",
"Phone": "1523333333",
"StarRating": "5"
}
],
"Pagination": {
"PageCount": 1,
"TotalCount": 10
}
},
"ResponseHeader": {
"ResponseTime": "2018-07-26 09:51:32",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}Region List
Retrieve the list of regions.
API Call Schema
| Name | Value |
|---|---|
| Request URL | http://developers.tourmind.cn/v2/RegionList |
| Request method | POST |
{
"CountryCode": "CN",
"Pagination": {
"PageIndex": 1,
"PageSize": 10
},
"RequestHeader": {
"AgentCode": "tms_test",
"Password": "tms_test",
"RequestTime": "2018-07-26T09:51:32.123Z",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"UserName": "tms_test"
}
}{
"Error": {
"ErrorCode": "101",
"ErrorMessage": "invaild param"
},
"RegionListResult": {
"Regions": [
{
"CountryCode": "231",
"Name": "ShangHai",
"NameCN": "Shanghai",
"RegionID": "21312541",
"RegionNameLong": "Shanghai, China",
"RegionNameLongCN": "Shanghai, China"
}
]
},
"ResponseHeader": {
"ResponseTime": "2018-07-26 09:51:32",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}Hotel Room Type List
Retrieve the list of room information of sepecific hotels.
API Call Schema
| Name | Value |
|---|---|
| Request URL | http://developers.tourmind.cn/v2/RoomStaticList |
| Request method | POST |
{
"HotelCode": 235113,
"RequestHeader": {
"AgentCode": "tms_test",
"Password": "tms_test",
"RequestTime": "2018-07-26T09:51:32.123Z",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"UserName": "tms_test"
}
}{
"Error": {
"ErrorCode": "101",
"ErrorMessage": "invaild param"
},
"ResponseHeader": {
"ResponseTime": "2018-07-26 09:51:32",
"TransactionID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
},
"RoomTypes": [
{}
]
}Certification
Please complete all test cases in the Test Cases document.
