##### Brief description The interface provides the price tag details, and the electronic price tag can obtain the display layout and binding of the price tag bound resources through the interface ##### Request URL Demo address - `http://demo.esltag.cc/openapi/easylabel` ##### Request method - GET ##### Request Message Example ```http GET /openapi/easylabel?appid=d114c07a-24ed-41b2-9cc3-58ae5bb9ace1_2303065600000005&clientid=2C0547C3661D&nlast=1&ts=1679539549647&sign=6B1C08604C09C08AF80DD251E019B152 HTTP/1.1 Host: demo.esltag.cc Accept: */* Content-Type: application/x-www-form-urlencoded; charset=UTF-8 ``` ##### Parameter | Parameter name | Required | Type | Example | Description | | --- | --- | --- | --- | --- | | `appid` | Yes | string | `d114c07a-24ed-41b2-9cc3-58ae5bb9ace1_2303065600000005` | Account AppID | | `clientid` | Yes | string | 2C05476AA26C | Price Tag serial number | | `version` | Yes | string | V3.34 | Firmware Version | | `nlast` | Yes | int | 0 | Synced data `nlast`, take the `Nlast` value of the last call to this interface, the default is 0 | | `ts` | Yes | long | 1679539549647 | Current timestamp is at 13 bits | | `sign` | Yes | string | `1E3B1050FBE6F1B53B4F858CD8E39***` | The signature value is calculated by the signature algorithm | ##### Response Message Example ```http HTTP/1.1 200 OK Content-Length: 121 Content-Type: application/json; charset=utf-8 ``` ##### Return an example ```json { "State": "Done", "Message": "获取成功", "Number": "", "Data": " { \"Id\":\"1\",\"ItemCode\":\"10001\",\"ItemName\":\"草莓\", \"Upgrade\":{\"version\":\"V1.00\",\"upgrade-url\":\"http://demo.esltag.cc/temp/engineer/pricetag/1.00\"}, \"LabelPicture\": {\"X\":0,\"Y\":640,\"Width\":800,\"Height\":640, \"PictureUrl\":\"http://demo.esltag.cc/storage/tag/草莓.jpg\", \"PictureMD5\":\"76C6DAE831896932C724E5FB28B32877\",\"PictureName\":\"草莓.jpg\"}, \"Media\": {\"X\":0,\"Y\":0,\"Width\":800,\"Height\":640, \"MediaList\": [ {\"MediaNo\":1, \"MediaUrl\":\"http://demo.esltag.cc/storage/video/草莓-竖向-半屏-1.lvbin\", \"MediaMD5\":\"9E06D4AB56BA815451024B94F9DC4497\", \"MediaName\":\"草莓-竖向-半屏-1.lvbin\", \"SwitchTime\": 3} {\"MediaNo\":2, \"MediaUrl\":\"http://demo.esltag.cc/storage/video/草莓-竖向-半屏-2.mp4\", \"MediaMD5\":\"8E67E4AB36BB832451022B96F9DC4382\", \"MediaName\":\"草莓-竖向-半屏-2.mp4\", \"SwitchTime\": 3} ] }, \"Nlast\":1 }", "Level": 0, "ErrorColumn": null } ``` ##### Return parameter description ###### Public parameters | Parameter name | Type | Explain | | --- | --- | --- | | `State` | string | Return to the status code, Done / Fail | | `Message` | string | Return information | | `Number` | string | Error code | | `Data` | string | The string of the json data transformation | ###### Data Parameter | Parameter name | Type | Explain | | --- | --- | --- | | `Id` | string | Order number | | `ItemCode` | string | Price sign code | | `ItemName` | string | Price sign name | | `LabelPicture` | json | Picture content | | `Media` | json | Rotating Play content | | `Nlast` | int | Device side checks whether the content has been updated, Next request this interface is used as a parameter | ###### Upgrade Parameter | Parameter name | Type | Explain | | --- | --- | --- | | `version` | string | Firmware version | | `upgrade-url` | string | Firmware upgrade address | ###### LabelPicture Parameter | Parameter name | Type | Explain | | --- | --- | --- | | `X` | int | Abscissa | | `Y` | int | Ordinate | | `Width` | int | Width | | `Height` | int | Height | | `PictureUrl` | string | Image file address | | `PictureMD5` | string | Picture file MD5 value | | `PictureName` | string | Image file name | ###### Media Parameter | Parameter name | Type | Explain | | --- | --- | --- | | `X` | int | Abscissa | | `Y` | int | Ordinate | | `Width` | int | Width | | `Height` | int | Height | | `MediaList` | jsonarray | Rotating Playlist | ###### MediaList Parameter | Parameter name | Type | Explain | | --- | --- | --- | | `MediaNo` | int | Order number | | `MediaUrl` | string | file address | | `MediaMD5` | string | file with an MD5 value | | `MediaName` | string | file name | | `SwitchTime` | int | Switching time (Second) | ##### Remarks - The original LableVideo video carousel function can still be used. Added Media field, supporting mixed playback of images and videos. Mixed playback requires device firmware updates to version 3.26 or higher. - MediaList is a carousel list that supports file formats: video mp4 (720p) and image lvbin. - Note that images only support lvbin documents. lvbin documentation description: 1. Composition of document. lvbin: document header+content 2. The information header structure is as follows: ```cpp typedef struct { uint32_t cf : 5; /*Color format: See \`lv_img_color_format_t\`*/ uint32_t always_zero : 3; /*It the upper bits of the first byte. Always zero to look like a non-printable character*/ uint32_t reserved : 2; /*Reserved to be used later*/ uint32_t w : 11; /*Width of the image map*/ uint32_t h : 11; /*Height of the image map*/ } lv_img_header_t; ```