Base URL
https://{tenant}.logzi.com/api/compensate/
Every request returns a JSON response. On success result.code == 1; on failure result.code == 0. The compensation API is used to offset (compensate) mutually opposing receivables and liabilities against each other, with support for bulk import.
/api/compensate/get
Retrieve a single compensation document by ID.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | int | Compensation document ID |
Example request
GET /api/compensate/get?id=1
X-API-KEY: {your_api_key}
/api/compensate/list
Paginated list of compensation documents.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
list_offset | int | Pagination offset (default: 0) | |
list_condition | object | Filter conditions object |
Example request
GET /api/compensate/list?list_offset=0
X-API-KEY: {your_api_key}
/api/compensate/save
Create or update a compensation document.
POST fields — data object
Provide the compensation data in the data object (partner ID, linked documents, amount).
Example request
POST /api/compensate/save
X-API-KEY: {your_api_key}
Content-Type: application/json
{ "data": { "id": 1 } }
/api/compensate/save_import
Bulk import of compensation documents.
POST fields — data array
The data array can hold multiple compensation documents at once for bulk recording.
Example request
POST /api/compensate/save_import
X-API-KEY: {your_api_key}
Content-Type: application/json
{ "data": [ { "partner_id": 1 }, { "partner_id": 2 } ] }
/api/compensate/delete
Delete a compensation document.
POST fields — data object
Provide the data of the compensation document to delete in the data object.
Example request
POST /api/compensate/delete
X-API-KEY: {your_api_key}
Content-Type: application/json
{ "data": { "id": 1 } }
Create your account now,
pay later!