Hotel List

Get a list of hotels that have partnered online and opened

Special Scene Description#

When a hotel terminates cooperation offline (including hotel closure, etc.), this interface will not return any data of the hotel. Therefore, the caller needs to compare the last synchronized hotel list with the current latest hotel list, and remove the offline hotels that have terminated cooperation.

Request Method#

GET

uri: /hotels

Content-Type:application/json

Request parameter description#

RequestHeader#

Common Request Header [reference]


Response parameter description#

ParameterTypeRequiredMaximum lengthExampleDescription
codeIntegerY-
contentList<HotelsResponse>N-Response body contents
messageStringN500
responseDesStringN2000Detailed description of error message, for daily troubleshooting use

HotelsResponse#

ParameterTypeRequiredMaximum lengthExampleDescription
hotelIdStringY3212 * * 567Hotel ID
hotelNameStringY128HantingHotel Name

Responsecode#

Exception CodeException TypeDescription
1000Success
3101No match foundNo matching data found
3102The number of requests exceeded the daily limit
OthersGlobal Exception CodeGlobal Exception [Reference]

Message example#

Case1: Check hotel list#

Request Example#

Only pass the parameter Common Request Header [reference] in the header

Example of successful response#

{
"code": 1000,
"content ": [
{
"hotelId": "12**567 ",
"hotelName": "Hanting ***** Hotel"
},
{
"hotelId": "12**567 ",
"hotelName": "Hanting ***** Hotel"
}
]
}

Response Failure Example#

{
"code": 3101,
"message": "No match found"
}