Compensation API

Manage compensation documents

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.

GET /api/compensate/get

Retrieve a single compensation document by ID.

Query parameters

ParameterTypeRequiredDescription
idintCompensation document ID

Example request

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

Paginated list of compensation documents.

Query parameters

ParameterTypeRequiredDescription
list_offsetintPagination offset (default: 0)
list_conditionobjectFilter conditions object

Example request

GET /api/compensate/list?list_offset=0
X-API-KEY: {your_api_key}
POST /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 } }
POST /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 } ] }
POST /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 } }

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!