Create Company With Siteinfo
Description
新增公司與站台資料
Resource
POST /v1/basic/create_company_data
Authorization
採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login。
Request Body Parameters
| Name | Type | Description |
|---|---|---|
| company_id | string | 公司代碼 |
| company_name | string | 公司名稱 |
| authkey | string | 金鑰 長度:32 容許:數字小寫字母 |
| is_online | bool | 是否顯示 |
| site_info | Site Info | 站台資料 |
| site_config | Site Config | 站台設定 |
| users | User[] | 使用者帳號清單 (Option) |
Request Body Parameters - Site Info
| Name | Type | Description |
|---|---|---|
| web_title | string | 網站標題 |
| pos_url | string | POS網址 建議內容: http://40.83.96.208:8080/VipAppService/ServiceVipApp.asmx?wsdl |
| ticket_url | string | 票券網址 建議內容: 空字串 |
| allow_ips | [string] | 允許主機同步IP(s) 建議內容: ['192.168.0.1', '127.0.0.1'] |
| auto_resync_order | bool | 自動補傳訂單(門市若無POS接單,請帶False) |
| amount_calc_type | string (enum) |
金額計算類型 ALLOWED VALUES:
|
| enable_cloud_wise | bool | cloud wise啟用開關 (Option) |
| cloud_wise_url | string | cloud wise網址 (Option) |
Request Body Parameters - Site Config
| Name | Type | Description |
|---|---|---|
| order_sync_url | string | 接單網址 建議內容: https://kiosk.lafresh.com.tw:28051 |
Request Body Parameters - User
| Name | Type | Description |
|---|---|---|
| userid | string | 登入帳號 最小長度: 4 |
| username | string | 姓名 |
| passwd | string | 密碼 最小長度: 1 |
| userlevel | string | 權限等級(需為 userlevel 資料表中有效的 levelid,例如 A00、S00) |
| shop_id | string | 門市代碼(填入時為門市層級使用者,留空時為公司層級使用者)(Option) |
| string | 連絡信箱 (Option) | |
| dept | string | 單位名稱 (Option) |
| isonline | integer | 是否啟用 ALLOWED VALUES: 0=停用、1=啟用 預設: 1 (Option) |
| ismail | integer | 接收通知 ALLOWED VALUES: 0=否、1=是 預設: 0 (Option) |
| notes | string | 備註 (Option) |
Request Body Example
{
"company_id": "A123456789",
"company_name": "範例公司",
"authkey": "yt532l5w5519z7lr9f3kt18s6fvn8fgm",
"is_online": true,
"site_info":{
"web_title": "範例公司的官方網站",
"pos_url": "http://40.83.96.208:8080/VipAppService/ServiceVipApp.asmx?wsdl",
"ticket_url": "",
"allow_ips": ["192.168.1.1", "192.168.1.2"],
"amount_calc_type": "0",
"auto_resync_order": false,
"enable_cloud_wise": true,
"cloud_wise_url": "http://google.com.tw"
},
"site_config":{
"order_sync_url": "https://kiosk.lafresh.com.tw:28051"
},
"users": [
{
"userid": "admin001",
"username": "系統管理員",
"passwd": "Pass1234",
"userlevel": "A00"
},
{
"userid": "store001",
"username": "門市主管",
"passwd": "Pass5678",
"userlevel": "S00",
"shop_id": "S0001",
"email": "[email protected]"
}
]
}
Response Body Parameters
| Name | Type | Description |
|---|---|---|
| company_id | string | 公司代碼 |
| company_name | string | 公司名稱 |
| authkey | string | 金鑰 長度:32 容許:數字小寫字母 |
Response Body Example
Status-Code: 200
{
"company_id": "A1235",
"company_name": "範例公司",
"authkey": "yt532l473319z7lr9f3kt18s6fvn8fgm"
}