Label Template API

Manage printable label templates — retrieve, create, update, and delete

Base URL

https://{tenant}.logzi.com/api/label_template/

Every request returns a JSON response. On success result.code == 1, on failure result.code == 0. A label template describes a printable product tag or barcode layout — with width, height, orientation, and the template's source content.

GET /api/label_template/get

Retrieve a single label template by ID.

Query parameters

ParameterTypeRequiredDescription
idintLabel template ID

Example request

GET /api/label_template/get?id=3
X-API-KEY: {your_api_key}
GET /api/label_template/list

Retrieve a paginated list of label templates.

Query parameters

ParameterTypeRequiredDescription
list_offsetintPagination offset (default: 0)
list_conditionobjectFilter conditions object

Example request

GET /api/label_template/list?list_offset=0
X-API-KEY: {your_api_key}
POST /api/label_template/save

Create or update a label template. Use data[id] = 0 for a new template.

POST fields — data object

FieldTypeRequiredDescription
idint0 = new template, >0 = update
template_namestringTemplate name
template_sourcestringTemplate source content (HTML/ZPL/etc.)
template_widthintTemplate width (mm)
template_heightintTemplate height (mm)
orientationstringOrientation (portrait or landscape)

Example request

POST /api/label_template/save
X-API-KEY: {your_api_key}
Content-Type: application/json

{
  "data": {
    "id": 0,
    "template_name": "Raktári vonalkód 58mm",
    "template_source": "<div>{{barcode}}</div>",
    "template_width": 58,
    "template_height": 40,
    "orientation": "landscape"
  }
}
POST /api/label_template/delete

Delete a label template by ID. Only removable templates (removeable = 1) can be deleted.

POST fields

FieldTypeRequiredDescription
idintID of the template to delete

Example request

POST /api/label_template/delete
X-API-KEY: {your_api_key}
Content-Type: application/json

{ "id": 3 }

Get in touch with us

Interested in our software? Feel free to write to us!

Need help?

If you can't find the answer and need assistance

Create your account now,
pay later!

Try it free for 3 days, no risk, no obligation!