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#
| Parameter | Type | Required | Maximum length | Example | Description |
|---|---|---|---|---|---|
| code | Integer | Y | - | ||
| content | List<HotelsResponse> | N | - | Response body contents | |
| message | String | N | 500 | ||
| responseDes | String | N | 2000 | Detailed description of error message, for daily troubleshooting use |
HotelsResponse#
| Parameter | Type | Required | Maximum length | Example | Description |
|---|---|---|---|---|---|
| hotelId | String | Y | 32 | 12 * * 567 | Hotel ID |
| hotelName | String | Y | 128 | Hanting | Hotel Name |
Responsecode#
| Exception Code | Exception Type | Description |
|---|---|---|
| 1000 | Success | |
| 3101 | No match found | No matching data found |
| 3102 | The number of requests exceeded the daily limit | |
| Others | Global Exception Code | Global Exception [Reference] |
Message example#
Case1: Check hotel list#
Request Example#
Only pass the parameter Common Request Header [reference] in the header