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.
/api/label_template/get
Retrieve a single label template by ID.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | int | Label template ID |
Example request
GET /api/label_template/get?id=3
X-API-KEY: {your_api_key}
/api/label_template/list
Retrieve a paginated list of label templates.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
list_offset | int | Pagination offset (default: 0) | |
list_condition | object | Filter conditions object |
Example request
GET /api/label_template/list?list_offset=0
X-API-KEY: {your_api_key}
/api/label_template/save
Create or update a label template. Use data[id] = 0 for a new template.
POST fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
id | int | 0 = new template, >0 = update | |
template_name | string | Template name | |
template_source | string | Template source content (HTML/ZPL/etc.) | |
template_width | int | Template width (mm) | |
template_height | int | Template height (mm) | |
orientation | string | Orientation (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"
}
}
/api/label_template/delete
Delete a label template by ID. Only removable templates (removeable = 1) can be deleted.
POST fields
| Field | Type | Required | Description |
|---|---|---|---|
id | int | ID of the template to delete |
Example request
POST /api/label_template/delete
X-API-KEY: {your_api_key}
Content-Type: application/json
{ "id": 3 }
Create your account now,
pay later!