Base URL
https://{tenant}.logzi.com/api/receipt_template/
Every request returns a JSON response. On success result.code == 1, on failure result.code == 0. A receipt template is an HTML/PDF print layout assigned to a specific receipt type — with orientation and a default flag.
/api/receipt_template/get
Retrieve a single print template by ID.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | int | Template ID |
Example request
GET /api/receipt_template/get?id=2
X-API-KEY: {your_api_key}
/api/receipt_template/list
Paginated list of print templates.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
list_offset | int | Pagination offset (default: 0) | |
list_condition | object | Filter conditions object |
Example request
GET /api/receipt_template/list?list_offset=0
X-API-KEY: {your_api_key}
/api/receipt_template/save
Create or update a print template. Use data[id] = 0 for a new template. Only removable templates (removeable = 1) can be deleted.
POST fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
id | int | 0 = new template, >0 = update | |
receipt_type_id | int | Receipt type ID | |
template_name | string | Template name | |
template_source | string | HTML template source | |
orientation | string | Orientation: portrait or landscape | |
template_default | int | 1 = default template for this type |
Example request
POST /api/receipt_template/save
X-API-KEY: {your_api_key}
Content-Type: application/json
{
"data": {
"id": 0,
"receipt_type_id": 8,
"template_name": "Számla A4 portrait",
"template_source": "<html>...</html>",
"orientation": "portrait",
"template_default": 1
}
}
/api/receipt_template/delete
Delete a print template by ID.
POST fields
| Field | Type | Required | Description |
|---|---|---|---|
id | int | ID of the template to delete |
Example request
POST /api/receipt_template/delete
X-API-KEY: {your_api_key}
Content-Type: application/json
{ "id": 2 }
Create your account now,
pay later!