用戶管理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<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說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| guest_id | String | Body | 客人ID |
| guest_name | String | Body | 客人名稱 |
| String | Body | 郵箱 | |
| phone | String | Body | 電話 |
| id_card | String | Body | 身份證 |
| passport | String | Body | 護照 |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_guest_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"guest_id": "gx9a621c1ae77040d697bd2134700f57e",
"guest_name": "test",
"email": "test@akubela.com",
"phone": "1234567",
"id_card": "1234567890",
"passport": ""
}
]
}
失敗返回示例
見 接口失敗返回
獲取客人信息
接口地址
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說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| guest_id | String | Body | 是 | 客人ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| guest_name | String | Body | 客人名稱 |
| String | Body | 郵箱 | |
| phone | String | Body | 電話 |
| id_card | String | Body | 身份證 |
| passport | String | Body | 護照 |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_guest_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"guest_id": "gx9a621c1ae77040d697bd2134700f57e"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": {
"guest_name": "test",
"email": "test@akubela.com",
"phone": "1234567",
"id_card": "1234567890",
"passport": ""
}
}
失敗返回示例
見 接口失敗返回
創建客人信息
接口地址
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說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| guest_name | String | Body | 是 | 客人名稱 |
| String | Body | 是 | 郵箱 | |
| phone | String | Body | 是 | 電話 |
| id_card | String | Body | 是 | 身份證 |
| passport | String | Body | 是 | 護照 |
| order_id | String | Body | 是 | 訂單ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| guest_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_guest_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"guest_name": "test",
"email": "test@akubela.com",
"phone": "1234567",
"id_card": "1234567890",
"passport": "",
"order_id": "oc45e846ca23ab42c9ae469d988ae32a9"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"guest_id": "g2a621c1ae77040d697bd2134700f57ea"
}
}
失敗返回示例
見 接口失敗返回
更新客人信息
接口地址
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說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| guest_id | String | Body | 是 | 客人ID |
| guest_name | String | Body | 是 | 客人名稱 |
| String | Body | 是 | 郵箱 | |
| phone | String | Body | 是 | 電話 |
| id_card | String | Body | 是 | 身份證 |
| passport | 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_guest_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"guest_id": "g2a621c1ae77040d697bd2134700f57ea",
"guest_name": "test",
"email": "test@akubela.com",
"phone": "1234567",
"id_card": "1234567890",
"passport": ""
}
}
成功返回示例
狀態碼: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說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| guest_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_guest_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"guest_id": "grbr2c4b070cc928496198944858b344f"
}
}
成功返回示例
狀態碼: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說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| member_id | String | Body | 會員ID |
| member_name | String | Body | 會員名稱 |
| String | Body | 郵箱 | |
| phone | String | Body | 電話 |
| created_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_member_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"member_id": "mx9a621c1ae77040d697bd2134700f57e",
"member_name": "test",
"email": "test@akubela.com",
"phone": "1234567",
"created_time": "2025-02-19 17:02:23"
}
]
}
失敗返回示例
見 接口失敗返回
獲取會員信息
接口地址
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說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| member_id | String | Body | 是 | 會員ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| member_name | String | Body | 會員名稱 |
| String | Body | 郵箱 | |
| phone | String | Body | 電話 |
| created_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_member_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"member_id": "mx9a621c1ae77040d697bd2134700f57e"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": {
"member_name": "test",
"email": "test@akubela.com",
"phone": "1234567",
"created_time": "2025-02-19 17:02:23"
}
}
失敗返回示例
見 接口失敗返回
創建會員信息
接口地址
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說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| member_name | String | Body | 是 | 會員名稱 |
| String | Body | 是 | 郵箱 | |
| phone | String | Body | 是 | 電話 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| member_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_member_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"member_name": "test",
"email": "test@akubela.com",
"phone": "1234567"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"member_id": "m2a621c1ae77040d697bd2134700f57ea"
}
}
失敗返回示例
見 接口失敗返回
更新會員信息
接口地址
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說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| member_id | String | Body | 是 | 會員ID |
| member_name | String | Body | 是 | 會員名稱 |
| String | Body | 是 | 郵箱 | |
| phone | 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_member_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"member_id": "m2a621c1ae77040d697bd2134700f57ea",
"member_name": "test",
"email": "test@akubela.com",
"phone": "1234567"
}
}
成功返回示例
狀態碼: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說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| member_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_member_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"member_id": "mrbr2c4b070cc928496198944858b344f"
}
}
成功返回示例
狀態碼: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說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| staff_id | String | Body | 員工ID |
| staff_name | String | Body | 員工名稱 |
| String | Body | 郵箱 | |
| phone | String | Body | 電話 |
| created_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_staff_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"staff_id": "sx9a621c1ae77040d697bd2134700f57e",
"staff_name": "test",
"email": "test@akubela.com",
"phone": "1234567",
"created_time": "2025-02-19 17:02:23"
}
]
}
失敗返回示例
見 接口失敗返回
獲取員工信息
接口地址
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說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| staff_id | String | Body | 是 | 員工ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| staff_name | String | Body | 員工名稱 |
| String | Body | 郵箱 | |
| phone | String | Body | 電話 |
| created_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_staff_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"staff_id": "sx9a621c1ae77040d697bd2134700f57e"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": {
"staff_name": "test",
"email": "test@akubela.com",
"phone": "1234567",
"created_time": "2025-02-19 17:02:23"
}
}
失敗返回示例
見 接口失敗返回
創建員工信息
接口地址
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說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| staff_name | String | Body | 是 | 員工名稱 |
| String | Body | 是 | 郵箱 | |
| phone | String | Body | 是 | 電話 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| staff_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_staff_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"staff_name": "test",
"email": "test@akubela.com",
"phone": "1234567"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"staff_id": "s2a621c1ae77040d697bd2134700f57ea"
}
}
失敗返回示例
見 接口失敗返回
更新員工信息
接口地址
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說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| staff_id | String | Body | 是 | 員工ID |
| staff_name | String | Body | 是 | 員工名稱 |
| phone | 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_staff_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"staff_id": "s2a621c1ae77040d697bd2134700f57ea",
"staff_name": "test",
"phone": "1234567"
}
}
成功返回示例
狀態碼: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說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| staff_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_staff_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"staff_id": "srbr2c4b070cc928496198944858b344f"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回