API – Treasury¶
Paths are under https://api.innovanet.com. Header Authorization: Bearer inv_mcp_…. The innovanet() function is in the API chapter.
Document type: 1 expense, 2 income, 3 settlement. A treasury error has a message field, not error.
GET /api/treasury¶
List. Records are in data as an array, and pagination is the sibling pagination.
$res = innovanet('GET', '/api/treasury?page=1');
Response 200
{
"success": true,
"data": [
{
"cash_id": 11,
"cash_type": 1,
"cash_date": "2026-11-05 09:00:00",
"cash_description": "Drobný nákup"
}
],
"pagination": { "current_page": 1, "per_page": 20, "total_records": 1 },
"permissions": {}
}
Totals: GET /api/treasury/stats. Detail: GET /api/treasury/11.
POST /api/treasury¶
A document must have at least one item.
| Field | Type | Required | Description |
|---|---|---|---|
cash_type |
integer | yes | 1 expense, 2 income, 3 settlement |
cash_detail |
integer | for type 1 and 2 | reason for the movement |
transactions |
array | yes | items |
transactions[].ct_amount |
number | yes | a non-zero amount |
cash_date |
datetime | no | default now |
cash_description |
string | depends on the reason | |
cash_party |
integer | for an advance and a settlement | person |
cash_accounting_unit |
integer | no | default 1 |
cash_currency |
integer | no | must match the currency of the unit |
Request – income
{
"cash_type": 2,
"cash_detail": 1,
"cash_description": "Vratka",
"cash_date": "2026-11-05 09:00:00",
"transactions": [
{ "ct_amount": 50 }
]
}
PHP
$res = innovanet('POST', '/api/treasury', [
'cash_type' => 2,
'cash_detail' => 1,
'cash_description' => 'Vratka',
'transactions' => [
['ct_amount' => 50],
],
]);
Response 201
{
"success": true,
"data": { "cash_id": 11, "cash_number": "P20260011" }
}
cash_number can be null until numbering is turned on. A missing item returns 422 and errors.transactions.
Other paths¶
Each path below belongs to this module. Field names are the ones the API reads. A downloaded file is not JSON.
GET /api/treasury/open-items¶
Without the "view all" level (treasury level 1 or 3) only the user's own documents are returned: advances they created, their own bills and invoices.
Parameters
| Field | Type | Required |
|---|---|---|
party_id |
string | no |
currency |
string | no |
The API reads these fields. A field is required when the table says yes.
Response 200 – Envelope { "success": true, "data": ... }.
GET /api/treasury/form-options¶
No body.
Response 200 – Envelope { "success": true, "data": ... }.
GET /api/treasury/book/options¶
No body.
Response 200 – Envelope { "success": true, "data": ... }.
GET /api/treasury/book/pdf¶
Parameters
| Field | Type | Required |
|---|---|---|
lang |
string | no |
date |
string | yes |
book |
integer | no |
date is the month as YYYYMM. Without it the status is 422. book is the cash-desk id, default 1. lang is sk, cs or en.
Response – The response is a file, not JSON.
GET /api/treasury/book/pdf/download¶
Parameters
| Field | Type | Required |
|---|---|---|
lang |
string | no |
date |
string | yes |
book |
integer | no |
date is the month as YYYYMM. Without it the status is 422. book is the cash-desk id, default 1. lang is sk, cs or en.
Response – The response is a file, not JSON.
GET /api/treasury/{id}/pdf¶
Parameters
| Field | Type | Required |
|---|---|---|
lang |
string | no |
The API reads these fields. A field is required when the table says yes.
Response – The response is a file, not JSON.
GET /api/treasury/{id}/pdf/download¶
Parameters
| Field | Type | Required |
|---|---|---|
lang |
string | no |
The API reads these fields. A field is required when the table says yes.
Response – The response is a file, not JSON.
POST /api/treasury/{id}/storno¶
Body
| Field | Type | Required |
|---|---|---|
reason |
string | no |
{
"reason": "text"
}
$res = innovanet('POST', '/api/treasury/1/storno', [
'reason' => 'text',
]);
The API reads these fields. A field is required when the table says yes.
Response 201 – Envelope { "success": true, "data": ... }.
POST /api/treasury/{id}/transactions¶
Body
| Field | Type | Required |
|---|---|---|
ct_type |
string | no |
ct_detail |
string | no |
ct_currency |
string | no |
ct_amount |
string | no |
ct_related_id |
string | no |
{
"ct_type": "text",
"ct_detail": "text",
"ct_currency": "text",
"ct_amount": "text",
"ct_related_id": "text"
}
$res = innovanet('POST', '/api/treasury/1/transactions', [
'ct_type' => 'text',
'ct_detail' => 'text',
'ct_currency' => 'text',
'ct_amount' => 'text',
'ct_related_id' => 'text',
]);
The API reads these fields. A field is required when the table says yes.
Response 201 – Envelope { "success": true, "data": ... }.
DELETE /api/treasury/transactions/{transactionId}¶
No body.
Response 200 – Envelope { "success": true, "data": ... }.
Want to try this feature? Start your innovanet trial →