Query PTL Tags Information
Introduction to the API:
Query all PTL tags information
Basic Information:
| Attributes | 接口信息 | 
| Status | Finished | 
| URL | http://localhost/wms/associate/getTagsMsg | 
| Request Method | GET/POST | 
| Content-Type | multipart/form-data | 
Request parameters:
Parameter Description:
| Attributes | Value | Required | Comment | 
Response parameters:
| Attributes | Value | Types | Comment | 
| lastOpreateTime | "2021-10-13 03:32:30" | string | Last opreate TIme | 
| mac | "99.97.36.55" | string | Tag mac/Tag ID | 
| power | 100 | string | Battery power(0~100) | 
| routerid | CWR000001 | string | ID of BindRouter | 
| rssi | -26 | int | Signal strength (-100 ~ 0) | 
| showStyle | "Picking Template" | string | Using template name | 
Response example:
| [ { "lastOpreateTime": "2021-10-13 03:32:29", "mac": "99.97.36.55", "power": 100, "routerid": "CWR000001", "rssi": -30, "showStyle": "Picking Template" }, { "lastOpreateTime": "2021-10-13 03:32:30", "mac": "99.97.36.53", "power": 100, "routerid": "CWR000001", "rssi": -26, "showStyle": "Picking Template" }, { "lastOpreateTime": "2021-10-13 03:32:33", "mac": "99.97.36.48", "power": 88, "routerid": "CWR000001", "rssi": -39, "showStyle": "Picking Template" } ] | 
Update PTL Screen display
Introduction to the API:
Update PTL Screen display
Basic Information:
| Attributes | 接口信息 | 
| Status | Finished | 
| URL | http://localhost/wms/associate/updateScreen | 
| Request Method | POST | 
| Content-Type | application/json | 
Request parameters:
Parameter Description:
| Attributes | Types | Required | Comment | 
| mac | string | yes | Tag mac / Tag ID | 
| styleid | int | yes | Template ID | 
| outtime | int | Yes | Lighting timeout time(s); 0 : never turn off n : turn off autoAutomatically after n seconds | 
| ledstate | int | Yes | lightint mode; 0, always on 1, quick flash 2, slow flash 3, turn off 6, backlight and rgbled both on n, flashing as period n(ms) | 
| ledrgb | string | Yes | led color: red,ledrgb =“ff0000”; green,ledrgb=“ff00”; blue,ledrgb=“ff”; yellow,ledrgb=“ffff00”; white,ledrgb=“ffffff”; pueple,ledrgb= “ff00ff”; light blue,ledrgb= “ffff”; no color, ledrgb=“0” | 
| cmdtoken | string | optional | Extended parameters, it can use for token or taskid | 
| LGPLA | string | optional | Filed created in template | 
| MATNR | string | optional | Filed created in template | 
| STOCK | string | optional | Filed created in template | 
| MENGE | string | optional | Filed created in template | 
| QRCODE | string | optional | Filed created in template | 
Raw example:
| [ { "mac":"99.96.19.66", "styleid":35, "ledrgb":"ff00", "ledstate":0, "outtime":0, "LGPLA":"***", "MATNR":"***", "KNMAT":"***", "STOCK":"***", "BATCH":"***", "MENGE":"***", "QRCODE":"***", "Inventec":"***" }, { "mac":"99.96.19.65", "styleid":35, "ledrgb":"ff00", "ledstate":0, "outtime":0, "LGPLA":"***", "MATNR":"***", "KNMAT":"***", "STOCK":"***", "BATCH":"***", "MENGE":"***", "QRCODE":"***", "Inventec":"***" } ] | 
Response parameters:
| Attributes | Value | Types | Comment | 
Response example:
| true | 
Note: The fields parameters are according the according to the template you used. This API does not support lighting Leds of Multi-led PTL(External power supply version) , only refreshing the screen
Callback of UpdateScreen result
Introduction to the API:
Notification the update result of PTL
Basic Information:
| Attributes | 接口信息 | 
| Status | Finished | 
| URL | URL of user's callback API | 
| Request Method | POST | 
| Content-Type | application/json | 
Request parameters:
Parameter Description:
| Attributes | Types | Required | Comment | 
| mac | string | yes | Tag mac / Tag ID | 
| power | int | yes | Battery power(0~100) | 
| result | bool | Yes | True :ok; False: failed; | 
| cmdtoken | string | optional | Return the cmdtoken passed in the call request | 
| lednum | string | optional | No use | 
| message | int | Yes | 数据成功;(send ok) 数据失败;(send failed) 数据发送超时;(send timeout) 唤醒失败;(wake up failed) 基站不在线;(router offline) 数据异常;(Abnormal data) 数据格式不正确,解析失败;(incorrect data format) 参数格式不正确或参数不全; (Missing required parameters) 无法执行;(Unable to execute) 标签不存在;(Tag does not exist) | 
Parameters example:
| {"cmdtoken":"1634826092022","lednum":0,"mac":"99.26.99.36","message":"数据成功","power":100,"result":true} | 
Callback of button event
Introduction to the API:
Notification of button event.
Basic Information:
| Attributes | 接口信息 | 
| Status | Finished | 
| URL | URL of user's callback API | 
| Request Method | POST | 
| Content-Type | application/json | 
Request parameters:
Parameter Description:
| Attributes | Types | Required | Comment | 
| mac | string | yes | Tag mac / Tag ID | 
| result | bool | Yes | result=0,right-lower button; result=1,left-top button; result=2,left-middle button; result=3,left-lower button; | 
Parameters example:
Json object
| {"mac":"92.91.34.99","result":1} | 
Light Leds of PTL(Battery power supply)
Introduction to the API:
Query all PTL tags information
Basic Information:
| Attributes | 接口信息 | 
| Status | Finished | 
| URL | http://localhost/wms/associate/lightTagsLed | 
| Request Method | POST | 
| Content-Type | application/json | 
Request parameters:
Parameter Description:
| Attributes | Types | Required | Comment | 
| mac | string | yes | Tag mac / Tag ID | 
| outtime | int | Yes | Lighting timeout time(s); 0 : never turn off n : turn off autoAutomatically after n seconds | 
| lednum | int | Yes | Specify the number of Leds (1,2,3,4) | 
| ledstate | int | Yes | lightint mode; 0, always on 1, quick flash 2, slow flash 3, turn off 4, turn off all | 
| ledrgb | string | Yes | led color: red,ledrgb =“ff0000”; green,ledrgb=“ff00”; blue,ledrgb=“ff”; yellow,ledrgb=“ffff00”; white,ledrgb=“ffffff”; purple,ledrgb=“ff00ff”; light blue,ledrgb= “ffff”; no color, ledrgb=“0” | 
| cmdtoken | string | optional | Extended parameters, it can use as token or taskid | 
| reserve | string | optional | Reserve | 
Raw example:
| [ { "mac":"99.29.03.13", "timeout":0, "ledrgb":"ffff00", "ledmode":0, "buzzer":0, "reserve":"reserve" }, { "mac":"99.29.05.33", "timeout":0, "ledrgb":"ff00ff", "ledmode":0, "buzzer":0, "reserve":"reserve" } ] | 
Response parameters:
| Attributes | Value | Types | Comment | 
Response example:
| true | 
Callback of Light Leds Result
Introduction to the API:
Notification the result of Light Leds
Basic Information:
| Attributes | 接口信息 | 
| Status | Finished | 
| URL | URL of user's callback API | 
| Request Method | POST | 
| Content-Type | application/json | 
Request parameters:
Parameter Description:
| Attributes | Types | Required | Comment | 
| mac | string | yes | Tag mac / Tag ID | 
| power | int | yes | Battery power(0~100) | 
| result | bool | Yes | true :ok; false: failed; | 
Parameters example:
| {"mac":"99.26.39.63","power":100,"result":true} | 
Light Roadway Lights
Introduction to the API:
Light Roadway Lights all PTL tags information
Basic Information:
| Attributes | 接口信息 | 
| Status | Finished | 
| URL | http://localhost/wms/associate/ctrlShelfIndicator | 
| Request Method | POST | 
| Content-Type | application/json | 
Request parameters:
Parameter Description:
| Attributes | Types | Required | Comment | 
| mac | string | yes | Tag mac / Tag ID | 
| timeout | int | yes | Lighting timeout time(s); 0 : never turn off n : turn off autoAutomatically after n seconds | 
| ledrgb | string | yes | red:ff0000; red Led On green:ff00;green Led On yellow:ffff00; yellow Led On | 
| ledstate | int | Yes | lightint mode; 0, always on 1, quick flash 2, slow flash | 
| buzzer | int | yes | 0:Buzzer off,1:Buzzer on | 
| reserve | string | optional | reserve | 
Raw example:
| [ { "mac":"99.29.03.13", "lednum":1, "timeout":0, "ledrgb":"ffff00", "ledmode":0, "buzzer":0, "cmdtoken":"123456", "reserve":"reserve" }, { "mac":"99.29.05.33", "lednum":1, "timeout":0, "ledrgb":"ff00ff", "ledmode":0, "buzzer":0, "cmdtoken":"123456", "reserve":"reserve" } ] | 
Response example:
| true | 
Callback of Light Roadway Lights Result
Introduction to the API:
Notification the result of Light Roadway Lights
Basic Information:
| Attributes | 接口信息 | 
| Status | Finished | 
| URL | URL of user's callback API | 
| Request Method | POST | 
| Content-Type | application/json | 
Request parameters:
Parameter Description:
| Attributes | Types | Required | Comment | 
| mac | string | yes | Tag mac / Tag ID | 
| result | bool | Yes | true :ok; false: failed; | 
Parameters example:
| {"mac":"99.26.39.63","result":true} | 
Setting URL of user's callback API
Login wms system with admin user,go to “System Information”->“Third-party configuration”,you can config the Callback URL here:

| 反馈类型 | 描述 | 地址 | 
| Callback of UpdateScreen result | updateTagResult | URL of user's callback API | 
| Callback of button event | enterKey | URL of user's callback API | 
| Callback of Light Leds Result | ctrlShelfIndicatorResult | URL of user's callback API | 



















