Compensation API

Manage receipt compensations — retrieve, record, and delete financial settlements linked to invoices and cash receipts

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).

GET /api/compensate/get

Retrieve a single compensation by identifier, together with the related receipt data.

Query parameters

ParameterTypeRequiredDescription
idintUnique identifier of the compensation

Example request

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

Retrieve a paginated list of compensations with filtering options.

Query parameters

ParameterTypeRequiredDescription
list_offsetintPagination offset (default: 0)
list_condition[search_text]stringFree-text search on receipt number and partner name
list_condition[partner_company_name]stringFilter by partner name (LIKE)
list_condition[receipt_identify]stringFilter by receipt number (LIKE)
list_condition[invoice_receipt_type_id]intFilter by receipt type
list_condition[invoice_receipt_id]intFilter by receipt identifier
list_condition[company_id]intCompany identifier (default: 1)

Example request

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

FieldTypeRequiredDescription
receipt_idint0 = new compensation (with an existing identifier), >0 = update
amountfloatSettled amount
company_user_idintIdentifier of the recording staff member
identify_invoicestringInvoice receipt number (if looking up by invoice)
identify_customerstringCustomer order number (if looking up by order)
customer_emailstringCustomer e-mail address (if looking up by e-mail)
parcel_numberstringParcel 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"
  }
}
POST /api/compensate/delete

Delete a compensation. After deletion the related receipt is considered open again.

POST fields — data object

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

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!