项目管理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说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| project_id | String | Body | 项目ID |
| project_name | String | Body | 项目名称 |
| currency | String | Body | 货币 |
| visit_url | String | Body | 访问地址 |
| address | Object<address> | Body | 地址 |
| room | Object<room> | Body | 房间信息 |
| device | Object<device> | Body | 设备信息 |
address说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| country | String | Body | 国家 |
| state_province | String | Body | 州/省份 |
| city | String | Body | 城市 |
| street | String | Body | 街道 |
| postcode | String | Body | 邮编 |
room说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| to_stay | Integer | Body | 待入住 |
| checked_out | Integer | Body | 已退房 |
| dirty | Integer | Body | 脏房间 |
| vacant_dirty | Integer | Body | 空脏房间 |
| occupied_dirty | Integer | Body | 住客脏房间 |
| vacant_clean | Integer | Body | 空干净房间 |
| occupied_clean | Integer | Body | 住客干净房间 |
| dnd | Integer | Body | 勿扰房间 |
| vacant_today | Integer | Body | 今日空房 |
| checked_in_today | Integer | Body | 今日入住 |
| number_of_staying_today | Integer | Body | 今日入住人数 |
| occupancy_rate_today | Integer | Body | 今日入住率 |
device说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| total | Integer | Body | 总数 |
| online | Integer | Body | 在线 |
| offline | Integer | Body | 离线 |
| low_power | Integer | Body | 低电量 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_project_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52",
"project_name": "test",
"currency": "USD:US Dollar",
"visit_url": "https://test.akubela.com/g",
"address": {
"country": "Austria",
"state_province": "Tirol",
"city": "Absam",
"street": "test",
"postcode": "0000001"
},
"room": {
"to_stay": 0,
"checked_out": 0,
"dirty": 0,
"vacant_dirty": 0,
"occupied_dirty": 0,
"vacant_clean": 0,
"occupied_clean": 0,
"dnd": 0,
"vacant_today": 0,
"checked_in_today": 0,
"number_of_staying_today": 0,
"occupancy_rate_today": 0
},
"device": {
"total": 0,
"online": 0,
"offline": 0,
"low_power": 0
}
}
}
失败返回示例
见 接口失败返回
更新项目信息
接口地址
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说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| currency | String | Body | 是 | 货币 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| 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_project_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"currency": "USD:US Dollar"
}
}
成功返回示例
状态码: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 | Body | 是 | 命令参数 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| currency | String | Body | 货币 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_currency_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"currency": "USD:US Dollar"
}
]
}
失败返回示例
见 接口失败返回