Receipt Rule API

Manage automation rules — document conversion, inventory handling and webhook delivery

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.

GET /api/receipt_rule/get

Retrieve a single rule by identifier.

Query parameters

ParameterTypeRequiredDescription
idintRule identifier

Example request

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

Paginated list of rules.

Query parameters

ParameterTypeRequiredDescription
list_offsetintPagination offset (default: 0)
list_conditionobjectFilter conditions object

Example request

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

Create or update a rule. For a new rule use data[id] = 0.

POST fields — data object (main fields)

FieldTypeRequiredDescription
idint0 = new rule, >0 = update
receipt_rule_type_idintRule type identifier
source_receipt_type_idintSource document type identifier
dest_receipt_type_idintDestination document type identifier (for conversion)
dest_receipt_closeint1 = automatically close the destination document
company_idintCompany identifier
company_user_idintIssuing staff member identifier
receipt_cron_timestringCron schedule expression
printer_device_idintPrinter device identifier (for automatic printing)
webhook_urlstringWebhook URL (for automatic delivery)
webhook_headerstringWebhook header (JSON string)
receipt_cron_limit_loopintMax records processed per cycle (default: 10)
receipt_cron_limit_fullintMax 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 * * *"
  }
}
POST /api/receipt_rule/delete

Delete a rule by identifier.

POST fields — data object

FieldTypeRequiredDescription
idintIdentifier 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 } }
POST /api/receipt_rule/run_rules

Run all active rules against the current system state.

POST fields — data object

FieldTypeRequiredDescription
dataobjectOptional filter parameters

Example request

POST /api/receipt_rule/run_rules
X-API-KEY: {your_api_key}
Content-Type: application/json

{ "data": {} }
POST /api/receipt_rule/run_rule

Manually run a single rule.

POST fields — data object

FieldTypeRequiredDescription
idintIdentifier 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 } }

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!