Base URL
https://{tenant}.logzi.com/api/compensate/
Every request returns a JSON response. On success result.code == 1, on error result.code == 0. A compensation records the financial settlement of a receipt (invoice or cash receipt).
/api/compensate/get
Retrieve a single compensation by identifier, together with the related receipt data.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | int | Unique identifier of the compensation |
Example request
GET /api/compensate/get?id=55
X-API-KEY: {your_api_key}
/api/compensate/list
Retrieve a paginated list of compensations with filtering options.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
list_offset | int | Pagination offset (default: 0) | |
list_condition[search_text] | string | Free-text search on receipt number and partner name | |
list_condition[partner_company_name] | string | Filter by partner name (LIKE) | |
list_condition[receipt_identify] | string | Filter by receipt number (LIKE) | |
list_condition[invoice_receipt_type_id] | int | Filter by receipt type | |
list_condition[invoice_receipt_id] | int | Filter by receipt identifier | |
list_condition[company_id] | int | Company identifier (default: 1) |
Example request
GET /api/compensate/list?list_offset=0&list_condition[partner_company_name]=Minta
X-API-KEY: {your_api_key}
/api/compensate/save
Record a compensation against an existing receipt (invoice or cash receipt). The receipt can be identified by receipt number, customer order number, or e-mail address.
POST fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
receipt_id | int | 0 = new compensation (with an existing identifier), >0 = update | |
amount | float | Settled amount | |
company_user_id | int | Identifier of the recording staff member | |
identify_invoice | string | Invoice receipt number (if looking up by invoice) | |
identify_customer | string | Customer order number (if looking up by order) | |
customer_email | string | Customer e-mail address (if looking up by e-mail) | |
parcel_number | string | Parcel number (if looking up by shipment) |
Example request
POST /api/compensate/save
X-API-KEY: {your_api_key}
Content-Type: application/json
{
"data": {
"receipt_id": 0,
"amount": 127000,
"company_user_id": 3,
"identify_invoice": "2024/00123"
}
}
/api/compensate/delete
Delete a compensation. After deletion the related receipt is considered open again.
POST fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
receipt_id | int | Identifier of the compensation to delete |
Example request
POST /api/compensate/delete
X-API-KEY: {your_api_key}
Content-Type: application/json
{ "data": { "receipt_id": 55 } }
Create your account now,
pay later!