[POST] .../v1/tag/add
Creates a new price tag template. Use this method to create a price tag template that can later be selected for printing labels. The method validates name and data, checks price tag add permission 127, inserts the template through the persistent layer and returns new_id. The request body is required, name must be provided and no longer than 150 characters and data must be provided and no longer than 65535 characters. Missing body, missing or too long name, missing or too long data, denied permission, duplicate template data and database errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| data | String | Required | Template data in text format. |
| name | String | Required | Price tag template name. |
Request Example
{
"name": "Shelf label 58mm",
"data": "\u003Chtml\u003E{{item.name}}\u003C/html\u003E"
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Insert | Created record result. |
Response Example
{
"ok": true,
"result": {
"new_id": 3
}
}