Base URL
https://{tenant}.logzi.com/api/receipt_rule/
Every request returns a JSON response. On success result.code == 1, on failure result.code == 0. A receipt rule describes an automation flow — e.g. order → delivery note conversion, stock movement execution, webhook delivery, or printing. Rules can be run manually or on a schedule.
/api/receipt_rule/get
Retrieve a single rule by identifier.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | int | Rule identifier |
Example request
GET /api/receipt_rule/get?id=1
X-API-KEY: {your_api_key}
/api/receipt_rule/list
Paginated list of rules.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
list_offset | int | Pagination offset (default: 0) | |
list_condition | object | Filter conditions object |
Example request
GET /api/receipt_rule/list?list_offset=0
X-API-KEY: {your_api_key}
/api/receipt_rule/save
Create or update a rule. For a new rule use data[id] = 0.
POST fields — data object (main fields)
| Field | Type | Required | Description |
|---|---|---|---|
id | int | 0 = new rule, >0 = update | |
receipt_rule_type_id | int | Rule type identifier | |
source_receipt_type_id | int | Source document type identifier | |
dest_receipt_type_id | int | Destination document type identifier (for conversion) | |
dest_receipt_close | int | 1 = automatically close the destination document | |
company_id | int | Company identifier | |
company_user_id | int | Issuing staff member identifier | |
receipt_cron_time | string | Cron schedule expression | |
printer_device_id | int | Printer device identifier (for automatic printing) | |
webhook_url | string | Webhook URL (for automatic delivery) | |
webhook_header | string | Webhook header (JSON string) | |
receipt_cron_limit_loop | int | Max records processed per cycle (default: 10) | |
receipt_cron_limit_full | int | Max total records processed (default: 100) |
Example request
POST /api/receipt_rule/save
X-API-KEY: {your_api_key}
Content-Type: application/json
{
"data": {
"id": 0,
"receipt_rule_type_id": 1,
"source_receipt_type_id": 5,
"dest_receipt_type_id": 15,
"company_id": 1,
"company_user_id": 2,
"receipt_cron_time": "0 6 * * *"
}
}
/api/receipt_rule/delete
Delete a rule by identifier.
POST fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
id | int | Identifier of the rule to delete |
Example request
POST /api/receipt_rule/delete
X-API-KEY: {your_api_key}
Content-Type: application/json
{ "data": { "id": 1 } }
/api/receipt_rule/run_rules
Run all active rules against the current system state.
POST fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
data | object | Optional filter parameters |
Example request
POST /api/receipt_rule/run_rules
X-API-KEY: {your_api_key}
Content-Type: application/json
{ "data": {} }
/api/receipt_rule/run_rule
Manually run a single rule.
POST fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
id | int | Identifier of the rule to run |
Example request
POST /api/receipt_rule/run_rule
X-API-KEY: {your_api_key}
Content-Type: application/json
{ "data": { "id": 1 } }
Create your account now,
pay later!