房間管理API
獲取房間列表
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object | Body | 是 | 命令參數 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| building_id | String | Body | 樓棟ID |
| building_name | String | Body | 樓棟名稱 |
| floors | []Object<floor> | Body | 樓層信息 |
floor說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| floor_id | String | Body | 樓層ID |
| floor_name | String | Body | 樓層名稱 |
| residences | []Object<residence> | Body | 住宅信息 |
residence說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| residence_id | String | Body | 住宅ID |
| residence_no | String | Body | 住宅號碼 |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_room_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"building_id": "bx9a621c1ae77040d697bd2134700f57e",
"building_name": "test",
"floors": [
{
"floor_id": "fx9a621c1ae77040d697bd2134700f572",
"floor_name": "1",
"residences": [
{
"residence_id": "rx9a621c1ae77040d697bd2134700f574",
"residence_name": "101"
}
]
}
]
}
]
}
失敗返回示例
見 接口失敗返回
獲取房間信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| building_id | String | Body | 樓棟ID |
| building_name | String | Body | 樓棟名稱 |
| floor_id | String | Body | 樓層ID |
| floor_name | String | Body | 樓層名稱 |
| residence_no | String | Body | 住宅號碼 |
| room_type_id | String | Body | 房間類型ID |
| room_type_name | String | Body | 房間類型名稱 |
| room_tag_id | String | Body | 房間標籤ID |
| room_tag_name | String | Body | 房間標籤名稱 |
| order_id | String | Body | 訂單ID |
| dirty | Boolean | Body | 判斷是否髒房間 true:是 false:否 |
| occupied | Boolean | Body | 判斷房間是否佔用 true:是 false:否 |
| dnd | Boolean | Body | 判斷房間是否勿擾 true:是 false:否 |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_room_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "rx9a621c1ae77040d697bd2134700f57v"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": {
"building_id": "brx9a621c1ae77040d697bd2134700f57",
"building_name": "test",
"floor_id": "fbrx9a621c1ae77040d697bd2134700f5",
"floor_name": "test",
"residence_no": "101",
"room_type_id": "rfbrx9a621c1ae77040d697bd2134700f",
"room_type_name": "test",
"room_tag_id": "rrfbrx9a621c1ae77040d697bd2134700",
"room_tag_name": "big",
"order_id": "orrfbrx9a621c1ae77040d697bd213470",
"dirty": true,
"occupied": true,
"dnd": false
}
}
失敗返回示例
見 接口失敗返回
更新房間狀態
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| dirty | Boolean | Body | 是 | 判斷是否髒房間 true:是 false:否 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_room_state",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"dirty": true
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
獲取房間類型列表
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| page_size | Integer | Body | 是 | 每頁數量 |
| page_index | Integer | Body | 是 | 當前頁數 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| room_type_id | String | Body | 房間類型ID |
| room_type_name | String | Body | 房間類型名稱 |
| bed | Integer | Body | 牀位 |
| occupancy | Integer | Body | 可入住人數 |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_room_type_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"room_type_id": "rx9a621c1ae77040d697bd2134700f57e",
"room_type_name": "test",
"bed": 2,
"occupancy": 2
}
]
}
失敗返回示例
見 接口失敗返回
獲取房間類型信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| room_type_id | String | Body | 是 | 房間類型ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| room_type_name | String | Body | 房間類型名稱 |
| bed | Integer | Body | 牀位 |
| occupancy | Integer | Body | 可入住人數 |
| residences | []Object<residence> | Body | 住宅信息 |
residence說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| residence_id | String | Body | 住宅ID |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_room_type_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"room_type_id": "rx9a621c1ae77040d697bd2134700f57e"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": {
"room_type_name": "test",
"bed": 2,
"occupancy": 2,
"residences": [
{
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
]
}
}
失敗返回示例
見 接口失敗返回
創建房間類型信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| room_type_name | String | Body | 是 | 房間類型名稱 |
| bed | Integer | Body | 是 | 牀位 |
| occupancy | Integer | Body | 是 | 可入住人數 |
| residences | []Object<residence> | Body | 是 | 住宅信息 |
residence說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| room_type_id | String | Body | 房間類型ID |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_room_type_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"room_type_name": "test",
"bed": 2,
"occupancy": 2,
"residences": [
{
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
]
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"room_type_id": "r2a621c1ae77040d697bd2134700f57ea"
}
}
失敗返回示例
見 接口失敗返回
更新房間類型信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| room_type_id | String | Body | 是 | 房間類型ID |
| room_type_name | String | Body | 是 | 房間類型名稱 |
| bed | Integer | Body | 是 | 牀位 |
| occupancy | Integer | Body | 是 | 可入住人數 |
| residences | []Object<residence> | Body | 是 | 住宅信息 |
residence說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_room_type_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"room_type_id": "r2a621c1ae77040d697bd2134700f57ea",
"room_type_name": "test",
"bed": 2,
"occupancy": 2,
"residences": [
{
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
]
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
刪除房間類型信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| room_type_id | String | Body | 是 | 房間類型ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_room_type_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"room_type_id": "rrbr2c4b070cc928496198944858b344f"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
獲取房間標籤列表
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| page_size | Integer | Body | 是 | 每頁數量 |
| page_index | Integer | Body | 是 | 當前頁數 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| room_tag_id | String | Body | 房間標籤ID |
| room_tag_name | String | Body | 房間標籤名稱 |
| residences | []Object<residence> | Body | 住宅信息 |
residence說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| residence_id | String | Body | 住宅ID |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_room_tag_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"room_tag_id": "rx9a621c1ae77040d697bd2134700f571",
"room_tag_name": "test",
"residences": [
{
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
]
}
]
}
失敗返回示例
見 接口失敗返回
獲取房間標籤信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| room_tag_id | String | Body | 是 | 房間標籤ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| room_tag_name | String | Body | 房間標籤名稱 |
| residences | []Object<residence> | Body | 住宅信息 |
residence說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| residence_id | String | Body | 住宅ID |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_room_tag_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"room_tag_id": "rx9a621c1ae77040d697bd2134700f572"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": {
"room_tag_name": "test",
"residences": [
{
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
]
}
}
失敗返回示例
見 接口失敗返回
創建房間標籤信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| room_tag_name | String | Body | 是 | 房間標籤名稱 |
| residences | []Object<residence> | Body | 是 | 住宅信息 |
residence說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| room_tag_id | String | Body | 房間標籤ID |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_room_tag_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"room_tag_name": "test",
"residences": [
{
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
]
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"room_tag_id": "r2a621c1ae77040d697bd2134700f57e2"
}
}
失敗返回示例
見 接口失敗返回
更新房間標籤信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| room_tag_id | String | Body | 是 | 房間標籤ID |
| room_tag_name | String | Body | 是 | 房間標籤名稱 |
| residences | []Object<residence> | Body | 是 | 住宅信息 |
residence說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_room_tag_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"room_tag_id": "r2a621c1ae77040d697bd2134700f57e1",
"room_tag_name": "test",
"residences": [
{
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
]
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
刪除房間標籤信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| room_tag_id | String | Body | 是 | 房間標籤ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_room_tag_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"room_tag_id": "rrbr2c4b070cc928496198944858b343f"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
獲取授權記錄列表
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| page_size | Integer | Body | 是 | 每頁數量 |
| page_index | Integer | Body | 是 | 當前頁數 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| record_id | String | Body | 記錄ID |
| authorization_number | String | Body | 授權編號 |
| access_type | String | Body | 授權方式 password:PIN碼 rf_card:射頻卡 qr_code:二維碼 |
| guest_id | String | Body | 客人ID |
| guest_name | String | Body | 客人名稱 |
| String | Body | 郵箱 | |
| phone | String | Body | 電話 |
| residence_id | String | Body | 住宅ID |
| residence_no | String | Body | 住宅號碼 |
| start_time | String | Body | 開始時間,UTC |
| finish_time | String | Body | 結束時間,UTC |
| authorization_status | String | Body | 授權狀態 |
| updated_time | String | Body | 更新時間,UTC |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_authorization_record_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"record_id": "rr31adc223cc4b3bedb6bd4742dedcfa5",
"authorization_number": "20250804152509933679",
"access_type": "password",
"guest_id": "grr31adc223cc4b3bedb6bd4742dedcfa",
"guest_name": "test",
"email": "",
"phone": "",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"residence_no": "12345",
"start_time": "2025-08-06 03:00:03",
"end_time": "2025-08-06 03:30:03",
"authorization_status": "expired",
"updated_at": "2025-08-06 04:00:03"
}
]
}
失敗返回示例
見 接口失敗返回
獲取授權記錄信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| record_id | String | Body | 是 | 記錄ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| authorization_number | String | Body | 授權編號 |
| access_type | String | Body | 授權方式 password:PIN碼 rf_card:射頻卡 qr_code:二維碼 |
| pin_code | String | Body | PIN碼 |
| rf_card_number | String | Body | 射頻卡號 |
| qr_code_url | String | Body | 二維碼地址 |
| guest_id | String | Body | 客人ID |
| guest_name | String | Body | 客人名稱 |
| String | Body | 郵箱 | |
| phone | String | Body | 電話 |
| residence_id | String | Body | 住宅ID |
| residence_no | String | Body | 住宅號碼 |
| start_time | String | Body | 開始時間,UTC |
| finish_time | String | Body | 結束時間,UTC |
| authorization_status | String | Body | 授權狀態 |
| updated_time | String | Body | 更新時間,UTC |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_authorization_record_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"record_id": "rr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": {
"authorization_number": "20250804152509933679",
"access_type": "password",
"pin_code": "123456",
"rf_card_number": "",
"qr_code_url": "",
"guest_id": "grr31adc223cc4b3bedb6bd4742dedcfa",
"guest_name": "test",
"email": "",
"phone": "",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"residence_no": "12345",
"start_time": "2025-08-06 03:00:03",
"end_time": "2025-08-06 03:30:03",
"authorization_status": "expired",
"updated_at": "2025-08-06 04:00:03"
}
}
失敗返回示例
見 接口失敗返回
創建授權記錄信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| room_tag_name | String | Body | 是 | 房間標籤名稱 |
| residences | []Object<residence> | Body | 是 | 住宅信息 |
residence說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| access_type | String | Body | 是 | 授權方式 password:PIN碼 rf_card:射頻卡 qr_code:二維碼 |
| pin_code | String | Body | 否 | PIN碼 |
| rf_card_number | String | Body | 否 | 射頻卡號 |
| qr_code_url | String | Body | 否 | 二維碼地址 |
| guest_id | String | Body | 是 | 客人ID |
| residence_id | String | Body | 是 | 住宅ID |
| start_time | String | Body | 是 | 開始時間,UTC |
| finish_time | String | Body | 是 | 結束時間,UTC |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| record_id | String | Body | 記錄ID |
| authorization_number | String | Body | 授權編號 |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_authorization_record_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"access_type": "password",
"pin_code": "123456",
"rf_card_number": "",
"qr_code_url": "",
"guest_id": "grr31adc223cc4b3bedb6bd4742dedcfa",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"start_time": "2025-08-06 03:00:03",
"end_time": "2025-08-06 03:30:03"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"record_id": "rr31adc223cc4b3bedb6bd4742dedcfa5",
"authorization_number": "20250804152509933679"
}
}
失敗返回示例
見 接口失敗返回
刪除授權記錄信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| record_id | String | Body | 是 | 記錄ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_authorization_record_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"record_id": "rr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回