# Účtovisko API — full agent reference > Complete endpoint, parameter and property reference for the Účtovisko public API, generated from the OpenAPI snapshot at https://api.uctovisko.sk/v1/openapi.json. The short index is at https://uctovisko.sk/llms.txt. Base URL `https://api.uctovisko.sk/v1`. This file is generated — do not edit it by hand. It is regenerated by `pnpm run llms:generate` in `server/` from `server/openapi/v1.json`. ## Machine-readable contract - [OpenAPI 3 specification](https://api.uctovisko.sk/v1/openapi.json): complete request and response schemas for every endpoint. Fetch this if you need exact property types. - [Full agent reference](https://uctovisko.sk/llms-full.txt): this file plus a per-endpoint parameter and property reference and worked curl examples. ## Authentication - Send `Authorization: Bearer uk_live_XXXXXXXXXXXXXXXX_...` on every request. Keys are created per account in Nastavenia → API; the secret is shown once at creation. - A key is bound to one account. Using it against a different `accountId` in the path is `403 insufficient_permissions_api_key`, not a 404. - Keys carry a permission bitfield, so a valid key can still be refused for one operation. There is no OAuth flow and no refresh — treat the key as a long-lived server-side secret. ## Response envelope - Success: `{ "s": "ok", "d": , "t": "2026-10-04T09:21:44.512Z" }`. - Failure: `{ "s": "error", "d": "invalid_api_key", "t": … }` — `d` is a single lowercase snake_case alias, never a message object or a stack trace. - Branch on `s`. `d` is populated on both branches, so its presence proves nothing. - Creates answer **200**, not 201. - Exceptions: PDF/ZIP/XML downloads return a binary body with no envelope, and answer **202** with a non-envelope body while a PDF is still rendering (retry shortly). `POST …/{id}/send` answers `{ s, t }` with no `d` at all. - Error aliases you must handle: `invalid_api_key`, `api_key_expired`, `unauthorized` (401); `insufficient_permissions_api_key` (403); `not_found` (404); `invalid_ids`, `no_ids_provided`, `email_missing` (422); `internal_server_error` (500). Treat an unknown alias as a generic failure of that HTTP class. ## Pagination and filtering - Document lists wrap the page one level deeper than usual: `{ "s": "ok", "d": { "data": { "list": [...], "total": 128, "nextCursor": "1042" } }, "t": … }`. Read `d.data.list`, not `d.list`. - Query parameters: `page` (zero-based), `pageSize` (default 10, hard cap 500), `cursor`, `sort`, `filter`, `ids`. - An unusable `page`/`pageSize` value is treated as **absent** and the default applies — it is not a 4xx. When `cursor` is set, `page` is ignored; prefer cursor paging for a stable walk. - `index=true` adds `count` and `amount` breakdowns keyed by status. - One resource differs: **receipts** return `d.data.stats` (aggregates) instead of `nextCursor`. ## Types that commonly break clients - Document money and numbers (`totalPrice`, `number`, `invoicePrice`) are Postgres `decimal` columns and arrive as **strings** (`"724.80"`). Use a decimal library, not `parseFloat`, for arithmetic. - Money inside the `fields` line-item array, and every receipt amount, arrives as a JSON **number**. Both forms are real; handle both. - `vat` on a line item is a percentage (`20` = 20 %), not a multiplier and not an amount. - Dates are ISO-8601 strings. Ids are integers unique per document type — invoice `12` and receipt `12` are unrelated. ## Webhooks Účtovisko POSTs a JSON event to every webhook URL configured on an API key when a document of the account is created, updated or deleted. Delivery is asynchronous: the API call that changed the document does not wait for your endpoint. Full reference: `https://uctovisko.sk/docs/api#/webhooky` (source `server/docs/webhooks.md`). ### Setup Add webhook URLs in the API key settings (Nastavenia → API → the key → Webhooky). The webhook secret (`whsec_…`) is shown **once**: when a key is created with at least one URL, when the first URL is added to a key, or when the secret is rotated (`POST /account/{accountId}/api/keys/{id}/webhook-secret`; the old secret stops working at once). Store it server-side. Every webhook is signed; a key that has URLs but no secret gets **no** deliveries (rotate to create one — earlier events are not re-sent). ### Request `POST `, `Content-Type: application/json`, `User-Agent: Uctovisko-Webhook-Service/1.0` and these headers: - `X-Webhook-Id` — UUID v4 of the event; stable across retries and shared by every URL of the event. Dedupe on it. - `X-Webhook-Timestamp` — ISO-8601 time of this delivery attempt. - `X-Webhook-Signature` — `t=,v1=`. - `X-Webhook-Attempt` — 1-based attempt number (`1` on the first try). Body (`id` equals `X-Webhook-Id`; new fields may appear, ignore unknown ones): ```json { "id": "6f1c0e8a-3b5d-4c47-9a7e-2f0d9b1e4a53", "type": "create", "data": { "documentId": 123, "documentType": "invoice", "accountId": 7, "timestamp": "2026-10-27T10:00:00.000Z", "payload": { "...": "document data" } } } ``` ### Event types - `type`: `create`, `update` or `delete`. - `documentType`: `invoice`, `advanceInvoice`, `incomeDocument`, `priceOffer`, `creditNote`, `receipt`, `travelOrder`, `fulfillment`, `ride`, `vehicle`, `warehouseReceipt`, `warehouseIssue`, `order`. - `ride` has no `delete` event. - `update` of `invoice` / `advanceInvoice`: `payload` holds only the changed fields. - `delete`: `payload` is `null` for `invoice` and `{ "id": … }` for every other type. ### Verifying the signature 1. Read the **raw** request body bytes, before any JSON parsing or re-serialisation. 2. Split `X-Webhook-Signature` on `,`; take `t` (unix seconds) and `v1` (64 hex characters). 3. Reject when `|now - t| > 300` seconds (5-minute tolerance, replay protection). 4. Compute `HMAC-SHA256(secret, "${t}.${rawBody}")` — the decimal `t`, a dot, the raw body — as hex. 5. Compare with `v1` in **constant time** (`crypto.timingSafeEqual`, PHP `hash_equals`); reject on mismatch. 6. Dedupe on `X-Webhook-Id`, then answer `2xx`. Node.js: ```js const crypto = require('node:crypto'); // rawBody: unparsed request body (e.g. express.raw({ type: 'application/json' })) function verifyWebhook(rawBody, signatureHeader, secret, toleranceSec = 300) { const parts = Object.fromEntries( String(signatureHeader || '').split(',').map((p) => p.split('=', 2)), ); const t = Number(parts.t); if (!Number.isInteger(t) || !/^[0-9a-f]{64}$/.test(parts.v1 || '')) return false; if (Math.abs(Math.floor(Date.now() / 1000) - t) > toleranceSec) return false; const expected = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest(); const received = Buffer.from(parts.v1, 'hex'); return received.length === expected.length && crypto.timingSafeEqual(received, expected); } ``` PHP: ```php $toleranceSec) { return false; } $expected = hash_hmac('sha256', $t . '.' . $rawBody, $secret); return hash_equals($expected, $parts['v1']); } $rawBody = file_get_contents('php://input'); $ok = verify_webhook($rawBody, $_SERVER['HTTP_X_WEBHOOK_SIGNATURE'] ?? '', getenv('WEBHOOK_SECRET')); if (!$ok) { http_response_code(401); exit; } ``` Test vector — check your implementation against it. Secret `whsec_test_secret_0123456789abcdef`, `t = 1792576800`, body (exactly these bytes, no trailing newline): ``` {"id":"6f1c0e8a-3b5d-4c47-9a7e-2f0d9b1e4a53","type":"update","data":{"documentId":4812,"documentType":"invoice","accountId":137,"timestamp":"2026-10-27T10:00:00.000Z","payload":{"note":"Test"}}} ``` The signed string is `1792576800.` followed by that body; the expected `v1` is `ea0704d8b5469043cff17e8382e5a055a05305b1f52fe9fe288b8ccf95c29a3a`, i.e. the header `X-Webhook-Signature: t=1792576800,v1=ea0704d8b5469043cff17e8382e5a055a05305b1f52fe9fe288b8ccf95c29a3a`. `t` is a fixed past value, so skip (or freeze the clock for) the 5-minute tolerance check when verifying this vector. ### Delivery and retries - 5 s timeout per attempt, redirects are not followed, any `2xx` = delivered. Order of events is not guaranteed; answer fast and work asynchronously. - Up to **5 attempts**: immediately, then after about 1 min, 5 min, 30 min and 2 h (each ±10 %); then the delivery is dropped. - Retried on: no response / connection error, timeout, `5xx`, `408`, `429`. `Retry-After` is honoured (never earlier than asked, capped at 2 h). Any other `4xx` and any `3xx` are **not** retried. - Every attempt carries the byte-identical body and the same `X-Webhook-Id`; `X-Webhook-Timestamp`, the signature `t` and `X-Webhook-Attempt` are fresh per attempt. A late success of an earlier attempt can still arrive — **dedupe on `X-Webhook-Id`**. - Each attempt is signed with the key's current secret; retries stop when the key is revoked or deleted, its secret is removed or the URL is removed. ### URL rules `https://` only, no credentials in the URL, must resolve to public IP addresses (checked on save and on every delivery), at most 10 URLs per API key. ## Rate limiting - `receipt_find` is limited to **20 requests per 60 s** (it calls the Finančná správa eKasa service) and answers 429 above that. - Other document endpoints have no per-route limiter today. That is the current implementation, not a guarantee — implement backoff on 429 and 5xx now, because adding a limiter is an additive change inside `v1`. ## Versioning - `/v1` is the stable prefix; unprefixed paths exist for backwards compatibility. - Additive changes (new endpoint, new optional property, new enum value) ship inside `v1` without notice. **Ignore properties you do not recognise** rather than failing on them. - Removals and semantic changes get a deprecation window and a new major prefix. - [Committed snapshot](https://api.uctovisko.sk/v1/openapi.json) is the contract of record; a diff in it is the signal that the public surface changed. ## Endpoint index **Invoices** - `GET /account/{accountId}/invoice` — List invoices (`invoice_list`) - `POST /account/{accountId}/invoice` — Create an invoice (`invoice_create`) - `DELETE /account/{accountId}/invoice` — Archive or purge invoices (`invoice_delete`) - `POST /account/{accountId}/invoice/import` — Import invoices from uploaded files (`invoice_import`) - `POST /account/{accountId}/invoice/import/creditnote` — Build a credit note draft from invoice data (`invoice_preview_creditnote`) - `GET /account/{accountId}/invoice/latestNumber` — Get the highest invoice number in use (`invoice_latest_number`) - `GET /account/{accountId}/invoice/summary` — Summarise invoices (`invoice_summary`) - `GET /account/{accountId}/invoice/{id}` — Get one invoice (`invoice_get`) - `PUT /account/{accountId}/invoice/{id}` — Update an invoice (`invoice_update`) - `GET /account/{accountId}/invoice/{id}/pdf` — Download the invoice PDF (`invoice_pdf`) - `POST /account/{accountId}/invoice/{id}/send` — E-mail the invoice (`invoice_send`) - `POST /account/{accountId}/invoice/{id}/peppol/send` — Send the invoice over eFaktúra (Peppol) (`invoice_send_peppol`) - `PUT /account/{accountId}/invoice/{id}/status` — Set the invoice status (`invoice_set_status`) - `GET /account/{accountId}/invoice/{id}/details` — Get selected invoice properties (`invoice_get_details`) - `GET /account/{accountId}/invoice/{id}/payments` — List payments of an invoice (`invoice_payment_list`) - `POST /account/{accountId}/invoice/{id}/payments` — Record a payment on an invoice (`invoice_payment_create`) - `PATCH /account/{accountId}/invoice/{id}/payments/{paymentId}` — Edit a payment of an invoice (`invoice_payment_update`) - `DELETE /account/{accountId}/invoice/{id}/payments/{paymentId}` — Delete a payment of an invoice (`invoice_payment_delete`) **Credit notes** - `GET /account/{accountId}/creditnote` — List credit notes (`creditnote_list`) - `POST /account/{accountId}/creditnote` — Create a credit note (`creditnote_create`) - `DELETE /account/{accountId}/creditnote` — Archive or purge credit notes (`creditnote_delete`) - `GET /account/{accountId}/creditnote/latestNumber` — Get the highest credit note number in use (`creditnote_latest_number`) - `GET /account/{accountId}/creditnote/{id}` — Get one credit note (`creditnote_get`) - `PUT /account/{accountId}/creditnote/{id}` — Update a credit note (`creditnote_update`) - `GET /account/{accountId}/creditnote/{id}/pdf` — Download the credit note PDF (`creditnote_pdf`) - `POST /account/{accountId}/creditnote/{id}/send` — E-mail the credit note (`creditnote_send`) - `PUT /account/{accountId}/creditnote/{id}/status` — Set the credit note status (`creditnote_set_status`) **Price offers** - `GET /account/{accountId}/priceoffer` — List price offers (`priceoffer_list`) - `POST /account/{accountId}/priceoffer` — Create a price offer (`priceoffer_create`) - `DELETE /account/{accountId}/priceoffer` — Archive or purge price offers (`priceoffer_delete`) - `GET /account/{accountId}/priceoffer/latestNumber` — Get the highest price offer number in use (`priceoffer_latest_number`) - `GET /account/{accountId}/priceoffer/{id}` — Get one price offer (`priceoffer_get`) - `PUT /account/{accountId}/priceoffer/{id}` — Update a price offer (`priceoffer_update`) - `GET /account/{accountId}/priceoffer/{id}/pdf` — Download the price offer PDF (`priceoffer_pdf`) - `POST /account/{accountId}/priceoffer/{id}/send` — E-mail the price offer (`priceoffer_send`) - `PUT /account/{accountId}/priceoffer/{id}/status` — Set the price offer status (`priceoffer_set_status`) **Income documents** - `GET /account/{accountId}/incomeDocument` — List income documents (`income_document_list`) - `POST /account/{accountId}/incomeDocument` — Create an income document (`income_document_create`) - `DELETE /account/{accountId}/incomeDocument` — Archive or purge income documents (`income_document_delete`) - `GET /account/{accountId}/incomeDocument/latestNumber` — Get the highest income document number in use (`income_document_latest_number`) - `GET /account/{accountId}/incomeDocument/{id}` — Get one income document (`income_document_get`) - `PUT /account/{accountId}/incomeDocument/{id}` — Update an income document (`income_document_update`) - `GET /account/{accountId}/incomeDocument/{id}/pdf` — Download the income document PDF (`income_document_pdf`) - `POST /account/{accountId}/incomeDocument/{id}/send` — E-mail the income document (`income_document_send`) - `PUT /account/{accountId}/incomeDocument/{id}/status` — Set the income document status (`income_document_set_status`) **Advance invoices** - `GET /account/{accountId}/advanceInvoice` — List advance invoices (`advance_invoice_list`) - `POST /account/{accountId}/advanceInvoice` — Create an advance invoice (`advance_invoice_create`) - `DELETE /account/{accountId}/advanceInvoice` — Archive or purge advance invoices (`advance_invoice_delete`) - `GET /account/{accountId}/advanceInvoice/latestNumber` — Get the highest advance invoice number in use (`advance_invoice_latest_number`) - `GET /account/{accountId}/advanceInvoice/{id}` — Get one advance invoice (`advance_invoice_get`) - `PUT /account/{accountId}/advanceInvoice/{id}` — Update an advance invoice (`advance_invoice_update`) - `GET /account/{accountId}/advanceInvoice/{id}/pdf` — Download the advance invoice PDF (`advance_invoice_pdf`) - `POST /account/{accountId}/advanceInvoice/{id}/send` — E-mail the advance invoice (`advance_invoice_send`) - `PUT /account/{accountId}/advanceInvoice/{id}/status` — Set the advance invoice status (`advance_invoice_set_status`) - `GET /account/{accountId}/advanceInvoice/{id}/payments` — List payments of an advance invoice (`advance_invoice_payment_list`) - `POST /account/{accountId}/advanceInvoice/{id}/payments` — Record a payment on an advance invoice (`advance_invoice_payment_create`) - `PATCH /account/{accountId}/advanceInvoice/{id}/payments/{paymentId}` — Edit a payment of an advance invoice (`advance_invoice_payment_update`) - `DELETE /account/{accountId}/advanceInvoice/{id}/payments/{paymentId}` — Delete a payment of an advance invoice (`advance_invoice_payment_delete`) **Receipts** - `GET /account/{accountId}/receipt` — List receipts (`receipt_list`) - `POST /account/{accountId}/receipt` — Store a receipt (`receipt_create`) - `PUT /account/{accountId}/receipt/{receiptId}` — Update a receipt (`receipt_update`) - `DELETE /account/{accountId}/receipt/{receiptId}` — Archive or purge a receipt (`receipt_delete`) - `GET /account/{accountId}/receipt/export` — Export receipts as ZIP or XML (`receipt_export`) - `GET /account/{accountId}/receipt/find/{receiptId}` — Look a receipt up in eKasa (`receipt_find`) - `GET /account/{accountId}/receipt/{id}` — Get one receipt (`receipt_get`) ## Worked examples All three use the placeholder key `uk_live_XXXXXXXXXXXXXXXX_...` and account id `7`. Replace both. ### Create an invoice ```bash curl -sS -X POST 'https://api.uctovisko.sk/v1/account/7/invoice' \ -H 'Authorization: Bearer uk_live_XXXXXXXXXXXXXXXX_...' \ -H 'Content-Type: application/json' \ -d '{ "issueDate": "2026-10-04T00:00:00.000Z", "dueDate": "2026-10-18T00:00:00.000Z", "currency": "EUR", "useVat": true, "paymentMethod": "banktransfer", "IBAN": "SK3112000000198742637541", "variableSymbol": "20260042", "recipient": { "name": "Odberateľ a. s.", "address": "Hlavná 12, 040 01 Košice", "email": "fakturacia@example.sk", "phone": "+421 900 000 000", "ico": 54321678, "dic": 2120123456, "icDph": "SK2120123456" }, "fields": [ { "label": "Konzultácie", "description": "Analýza integrácie", "quantity": 8, "unitPrice": 75.5, "vat": 20, "unit": "h" } ] }' ``` `number` is omitted on purpose: the server continues the account's series atomically. Do **not** read `invoice_latest_number` and increment it yourself — that races. `sender` is omitted too, so the account's company profile is used. Answers **200** (not 201) with `{ "s": "ok", "d": { "id": 1042, "number": "20260042", … }, "t": … }`. Note `number` and `totalPrice` come back as **strings**. ### List invoices, 50 per page ```bash curl -sS -G 'https://api.uctovisko.sk/v1/account/7/invoice' \ -H 'Authorization: Bearer uk_live_XXXXXXXXXXXXXXXX_...' \ --data-urlencode 'pageSize=50' \ --data-urlencode 'page=0' ``` Rows are at `d.data.list`, the unpaginated match count at `d.data.total`. `pageSize` is capped at 500. List rows omit `fields` (line items) — fetch one invoice by id to get them. To walk the whole table safely, follow `d.data.nextCursor` instead of incrementing `page`: ```bash curl -sS -G 'https://api.uctovisko.sk/v1/account/7/invoice' \ -H 'Authorization: Bearer uk_live_XXXXXXXXXXXXXXXX_...' \ --data-urlencode 'pageSize=500' \ --data-urlencode 'cursor=1042' ``` ### Download an invoice PDF ```bash curl -sS -o invoice-1042.pdf -w '%{http_code}\n' \ 'https://api.uctovisko.sk/v1/account/7/invoice/1042/pdf' \ -H 'Authorization: Bearer uk_live_XXXXXXXXXXXXXXXX_...' ``` The body is the PDF itself — **not** the `{ s, d, t }` envelope. A **202** means the render is still running: wait a second and retry the same URL. Check the status code before writing the file, or you will save an error body with a `.pdf` name. ## Endpoint reference ### Invoices ### `GET /account/{accountId}/invoice` **operationId** `invoice_list` — List invoices Returns one page of documents, newest first. fields (line items) are omitted from list rows — fetch a document by id to get them. Query parameters follow the description of each parameter below; the parameter names are sortModel and filterModel. With shortList=true each row collapses to { id, number, sender, recipient, issueDate } where sender/recipient are bare names — see InvoiceShortListItemDto. Default rows are InvoiceListItemDto: no fields, totalPrice as a number, plus remaining, isOverdue and correctedByCreditNote. Rows may also carry the computed sort keys invoice_cost and creditnote_count; ignore them. tab narrows to a derived tab and number looks one invoice up by its exact number. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `page` | query | no | `number` | Zero-based page index. Ignored when cursor is supplied. A value that is not a non-negative integer is treated as absent, not as an error.; default 0 | | `pageSize` | query | no | `number` | Items per page. A positive integer, maximum 500 (a larger value is rejected with 400). Anything that is not a positive integer is treated as absent and the default applies.; default 10 | | `ids` | query | no | `string[]` | Fetch exactly these rows by id (integers). Overrides search, filterModel, sortModel, page/pageSize and cursor; the answer then carries list and total only (no nextCursor). Accepted on the wire as CSV (ids=1,2,3), a repeated param (ids[]=1&ids[]=2) or a JSON array (ids=["1","2"]). | | `addRelations` | query | no | `string[]` | Extra relations to join into each row. Only relations on the endpoint's server-side allowlist are accepted (on the public document lists that is the creator, already included); any other name answers 400 invalid_request. Integrators normally omit it. | | `sortModel` | query | no | `string` | Sort order as a URL-encoded JSON array of { field, direction } (query parameter name is sortModel, not sort). field is a column of the row (a dotted relation path is allowed); an unknown field, or a direction other than ASC/DESC, answers 400 invalid_request. Invoices also sort by the computed columns cost, remaining and creditNotes. Unparseable JSON, or omitting the parameter, falls back to the default order (document number descending on the document lists). Cursor paging is only available for a single plain-column sort; with a computed column the server pages by page/pageSize and returns no nextCursor. | | `filterModel` | query | no | `string` | Filters as a URL-encoded JSON object { items: [{ field, operator, value }] } (query parameter name is filterModel, not filter); items are ANDed. operator is one of contains, doesnotcontain, equals, is, =, !=, <>, doesnotequal, not, isoneof, startswith, endswith, before, after, onorbefore, onorafter, >, <, >=, <=; an unknown field or operator answers 400 invalid_request. Invoices also filter the computed columns cost, remaining and creditNotes with the numeric operators only. Anything that is not a JSON object collapses to "no filters". | | `search` | query | no | `string` | Search, max 100 characters. On invoice, advance invoice, credit note, price offer and income document lists the text is split into words (first 5 used, each max 40 chars) and EVERY word must match — case- and diacritics-insensitive ("kovac" finds "Kováč"), words of 4+ letters also tolerate small typos. Matched fields: the number, the payment symbols, IBAN/BIC and any sender/recipient company field (name, address, email, phone, ico, dic, icDph, court); a numeric word also matches the issue date and the total. Item names are not searched. Other lists: case-insensitive substring search. A leading document-type prefix is stripped when it stands alone or is followed by a space, dash, slash or digit (FA 2025, FA2025; FA invoice, ZA advance invoice, DB credit note, CP price offer, PD income document); such a prefix that belongs to a different resource returns an empty list. A word that merely starts with those letters ("Zahradník") is searched as text. | | `archived` | query | no | `string` | Accepted but not applied by the list endpoints today: archived documents are returned either way (their status is archived). To exclude or isolate them filter on status with filterModel. | | `cursor` | query | no | `string` | Opaque token: pass back unchanged the nextCursor of the previous response (it is base64 text; do not build or parse it). When present it replaces page. It is only valid for the same sortModel/filters it was issued for; with a computed-column sort it is ignored and page applies. | | `index` | query | no | `boolean` | Add the per-status aggregates to the response: d.data.count (rows per status) and d.data.amount (summed totalPrice per status), over the whole account, ignoring the other filters; invoices also add d.data.tabCounts. It does not change the rows (list rows never carry fields) and is ignored with shortList. Truthy values: 1, true, yes, y, on. | | `shortList` | query | no | `boolean` | Invoices only: collapse each row to { id, number, sender, recipient, issueDate } for a picker. The other document lists ignore it. Truthy values: 1, true, yes, y, on. | | `tab` | query | no | `"all"|"concept"|"unpaid"|"overdue"|"paid"|"cancelled"|"archived"` | Derived index tab. Narrows the result set on top of any other filter. unpaid = issued with an outstanding balance, overdue = unpaid past its due date (Europe/Bratislava calendar day), paid = settled, the rest map to a stored status. Omitted behaves exactly as before. | | `number` | query | no | `string` | Exact document number within this account. Whitespace is ignored; the rest must be digits (1–30). Combines with every other filter. Returns the matching invoice, or an empty list — use it to verify whether a create whose response was lost went through. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: { data: ApiListMeta & { list: (InvoiceListItemDto | InvoiceShortListItemDto)[], tabCounts: object } }, t }` | Success envelope. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_recipient"|"invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_file_type"|"no_files_attached"|"too_many_files"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `POST /account/{accountId}/invoice` **operationId** `invoice_create` — Create an invoice Creates a document and returns it with its server-assigned id and number. Answers 200, not 201. Accepts multipart/form-data as well as application/json. In multipart form the document properties are ordinary form fields and the optional logo / signature / stamp parts carry image files (one each). Send JSON unless you are uploading an image. Send an Idempotency-Key header to make a retry safe: repeating the identical request with the same key within 24 h returns the invoice created the first time (header Idempotent-Replayed: true) instead of creating a second one. Keys are scoped to the account in the path. The same key with a different body answers 422 idempotency_key_reuse; while the first request is still running, 409 idempotency_in_progress. Omit number to let the server continue the account series. Omit sender to use the account's company profile. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `Idempotency-Key` | header | no | `string` | Optional client-generated key (8–128 characters of A–Z a–z 0–9 _ - : ., e.g. a UUID) identifying this create. Remembered for 24 h per account together with a hash of the request body; malformed keys answer 400 idempotency_key_invalid. | **Request body:** `application/json` → `InvoiceCreateDto`, `multipart/form-data` → `InvoiceCreateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: InvoiceDto, t }` | The created document. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_recipient"|"invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_file_type"|"no_files_attached"|"too_many_files"|"idempotency_key_invalid"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number"|"idempotency_in_progress", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 422 | `{ s: "error", d: "idempotency_key_reuse", t }` | idempotency_key_reuse: this Idempotency-Key was already used in this account with a DIFFERENT request body (or attachments). | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | | 503 | `{ s: "error", d: "idempotency_unavailable", t }` | idempotency_unavailable: an Idempotency-Key was sent but the server cannot record it right now. | ### `DELETE /account/{accountId}/invoice` **operationId** `invoice_delete` — Archive or purge invoices Archives documents by default — they leave every list but the rows and their PDFs are kept. Pass purge=true to delete them permanently; that cannot be undone. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `ids` | query | yes | `string[]` | Ids to act on. Accepted as CSV (ids=1,2,3), a repeated param (ids[]=1&ids[]=2) or a single value. An empty or unparseable value answers 422 (no_ids_provided / invalid_ids). | | `purge` | query | no | `string` | Hard-delete instead of archive. Truthy values: true, 1.; default "false" | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: DocumentDeleteResultDto, t }` | Success envelope. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_recipient"|"invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_file_type"|"no_files_attached"|"too_many_files"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `POST /account/{accountId}/invoice/import` **operationId** `invoice_import` — Import invoices from uploaded files Parses uploaded invoice files (PDF/XML) and creates the invoices and advance invoices it recognises. recommendCreditNotes is advisory — nothing is created for it. Sent as multipart/form-data with one or more files parts. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | **Request body:** `multipart/form-data` → `object` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: InvoiceImportResultDto, t }` | What the importer created. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_recipient"|"invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_file_type"|"no_files_attached"|"too_many_files"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `POST /account/{accountId}/invoice/import/creditnote` **operationId** `invoice_preview_creditnote` — Build a credit note draft from invoice data Returns an unsaved credit note derived from the posted invoice data, for a preview or a confirm step. Nothing is persisted — call creditnote_create to store it. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | **Request body:** `application/json` → `object` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: CreditNoteDto, t }` | An unsaved credit note draft. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_recipient"|"invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_file_type"|"no_files_attached"|"too_many_files"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/invoice/latestNumber` **operationId** `invoice_latest_number` — Get the highest invoice number in use Returns the highest document number currently used in this account, as a string. Use it to show the next number in a UI — do not use it to allocate one: creating a document without number lets the server continue the series atomically, which this read cannot do. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: string, t }` | Success envelope. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_recipient"|"invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_file_type"|"no_files_attached"|"too_many_files"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/invoice/summary` **operationId** `invoice_summary` — Summarise invoices Period totals for the account, one bucket per currency (never summed across currencies), per-status counts and the invoice tab counts. from/to bound issueDate (at most the server-side maximum range apart); archived defaults to excluding archived invoices. Rate limited to 30 requests per 60 s and 600 per hour. Needs INVOICES_READ. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `from` | query | no | `string` | Inclusive lower bound on issueDate: an ISO-8601 instant, or a plain YYYY-MM-DD (start of that day in Europe/Bratislava). | | `to` | query | no | `string` | Upper bound on issueDate: an ISO-8601 instant (EXCLUSIVE), or a plain YYYY-MM-DD (INCLUSIVE — the whole Europe/Bratislava day is included). | | `monthFrom` | query | no | `string` | Inclusive start of the window behind thisMonth. Send it together with monthTo so the tile follows the client timezone; omit both and the server uses the current UTC calendar month. | | `monthTo` | query | no | `string` | Exclusive end of the window behind thisMonth. | | `archived` | query | no | `boolean` | Archived rows: omitted/falsy excludes them (default), truthy returns only them, all returns both. | | `tagId` | query | no | `string` | Receipt label ("štítok") id. Ignored by types without a tag relation. | | `currency` | query | no | `string` | Restrict the response to a single currency bucket. Omit to get every currency the account used in the period. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: InvoiceSummaryDto, t }` | Success envelope. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 429 | `{ s: "error", d: "rate_limit_exceeded", t }` | Too many calls to this route in the current window. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/invoice/{id}` **operationId** `invoice_get` — Get one invoice Returns one document including its line items. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: InvoiceDto, t }` | Success envelope. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_recipient"|"invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_file_type"|"no_files_attached"|"too_many_files"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `PUT /account/{accountId}/invoice/{id}` **operationId** `invoice_update` — Update an invoice Updates a document. Properties are merged, never replaced: an omitted property keeps its stored value. Unknown properties are dropped by the service allowlist rather than rejected, so a typo in a property name fails silently — check the response. Accepts multipart/form-data as well as application/json. In multipart form the document properties are ordinary form fields and the optional logo / signature / stamp parts carry image files (one each). Send JSON unless you are uploading an image. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | **Request body:** `application/json` → `InvoiceUpdateDto`, `multipart/form-data` → `InvoiceUpdateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: InvoiceDto, t }` | The updated document. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_recipient"|"invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_file_type"|"no_files_attached"|"too_many_files"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/invoice/{id}/pdf` **operationId** `invoice_pdf` — Download the invoice PDF Returns the rendered PDF as a binary body — not the { s, d, t } envelope. Errors are enveloped: a failure answers { "s": "error", "d": "", "t": … } with the status that alias maps to (401 for a bad key, 403 for a key bound to another account, 404 for an unknown id), never a bare { "error": … } body and never an exception message. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | | `regen` | query | no | `string` | Force a fresh render instead of serving the cached PDF. true to force.; default "false" | | status | body | meaning | | --- | --- | --- | | 200 | `binary` | The rendered PDF. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_recipient"|"invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_file_type"|"no_files_attached"|"too_many_files"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `POST /account/{accountId}/invoice/{id}/send` **operationId** `invoice_send` — E-mail the invoice Renders the PDF server-side and e-mails it. Not idempotent — a repeated call sends another e-mail. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `number` | — | **Request body:** `application/json` → `DocumentSendDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: InvoiceSendResultDto, t }` | Success envelope. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_recipient"|"invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_file_type"|"no_files_attached"|"too_many_files"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `POST /account/{accountId}/invoice/{id}/peppol/send` **operationId** `invoice_send_peppol` — Send the invoice over eFaktúra (Peppol) Queues the invoice for structured e-invoice delivery and returns it with the updated peppolStatus. Requires the account to have passed registry identity verification; an unverified account is refused by a guard before this handler runs. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the invoice to send. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: InvoiceDto, t }` | The invoice, with peppolStatus advanced to QUEUED or SENT. | | 400 | `{ s: "error", d: "peppol_missing_dic"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 429 | `{ s: "error", d: "max_daily_peppol_docs_exceeded"|"max_monthly_peppol_docs_exceeded", t }` | An eFaktúra sending allowance (per day or per month) is exhausted. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `PUT /account/{accountId}/invoice/{id}/status` **operationId** `invoice_set_status` — Set the invoice status Unlike the other document types, this returns the whole updated invoice in d, not the bare status string. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `number` | — | **Request body:** `application/json` → `DocumentStatusUpdateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: InvoiceDto, t }` | Success envelope. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_recipient"|"invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_file_type"|"no_files_attached"|"too_many_files"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/invoice/{id}/details` **operationId** `invoice_get_details` — Get selected invoice properties Without get this is identical to invoice_get. With get only the named properties are returned, which keeps a polling client small. Unknown names are ignored. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `number` | — | | `get` | query | no | `string` | Comma-separated property names to return, e.g. status,totalPrice. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: InvoiceDto, t }` | The invoice, or — when get was supplied — an object with only the requested properties. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_recipient"|"invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_file_type"|"no_files_attached"|"too_many_files"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/invoice/{id}/payments` **operationId** `invoice_payment_list` — List payments of an invoice Returns the payment history of one invoice together with what is due, paid and remaining. Request bodies are validated strictly: an unknown property is rejected, not dropped. Rate limited to 60 requests per 60 s and 600 per hour (429, see the response). | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the invoice. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: DocumentPaymentsResultDto, t }` | The invoice's payment state after the call: totals, status and the full list of payments. | | 400 | `{ s: "error", d: "invalid_body"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "invoice_not_found", t }` | No such record in this account. | | 429 | `object` | Too many calls to this route in the current window. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `POST /account/{accountId}/invoice/{id}/payments` **operationId** `invoice_payment_create` — Record a payment on an invoice Adds a payment to the invoice in one transaction and re-derives its status from the payments. Answers 200, not 201. Request bodies are validated strictly: an unknown property is rejected, not dropped. Rate limited to 60 requests per 60 s and 600 per hour (429, see the response). | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the invoice. | **Request body:** `application/json` → `DocumentPaymentCreateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: DocumentPaymentsResultDto, t }` | The invoice's payment state after the call: totals, status and the full list of payments. | | 400 | `{ s: "error", d: "invalid_body"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "invoice_not_found", t }` | No such record in this account. | | 429 | `object` | Too many calls to this route in the current window. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `PATCH /account/{accountId}/invoice/{id}/payments/{paymentId}` **operationId** `invoice_payment_update` — Edit a payment of an invoice Changes only the properties sent. Re-derives the document status. Request bodies are validated strictly: an unknown property is rejected, not dropped. Rate limited to 60 requests per 60 s and 600 per hour (429, see the response). | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the invoice. | | `paymentId` | path | yes | `string` | Payment id (decimal string) from payments[].id. | **Request body:** `application/json` → `DocumentPaymentUpdateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: DocumentPaymentsResultDto, t }` | The invoice's payment state after the call: totals, status and the full list of payments. | | 400 | `{ s: "error", d: "invalid_body"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "invoice_not_found"|"resource_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "conflict", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 429 | `object` | Too many calls to this route in the current window. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `DELETE /account/{accountId}/invoice/{id}/payments/{paymentId}` **operationId** `invoice_payment_delete` — Delete a payment of an invoice Removes the payment and re-derives the document status. Returns the remaining state. Request bodies are validated strictly: an unknown property is rejected, not dropped. Rate limited to 60 requests per 60 s and 600 per hour (429, see the response). | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the invoice. | | `paymentId` | path | yes | `string` | Payment id (decimal string) from payments[].id. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: DocumentPaymentsResultDto, t }` | The invoice's payment state after the call: totals, status and the full list of payments. | | 400 | `{ s: "error", d: "invalid_body"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "invoice_not_found"|"resource_not_found", t }` | No such record in this account. | | 429 | `object` | Too many calls to this route in the current window. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### Credit notes ### `GET /account/{accountId}/creditnote` **operationId** `creditnote_list` — List credit notes Returns one page of documents, newest first. fields (line items) are omitted from list rows — fetch a document by id to get them. Query parameters follow the description of each parameter below; the parameter names are sortModel and filterModel. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `page` | query | no | `number` | Zero-based page index. Ignored when cursor is supplied. A value that is not a non-negative integer is treated as absent, not as an error.; default 0 | | `pageSize` | query | no | `number` | Items per page. A positive integer, maximum 500 (a larger value is rejected with 400). Anything that is not a positive integer is treated as absent and the default applies.; default 10 | | `ids` | query | no | `string[]` | Fetch exactly these rows by id (integers). Overrides search, filterModel, sortModel, page/pageSize and cursor; the answer then carries list and total only (no nextCursor). Accepted on the wire as CSV (ids=1,2,3), a repeated param (ids[]=1&ids[]=2) or a JSON array (ids=["1","2"]). | | `addRelations` | query | no | `string[]` | Extra relations to join into each row. Only relations on the endpoint's server-side allowlist are accepted (on the public document lists that is the creator, already included); any other name answers 400 invalid_request. Integrators normally omit it. | | `sortModel` | query | no | `string` | Sort order as a URL-encoded JSON array of { field, direction } (query parameter name is sortModel, not sort). field is a column of the row (a dotted relation path is allowed); an unknown field, or a direction other than ASC/DESC, answers 400 invalid_request. Invoices also sort by the computed columns cost, remaining and creditNotes. Unparseable JSON, or omitting the parameter, falls back to the default order (document number descending on the document lists). Cursor paging is only available for a single plain-column sort; with a computed column the server pages by page/pageSize and returns no nextCursor. | | `filterModel` | query | no | `string` | Filters as a URL-encoded JSON object { items: [{ field, operator, value }] } (query parameter name is filterModel, not filter); items are ANDed. operator is one of contains, doesnotcontain, equals, is, =, !=, <>, doesnotequal, not, isoneof, startswith, endswith, before, after, onorbefore, onorafter, >, <, >=, <=; an unknown field or operator answers 400 invalid_request. Invoices also filter the computed columns cost, remaining and creditNotes with the numeric operators only. Anything that is not a JSON object collapses to "no filters". | | `search` | query | no | `string` | Search, max 100 characters. On invoice, advance invoice, credit note, price offer and income document lists the text is split into words (first 5 used, each max 40 chars) and EVERY word must match — case- and diacritics-insensitive ("kovac" finds "Kováč"), words of 4+ letters also tolerate small typos. Matched fields: the number, the payment symbols, IBAN/BIC and any sender/recipient company field (name, address, email, phone, ico, dic, icDph, court); a numeric word also matches the issue date and the total. Item names are not searched. Other lists: case-insensitive substring search. A leading document-type prefix is stripped when it stands alone or is followed by a space, dash, slash or digit (FA 2025, FA2025; FA invoice, ZA advance invoice, DB credit note, CP price offer, PD income document); such a prefix that belongs to a different resource returns an empty list. A word that merely starts with those letters ("Zahradník") is searched as text. | | `archived` | query | no | `string` | Accepted but not applied by the list endpoints today: archived documents are returned either way (their status is archived). To exclude or isolate them filter on status with filterModel. | | `cursor` | query | no | `string` | Opaque token: pass back unchanged the nextCursor of the previous response (it is base64 text; do not build or parse it). When present it replaces page. It is only valid for the same sortModel/filters it was issued for; with a computed-column sort it is ignored and page applies. | | `index` | query | no | `boolean` | Add the per-status aggregates to the response: d.data.count (rows per status) and d.data.amount (summed totalPrice per status), over the whole account, ignoring the other filters; invoices also add d.data.tabCounts. It does not change the rows (list rows never carry fields) and is ignored with shortList. Truthy values: 1, true, yes, y, on. | | `shortList` | query | no | `boolean` | Invoices only: collapse each row to { id, number, sender, recipient, issueDate } for a picker. The other document lists ignore it. Truthy values: 1, true, yes, y, on. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: { data: ApiListMeta & { list: CreditNoteListItemDto[] } }, t }` | Success envelope. | | 400 | `{ s: "error", d: "creditnote_invalid_fields"|"creditnote_invalid_number"|"creditnote_invalid_issue_date"|"creditnote_invalid_due_date"|"creditnote_invalid_sender"|"creditnote_invalid_recipient"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "creditnote_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `POST /account/{accountId}/creditnote` **operationId** `creditnote_create` — Create a credit note Creates a document and returns it with its server-assigned id and number. Answers 200, not 201. Accepts multipart/form-data as well as application/json. In multipart form the document properties are ordinary form fields and the optional logo / signature / stamp parts carry image files (one each). Send JSON unless you are uploading an image. Supply invoiceId to link the credit note to an Účtovisko invoice, or only invoiceNumber to credit an invoice issued elsewhere. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | **Request body:** `application/json` → `CreditNoteCreateDto`, `multipart/form-data` → `CreditNoteCreateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: CreditNoteDto, t }` | The created document. | | 400 | `{ s: "error", d: "creditnote_invalid_fields"|"creditnote_invalid_number"|"creditnote_invalid_issue_date"|"creditnote_invalid_due_date"|"creditnote_invalid_sender"|"creditnote_invalid_recipient"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "creditnote_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `DELETE /account/{accountId}/creditnote` **operationId** `creditnote_delete` — Archive or purge credit notes Archives documents by default — they leave every list but the rows and their PDFs are kept. Pass purge=true to delete them permanently; that cannot be undone. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `ids` | query | yes | `string[]` | Ids to act on. Accepted as CSV (ids=1,2,3), a repeated param (ids[]=1&ids[]=2) or a single value. An empty or unparseable value answers 422 (no_ids_provided / invalid_ids). | | `purge` | query | no | `string` | Hard-delete instead of archive. Truthy values: true, 1.; default "false" | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: DocumentDeleteResultDto, t }` | Success envelope. | | 400 | `{ s: "error", d: "creditnote_invalid_fields"|"creditnote_invalid_number"|"creditnote_invalid_issue_date"|"creditnote_invalid_due_date"|"creditnote_invalid_sender"|"creditnote_invalid_recipient"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "creditnote_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/creditnote/latestNumber` **operationId** `creditnote_latest_number` — Get the highest credit note number in use Returns the highest document number currently used in this account, as a string. Use it to show the next number in a UI — do not use it to allocate one: creating a document without number lets the server continue the series atomically, which this read cannot do. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: string, t }` | Success envelope. | | 400 | `{ s: "error", d: "creditnote_invalid_fields"|"creditnote_invalid_number"|"creditnote_invalid_issue_date"|"creditnote_invalid_due_date"|"creditnote_invalid_sender"|"creditnote_invalid_recipient"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "creditnote_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/creditnote/{id}` **operationId** `creditnote_get` — Get one credit note Returns one document including its line items. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: CreditNoteDto, t }` | Success envelope. | | 400 | `{ s: "error", d: "creditnote_invalid_fields"|"creditnote_invalid_number"|"creditnote_invalid_issue_date"|"creditnote_invalid_due_date"|"creditnote_invalid_sender"|"creditnote_invalid_recipient"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "creditnote_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `PUT /account/{accountId}/creditnote/{id}` **operationId** `creditnote_update` — Update a credit note Updates a document. Properties are merged, never replaced: an omitted property keeps its stored value. Unknown properties are dropped by the service allowlist rather than rejected, so a typo in a property name fails silently — check the response. Accepts multipart/form-data as well as application/json. In multipart form the document properties are ordinary form fields and the optional logo / signature / stamp parts carry image files (one each). Send JSON unless you are uploading an image. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | **Request body:** `application/json` → `CreditNoteUpdateDto`, `multipart/form-data` → `CreditNoteUpdateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: CreditNoteDto, t }` | The updated document. | | 400 | `{ s: "error", d: "creditnote_invalid_fields"|"creditnote_invalid_number"|"creditnote_invalid_issue_date"|"creditnote_invalid_due_date"|"creditnote_invalid_sender"|"creditnote_invalid_recipient"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "creditnote_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/creditnote/{id}/pdf` **operationId** `creditnote_pdf` — Download the credit note PDF Returns the rendered PDF as a binary body — not the { s, d, t } envelope. Errors are enveloped: a failure answers { "s": "error", "d": "", "t": … } with the status that alias maps to (401 for a bad key, 403 for a key bound to another account, 404 for an unknown id), never a bare { "error": … } body and never an exception message. Rendering is asynchronous: while it is still running the response is 202 with that same error envelope and the alias pdf_is_loading — retry after a short delay. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | | `fallback` | query | no | `string` | Serve a simplified fallback rendering when the full template fails. true to allow.; default "false" | | status | body | meaning | | --- | --- | --- | | 200 | `binary` | The rendered PDF. | | 202 | `{ s: "error", d: "pdf_is_loading", t }` | The PDF is still being rendered. | | 400 | `{ s: "error", d: "creditnote_invalid_fields"|"creditnote_invalid_number"|"creditnote_invalid_issue_date"|"creditnote_invalid_due_date"|"creditnote_invalid_sender"|"creditnote_invalid_recipient"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "creditnote_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `POST /account/{accountId}/creditnote/{id}/send` **operationId** `creditnote_send` — E-mail the credit note Renders the PDF server-side and e-mails it. The response carries no d — only s and t. Not idempotent: a repeated call sends another e-mail. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | **Request body:** `application/json` → `DocumentSendDto` | status | body | meaning | | --- | --- | --- | | 200 | `ApiOkEnvelope` | Acknowledgement envelope. | | 400 | `{ s: "error", d: "creditnote_invalid_fields"|"creditnote_invalid_number"|"creditnote_invalid_issue_date"|"creditnote_invalid_due_date"|"creditnote_invalid_sender"|"creditnote_invalid_recipient"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "creditnote_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `PUT /account/{accountId}/creditnote/{id}/status` **operationId** `creditnote_set_status` — Set the credit note status Sets the lifecycle status of one document. Returns the stored status as a bare string in d, not the whole document. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | **Request body:** `application/json` → `DocumentStatusUpdateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: "processing"|"issued"|"applied"|"refunded"|"cancelled"|"archived", t }` | The status now stored. | | 400 | `{ s: "error", d: "creditnote_invalid_fields"|"creditnote_invalid_number"|"creditnote_invalid_issue_date"|"creditnote_invalid_due_date"|"creditnote_invalid_sender"|"creditnote_invalid_recipient"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "creditnote_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### Price offers ### `GET /account/{accountId}/priceoffer` **operationId** `priceoffer_list` — List price offers Returns one page of documents, newest first. fields (line items) are omitted from list rows — fetch a document by id to get them. Query parameters follow the description of each parameter below; the parameter names are sortModel and filterModel. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `page` | query | no | `number` | Zero-based page index. Ignored when cursor is supplied. A value that is not a non-negative integer is treated as absent, not as an error.; default 0 | | `pageSize` | query | no | `number` | Items per page. A positive integer, maximum 500 (a larger value is rejected with 400). Anything that is not a positive integer is treated as absent and the default applies.; default 10 | | `ids` | query | no | `string[]` | Fetch exactly these rows by id (integers). Overrides search, filterModel, sortModel, page/pageSize and cursor; the answer then carries list and total only (no nextCursor). Accepted on the wire as CSV (ids=1,2,3), a repeated param (ids[]=1&ids[]=2) or a JSON array (ids=["1","2"]). | | `addRelations` | query | no | `string[]` | Extra relations to join into each row. Only relations on the endpoint's server-side allowlist are accepted (on the public document lists that is the creator, already included); any other name answers 400 invalid_request. Integrators normally omit it. | | `sortModel` | query | no | `string` | Sort order as a URL-encoded JSON array of { field, direction } (query parameter name is sortModel, not sort). field is a column of the row (a dotted relation path is allowed); an unknown field, or a direction other than ASC/DESC, answers 400 invalid_request. Invoices also sort by the computed columns cost, remaining and creditNotes. Unparseable JSON, or omitting the parameter, falls back to the default order (document number descending on the document lists). Cursor paging is only available for a single plain-column sort; with a computed column the server pages by page/pageSize and returns no nextCursor. | | `filterModel` | query | no | `string` | Filters as a URL-encoded JSON object { items: [{ field, operator, value }] } (query parameter name is filterModel, not filter); items are ANDed. operator is one of contains, doesnotcontain, equals, is, =, !=, <>, doesnotequal, not, isoneof, startswith, endswith, before, after, onorbefore, onorafter, >, <, >=, <=; an unknown field or operator answers 400 invalid_request. Invoices also filter the computed columns cost, remaining and creditNotes with the numeric operators only. Anything that is not a JSON object collapses to "no filters". | | `search` | query | no | `string` | Search, max 100 characters. On invoice, advance invoice, credit note, price offer and income document lists the text is split into words (first 5 used, each max 40 chars) and EVERY word must match — case- and diacritics-insensitive ("kovac" finds "Kováč"), words of 4+ letters also tolerate small typos. Matched fields: the number, the payment symbols, IBAN/BIC and any sender/recipient company field (name, address, email, phone, ico, dic, icDph, court); a numeric word also matches the issue date and the total. Item names are not searched. Other lists: case-insensitive substring search. A leading document-type prefix is stripped when it stands alone or is followed by a space, dash, slash or digit (FA 2025, FA2025; FA invoice, ZA advance invoice, DB credit note, CP price offer, PD income document); such a prefix that belongs to a different resource returns an empty list. A word that merely starts with those letters ("Zahradník") is searched as text. | | `archived` | query | no | `string` | Accepted but not applied by the list endpoints today: archived documents are returned either way (their status is archived). To exclude or isolate them filter on status with filterModel. | | `cursor` | query | no | `string` | Opaque token: pass back unchanged the nextCursor of the previous response (it is base64 text; do not build or parse it). When present it replaces page. It is only valid for the same sortModel/filters it was issued for; with a computed-column sort it is ignored and page applies. | | `index` | query | no | `boolean` | Add the per-status aggregates to the response: d.data.count (rows per status) and d.data.amount (summed totalPrice per status), over the whole account, ignoring the other filters; invoices also add d.data.tabCounts. It does not change the rows (list rows never carry fields) and is ignored with shortList. Truthy values: 1, true, yes, y, on. | | `shortList` | query | no | `boolean` | Invoices only: collapse each row to { id, number, sender, recipient, issueDate } for a picker. The other document lists ignore it. Truthy values: 1, true, yes, y, on. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: { data: ApiListMeta & { list: PriceOfferListItemDto[] } }, t }` | Success envelope. | | 400 | `{ s: "error", d: "priceoffer_invalid_fields"|"priceoffer_invalid_number"|"priceoffer_invalid_issue_date"|"priceoffer_invalid_validity_date"|"priceoffer_invalid_sender"|"priceoffer_invalid_recipient"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "priceoffer_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `POST /account/{accountId}/priceoffer` **operationId** `priceoffer_create` — Create a price offer Creates a document and returns it with its server-assigned id and number. Answers 200, not 201. Accepts multipart/form-data as well as application/json. In multipart form the document properties are ordinary form fields and the optional logo / signature / stamp parts carry image files (one each). Send JSON unless you are uploading an image. A price offer carries no payment details and no due date — use validityDate. Status defaults to sent, not draft. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | **Request body:** `application/json` → `PriceOfferCreateDto`, `multipart/form-data` → `PriceOfferCreateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: PriceOfferDto, t }` | The created document. | | 400 | `{ s: "error", d: "priceoffer_invalid_fields"|"priceoffer_invalid_number"|"priceoffer_invalid_issue_date"|"priceoffer_invalid_validity_date"|"priceoffer_invalid_sender"|"priceoffer_invalid_recipient"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "priceoffer_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `DELETE /account/{accountId}/priceoffer` **operationId** `priceoffer_delete` — Archive or purge price offers Archives documents by default — they leave every list but the rows and their PDFs are kept. Pass purge=true to delete them permanently; that cannot be undone. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `ids` | query | yes | `string[]` | Ids to act on. Accepted as CSV (ids=1,2,3), a repeated param (ids[]=1&ids[]=2) or a single value. An empty or unparseable value answers 422 (no_ids_provided / invalid_ids). | | `purge` | query | no | `string` | Hard-delete instead of archive. Truthy values: true, 1.; default "false" | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: DocumentDeleteResultDto, t }` | Success envelope. | | 400 | `{ s: "error", d: "priceoffer_invalid_fields"|"priceoffer_invalid_number"|"priceoffer_invalid_issue_date"|"priceoffer_invalid_validity_date"|"priceoffer_invalid_sender"|"priceoffer_invalid_recipient"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "priceoffer_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/priceoffer/latestNumber` **operationId** `priceoffer_latest_number` — Get the highest price offer number in use Returns the highest document number currently used in this account, as a string. Use it to show the next number in a UI — do not use it to allocate one: creating a document without number lets the server continue the series atomically, which this read cannot do. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: string, t }` | Success envelope. | | 400 | `{ s: "error", d: "priceoffer_invalid_fields"|"priceoffer_invalid_number"|"priceoffer_invalid_issue_date"|"priceoffer_invalid_validity_date"|"priceoffer_invalid_sender"|"priceoffer_invalid_recipient"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "priceoffer_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/priceoffer/{id}` **operationId** `priceoffer_get` — Get one price offer Returns one document including its line items. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: PriceOfferDto, t }` | Success envelope. | | 400 | `{ s: "error", d: "priceoffer_invalid_fields"|"priceoffer_invalid_number"|"priceoffer_invalid_issue_date"|"priceoffer_invalid_validity_date"|"priceoffer_invalid_sender"|"priceoffer_invalid_recipient"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "priceoffer_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `PUT /account/{accountId}/priceoffer/{id}` **operationId** `priceoffer_update` — Update a price offer Updates a document. Properties are merged, never replaced: an omitted property keeps its stored value. Unknown properties are dropped by the service allowlist rather than rejected, so a typo in a property name fails silently — check the response. Accepts multipart/form-data as well as application/json. In multipart form the document properties are ordinary form fields and the optional logo / signature / stamp parts carry image files (one each). Send JSON unless you are uploading an image. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | **Request body:** `application/json` → `PriceOfferUpdateDto`, `multipart/form-data` → `PriceOfferUpdateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: PriceOfferDto, t }` | The updated document. | | 400 | `{ s: "error", d: "priceoffer_invalid_fields"|"priceoffer_invalid_number"|"priceoffer_invalid_issue_date"|"priceoffer_invalid_validity_date"|"priceoffer_invalid_sender"|"priceoffer_invalid_recipient"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "priceoffer_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/priceoffer/{id}/pdf` **operationId** `priceoffer_pdf` — Download the price offer PDF Returns the rendered PDF as a binary body — not the { s, d, t } envelope. Errors are enveloped: a failure answers { "s": "error", "d": "", "t": … } with the status that alias maps to (401 for a bad key, 403 for a key bound to another account, 404 for an unknown id), never a bare { "error": … } body and never an exception message. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | | `fallback` | query | no | `string` | Serve a simplified fallback rendering when the full template fails. true to allow.; default "false" | | status | body | meaning | | --- | --- | --- | | 200 | `binary` | The rendered PDF. | | 400 | `{ s: "error", d: "priceoffer_invalid_fields"|"priceoffer_invalid_number"|"priceoffer_invalid_issue_date"|"priceoffer_invalid_validity_date"|"priceoffer_invalid_sender"|"priceoffer_invalid_recipient"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "priceoffer_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `POST /account/{accountId}/priceoffer/{id}/send` **operationId** `priceoffer_send` — E-mail the price offer Renders the PDF server-side and e-mails it. The response carries no d — only s and t. Not idempotent: a repeated call sends another e-mail. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | **Request body:** `application/json` → `DocumentSendDto` | status | body | meaning | | --- | --- | --- | | 200 | `ApiOkEnvelope` | Acknowledgement envelope. | | 400 | `{ s: "error", d: "priceoffer_invalid_fields"|"priceoffer_invalid_number"|"priceoffer_invalid_issue_date"|"priceoffer_invalid_validity_date"|"priceoffer_invalid_sender"|"priceoffer_invalid_recipient"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "priceoffer_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `PUT /account/{accountId}/priceoffer/{id}/status` **operationId** `priceoffer_set_status` — Set the price offer status Sets the lifecycle status of one document. Returns the stored status as a bare string in d, not the whole document. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | **Request body:** `application/json` → `DocumentStatusUpdateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: "draft"|"sent"|"accepted"|"rejected"|"expired"|"archived", t }` | The status now stored. | | 400 | `{ s: "error", d: "priceoffer_invalid_fields"|"priceoffer_invalid_number"|"priceoffer_invalid_issue_date"|"priceoffer_invalid_validity_date"|"priceoffer_invalid_sender"|"priceoffer_invalid_recipient"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "priceoffer_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### Income documents ### `GET /account/{accountId}/incomeDocument` **operationId** `income_document_list` — List income documents Returns one page of documents, newest first. fields (line items) are omitted from list rows — fetch a document by id to get them. Query parameters follow the description of each parameter below; the parameter names are sortModel and filterModel. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `page` | query | no | `number` | Zero-based page index. Ignored when cursor is supplied. A value that is not a non-negative integer is treated as absent, not as an error.; default 0 | | `pageSize` | query | no | `number` | Items per page. A positive integer, maximum 500 (a larger value is rejected with 400). Anything that is not a positive integer is treated as absent and the default applies.; default 10 | | `ids` | query | no | `string[]` | Fetch exactly these rows by id (integers). Overrides search, filterModel, sortModel, page/pageSize and cursor; the answer then carries list and total only (no nextCursor). Accepted on the wire as CSV (ids=1,2,3), a repeated param (ids[]=1&ids[]=2) or a JSON array (ids=["1","2"]). | | `addRelations` | query | no | `string[]` | Extra relations to join into each row. Only relations on the endpoint's server-side allowlist are accepted (on the public document lists that is the creator, already included); any other name answers 400 invalid_request. Integrators normally omit it. | | `sortModel` | query | no | `string` | Sort order as a URL-encoded JSON array of { field, direction } (query parameter name is sortModel, not sort). field is a column of the row (a dotted relation path is allowed); an unknown field, or a direction other than ASC/DESC, answers 400 invalid_request. Invoices also sort by the computed columns cost, remaining and creditNotes. Unparseable JSON, or omitting the parameter, falls back to the default order (document number descending on the document lists). Cursor paging is only available for a single plain-column sort; with a computed column the server pages by page/pageSize and returns no nextCursor. | | `filterModel` | query | no | `string` | Filters as a URL-encoded JSON object { items: [{ field, operator, value }] } (query parameter name is filterModel, not filter); items are ANDed. operator is one of contains, doesnotcontain, equals, is, =, !=, <>, doesnotequal, not, isoneof, startswith, endswith, before, after, onorbefore, onorafter, >, <, >=, <=; an unknown field or operator answers 400 invalid_request. Invoices also filter the computed columns cost, remaining and creditNotes with the numeric operators only. Anything that is not a JSON object collapses to "no filters". | | `search` | query | no | `string` | Search, max 100 characters. On invoice, advance invoice, credit note, price offer and income document lists the text is split into words (first 5 used, each max 40 chars) and EVERY word must match — case- and diacritics-insensitive ("kovac" finds "Kováč"), words of 4+ letters also tolerate small typos. Matched fields: the number, the payment symbols, IBAN/BIC and any sender/recipient company field (name, address, email, phone, ico, dic, icDph, court); a numeric word also matches the issue date and the total. Item names are not searched. Other lists: case-insensitive substring search. A leading document-type prefix is stripped when it stands alone or is followed by a space, dash, slash or digit (FA 2025, FA2025; FA invoice, ZA advance invoice, DB credit note, CP price offer, PD income document); such a prefix that belongs to a different resource returns an empty list. A word that merely starts with those letters ("Zahradník") is searched as text. | | `archived` | query | no | `string` | Accepted but not applied by the list endpoints today: archived documents are returned either way (their status is archived). To exclude or isolate them filter on status with filterModel. | | `cursor` | query | no | `string` | Opaque token: pass back unchanged the nextCursor of the previous response (it is base64 text; do not build or parse it). When present it replaces page. It is only valid for the same sortModel/filters it was issued for; with a computed-column sort it is ignored and page applies. | | `index` | query | no | `boolean` | Add the per-status aggregates to the response: d.data.count (rows per status) and d.data.amount (summed totalPrice per status), over the whole account, ignoring the other filters; invoices also add d.data.tabCounts. It does not change the rows (list rows never carry fields) and is ignored with shortList. Truthy values: 1, true, yes, y, on. | | `shortList` | query | no | `boolean` | Invoices only: collapse each row to { id, number, sender, recipient, issueDate } for a picker. The other document lists ignore it. Truthy values: 1, true, yes, y, on. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: { data: ApiListMeta & { list: IncomeDocumentListItemDto[] } }, t }` | Success envelope. | | 400 | `{ s: "error", d: "invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `POST /account/{accountId}/incomeDocument` **operationId** `income_document_create` — Create an income document Creates a document and returns it with its server-assigned id and number. Answers 200, not 201. Accepts multipart/form-data as well as application/json. In multipart form the document properties are ordinary form fields and the optional logo / signature / stamp parts carry image files (one each). Send JSON unless you are uploading an image. An income document records a payment received against an invoice and has no line items. Give invoiceId for an Účtovisko invoice, or invoiceNumber plus invoicePrice for an external one. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | **Request body:** `application/json` → `IncomeDocumentCreateDto`, `multipart/form-data` → `IncomeDocumentCreateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: IncomeDocumentDto, t }` | The created document. | | 400 | `{ s: "error", d: "invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `DELETE /account/{accountId}/incomeDocument` **operationId** `income_document_delete` — Archive or purge income documents Archives documents by default — they leave every list but the rows and their PDFs are kept. Pass purge=true to delete them permanently; that cannot be undone. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `ids` | query | yes | `string[]` | Ids to act on. Accepted as CSV (ids=1,2,3), a repeated param (ids[]=1&ids[]=2) or a single value. An empty or unparseable value answers 422 (no_ids_provided / invalid_ids). | | `purge` | query | no | `string` | Hard-delete instead of archive. Truthy values: true, 1.; default "false" | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: DocumentDeleteResultDto, t }` | Success envelope. | | 400 | `{ s: "error", d: "invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/incomeDocument/latestNumber` **operationId** `income_document_latest_number` — Get the highest income document number in use Returns the highest document number currently used in this account, as a string. Use it to show the next number in a UI — do not use it to allocate one: creating a document without number lets the server continue the series atomically, which this read cannot do. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: string, t }` | Success envelope. | | 400 | `{ s: "error", d: "invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/incomeDocument/{id}` **operationId** `income_document_get` — Get one income document Returns one document including its line items. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: IncomeDocumentDto, t }` | Success envelope. | | 400 | `{ s: "error", d: "invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `PUT /account/{accountId}/incomeDocument/{id}` **operationId** `income_document_update` — Update an income document Updates a document. Properties are merged, never replaced: an omitted property keeps its stored value. Unknown properties are dropped by the service allowlist rather than rejected, so a typo in a property name fails silently — check the response. Accepts multipart/form-data as well as application/json. In multipart form the document properties are ordinary form fields and the optional logo / signature / stamp parts carry image files (one each). Send JSON unless you are uploading an image. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | **Request body:** `application/json` → `IncomeDocumentUpdateDto`, `multipart/form-data` → `IncomeDocumentUpdateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: IncomeDocumentDto, t }` | The updated document. | | 400 | `{ s: "error", d: "invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/incomeDocument/{id}/pdf` **operationId** `income_document_pdf` — Download the income document PDF Returns the rendered PDF as a binary body — not the { s, d, t } envelope. Errors are enveloped: a failure answers { "s": "error", "d": "", "t": … } with the status that alias maps to (401 for a bad key, 403 for a key bound to another account, 404 for an unknown id), never a bare { "error": … } body and never an exception message. Rendering is asynchronous: while it is still running the response is 202 with that same error envelope and the alias pdf_is_loading — retry after a short delay. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | | `fallback` | query | no | `string` | Serve a simplified fallback rendering when the full template fails. true to allow.; default "false" | | status | body | meaning | | --- | --- | --- | | 200 | `binary` | The rendered PDF. | | 202 | `{ s: "error", d: "pdf_is_loading", t }` | The PDF is still being rendered. | | 400 | `{ s: "error", d: "invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `POST /account/{accountId}/incomeDocument/{id}/send` **operationId** `income_document_send` — E-mail the income document Renders the PDF server-side and e-mails it. The response carries no d — only s and t. Not idempotent: a repeated call sends another e-mail. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | **Request body:** `application/json` → `DocumentSendDto` | status | body | meaning | | --- | --- | --- | | 200 | `ApiOkEnvelope` | Acknowledgement envelope. | | 400 | `{ s: "error", d: "invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `PUT /account/{accountId}/incomeDocument/{id}/status` **operationId** `income_document_set_status` — Set the income document status Sets the lifecycle status of one document. Returns the stored status as a bare string in d, not the whole document. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | **Request body:** `application/json` → `DocumentStatusUpdateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: "draft"|"issued"|"cancelled"|"archived", t }` | The status now stored. | | 400 | `{ s: "error", d: "invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### Advance invoices ### `GET /account/{accountId}/advanceInvoice` **operationId** `advance_invoice_list` — List advance invoices Returns one page of documents, newest first. fields (line items) are omitted from list rows — fetch a document by id to get them. Query parameters follow the description of each parameter below; the parameter names are sortModel and filterModel. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `page` | query | no | `number` | Zero-based page index. Ignored when cursor is supplied. A value that is not a non-negative integer is treated as absent, not as an error.; default 0 | | `pageSize` | query | no | `number` | Items per page. A positive integer, maximum 500 (a larger value is rejected with 400). Anything that is not a positive integer is treated as absent and the default applies.; default 10 | | `ids` | query | no | `string[]` | Fetch exactly these rows by id (integers). Overrides search, filterModel, sortModel, page/pageSize and cursor; the answer then carries list and total only (no nextCursor). Accepted on the wire as CSV (ids=1,2,3), a repeated param (ids[]=1&ids[]=2) or a JSON array (ids=["1","2"]). | | `addRelations` | query | no | `string[]` | Extra relations to join into each row. Only relations on the endpoint's server-side allowlist are accepted (on the public document lists that is the creator, already included); any other name answers 400 invalid_request. Integrators normally omit it. | | `sortModel` | query | no | `string` | Sort order as a URL-encoded JSON array of { field, direction } (query parameter name is sortModel, not sort). field is a column of the row (a dotted relation path is allowed); an unknown field, or a direction other than ASC/DESC, answers 400 invalid_request. Invoices also sort by the computed columns cost, remaining and creditNotes. Unparseable JSON, or omitting the parameter, falls back to the default order (document number descending on the document lists). Cursor paging is only available for a single plain-column sort; with a computed column the server pages by page/pageSize and returns no nextCursor. | | `filterModel` | query | no | `string` | Filters as a URL-encoded JSON object { items: [{ field, operator, value }] } (query parameter name is filterModel, not filter); items are ANDed. operator is one of contains, doesnotcontain, equals, is, =, !=, <>, doesnotequal, not, isoneof, startswith, endswith, before, after, onorbefore, onorafter, >, <, >=, <=; an unknown field or operator answers 400 invalid_request. Invoices also filter the computed columns cost, remaining and creditNotes with the numeric operators only. Anything that is not a JSON object collapses to "no filters". | | `search` | query | no | `string` | Search, max 100 characters. On invoice, advance invoice, credit note, price offer and income document lists the text is split into words (first 5 used, each max 40 chars) and EVERY word must match — case- and diacritics-insensitive ("kovac" finds "Kováč"), words of 4+ letters also tolerate small typos. Matched fields: the number, the payment symbols, IBAN/BIC and any sender/recipient company field (name, address, email, phone, ico, dic, icDph, court); a numeric word also matches the issue date and the total. Item names are not searched. Other lists: case-insensitive substring search. A leading document-type prefix is stripped when it stands alone or is followed by a space, dash, slash or digit (FA 2025, FA2025; FA invoice, ZA advance invoice, DB credit note, CP price offer, PD income document); such a prefix that belongs to a different resource returns an empty list. A word that merely starts with those letters ("Zahradník") is searched as text. | | `archived` | query | no | `string` | Accepted but not applied by the list endpoints today: archived documents are returned either way (their status is archived). To exclude or isolate them filter on status with filterModel. | | `cursor` | query | no | `string` | Opaque token: pass back unchanged the nextCursor of the previous response (it is base64 text; do not build or parse it). When present it replaces page. It is only valid for the same sortModel/filters it was issued for; with a computed-column sort it is ignored and page applies. | | `index` | query | no | `boolean` | Add the per-status aggregates to the response: d.data.count (rows per status) and d.data.amount (summed totalPrice per status), over the whole account, ignoring the other filters; invoices also add d.data.tabCounts. It does not change the rows (list rows never carry fields) and is ignored with shortList. Truthy values: 1, true, yes, y, on. | | `shortList` | query | no | `boolean` | Invoices only: collapse each row to { id, number, sender, recipient, issueDate } for a picker. The other document lists ignore it. Truthy values: 1, true, yes, y, on. | | `tab` | query | no | `"unpaid"|"overdue"` | Derived payment tab. Narrows the result set on top of any other filter. unpaid = issued and not settled, overdue = unpaid with a due date before today (Europe/Bratislava calendar day). Omitted behaves exactly as before; status= filters keep working unchanged. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: { data: ApiListMeta & { list: AdvanceInvoiceListItemDto[] } }, t }` | Success envelope. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_sender"|"invoice_invalid_recipient"|"advance_invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "advance_invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `POST /account/{accountId}/advanceInvoice` **operationId** `advance_invoice_create` — Create an advance invoice Creates a document and returns it with its server-assigned id and number. Answers 200, not 201. Accepts multipart/form-data as well as application/json. In multipart form the document properties are ordinary form fields and the optional logo / signature / stamp parts carry image files (one each). Send JSON unless you are uploading an image. Status settled means the advance was consumed by a final invoice; it is set by the invoicing flow, not by a client. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | **Request body:** `application/json` → `AdvanceInvoiceCreateDto`, `multipart/form-data` → `AdvanceInvoiceCreateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: AdvanceInvoiceDto, t }` | The created document. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_sender"|"invoice_invalid_recipient"|"advance_invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "advance_invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `DELETE /account/{accountId}/advanceInvoice` **operationId** `advance_invoice_delete` — Archive or purge advance invoices Archives documents by default — they leave every list but the rows and their PDFs are kept. Pass purge=true to delete them permanently; that cannot be undone. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `ids` | query | yes | `string[]` | Ids to act on. Accepted as CSV (ids=1,2,3), a repeated param (ids[]=1&ids[]=2) or a single value. An empty or unparseable value answers 422 (no_ids_provided / invalid_ids). | | `purge` | query | no | `string` | Hard-delete instead of archive. Truthy values: true, 1.; default "false" | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: DocumentDeleteResultDto, t }` | Success envelope. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_sender"|"invoice_invalid_recipient"|"advance_invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "advance_invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/advanceInvoice/latestNumber` **operationId** `advance_invoice_latest_number` — Get the highest advance invoice number in use Returns the highest document number currently used in this account, as a string. Use it to show the next number in a UI — do not use it to allocate one: creating a document without number lets the server continue the series atomically, which this read cannot do. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: string, t }` | Success envelope. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_sender"|"invoice_invalid_recipient"|"advance_invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "advance_invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/advanceInvoice/{id}` **operationId** `advance_invoice_get` — Get one advance invoice Returns one document including its line items. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: AdvanceInvoiceDto, t }` | Success envelope. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_sender"|"invoice_invalid_recipient"|"advance_invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "advance_invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `PUT /account/{accountId}/advanceInvoice/{id}` **operationId** `advance_invoice_update` — Update an advance invoice Updates a document. Properties are merged, never replaced: an omitted property keeps its stored value. Unknown properties are dropped by the service allowlist rather than rejected, so a typo in a property name fails silently — check the response. Accepts multipart/form-data as well as application/json. In multipart form the document properties are ordinary form fields and the optional logo / signature / stamp parts carry image files (one each). Send JSON unless you are uploading an image. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | **Request body:** `application/json` → `AdvanceInvoiceUpdateDto`, `multipart/form-data` → `AdvanceInvoiceUpdateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: AdvanceInvoiceDto, t }` | The updated document. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_sender"|"invoice_invalid_recipient"|"advance_invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "advance_invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/advanceInvoice/{id}/pdf` **operationId** `advance_invoice_pdf` — Download the advance invoice PDF Returns the rendered PDF as a binary body — not the { s, d, t } envelope. Errors are enveloped: a failure answers { "s": "error", "d": "", "t": … } with the status that alias maps to (401 for a bad key, 403 for a key bound to another account, 404 for an unknown id), never a bare { "error": … } body and never an exception message. Rendering is asynchronous: while it is still running the response is 202 with that same error envelope and the alias pdf_is_loading — retry after a short delay. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | | `fallback` | query | no | `string` | Serve a simplified fallback rendering when the full template fails. true to allow.; default "false" | | status | body | meaning | | --- | --- | --- | | 200 | `binary` | The rendered PDF. | | 202 | `{ s: "error", d: "pdf_is_loading", t }` | The PDF is still being rendered. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_sender"|"invoice_invalid_recipient"|"advance_invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "advance_invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `POST /account/{accountId}/advanceInvoice/{id}/send` **operationId** `advance_invoice_send` — E-mail the advance invoice Renders the PDF server-side and e-mails it. The response carries no d — only s and t. Not idempotent: a repeated call sends another e-mail. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | **Request body:** `application/json` → `DocumentSendDto` | status | body | meaning | | --- | --- | --- | | 200 | `ApiOkEnvelope` | Acknowledgement envelope. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_sender"|"invoice_invalid_recipient"|"advance_invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "advance_invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `PUT /account/{accountId}/advanceInvoice/{id}/status` **operationId** `advance_invoice_set_status` — Set the advance invoice status Sets the lifecycle status of one document. Returns the stored status as a bare string in d, not the whole document. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the document. | **Request body:** `application/json` → `DocumentStatusUpdateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: "paid"|"draft"|"processing"|"archived"|"overdue"|"cancelled"|"closed"|"settled", t }` | The status now stored. | | 400 | `{ s: "error", d: "invoice_invalid_fields"|"invoice_invalid_number"|"invoice_invalid_issue_date"|"invoice_invalid_due_date"|"invoice_invalid_sender"|"invoice_invalid_recipient"|"advance_invoice_invalid_iban"|"invalid_ids"|"no_ids_provided"|"email_missing"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "advance_invoice_not_found"|"document_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "document_duplicate_number", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/advanceInvoice/{id}/payments` **operationId** `advance_invoice_payment_list` — List payments of an advance invoice Returns the payment history of one advance invoice together with what is due, paid and remaining. Request bodies are validated strictly: an unknown property is rejected, not dropped. Rate limited to 60 requests per 60 s and 600 per hour (429, see the response). | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the advance invoice. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: DocumentPaymentsResultDto, t }` | The advance invoice's payment state after the call: totals, status and the full list of payments. | | 400 | `{ s: "error", d: "invalid_body"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "advance_invoice_not_found", t }` | No such record in this account. | | 429 | `object` | Too many calls to this route in the current window. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `POST /account/{accountId}/advanceInvoice/{id}/payments` **operationId** `advance_invoice_payment_create` — Record a payment on an advance invoice Adds a payment to the advance invoice in one transaction and re-derives its status from the payments. Answers 200, not 201. Request bodies are validated strictly: an unknown property is rejected, not dropped. Rate limited to 60 requests per 60 s and 600 per hour (429, see the response). | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the advance invoice. | **Request body:** `application/json` → `DocumentPaymentCreateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: DocumentPaymentsResultDto, t }` | The advance invoice's payment state after the call: totals, status and the full list of payments. | | 400 | `{ s: "error", d: "invalid_body"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "advance_invoice_not_found", t }` | No such record in this account. | | 429 | `object` | Too many calls to this route in the current window. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `PATCH /account/{accountId}/advanceInvoice/{id}/payments/{paymentId}` **operationId** `advance_invoice_payment_update` — Edit a payment of an advance invoice Changes only the properties sent. Re-derives the document status. Request bodies are validated strictly: an unknown property is rejected, not dropped. Rate limited to 60 requests per 60 s and 600 per hour (429, see the response). | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the advance invoice. | | `paymentId` | path | yes | `string` | Payment id (decimal string) from payments[].id. | **Request body:** `application/json` → `DocumentPaymentUpdateDto` | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: DocumentPaymentsResultDto, t }` | The advance invoice's payment state after the call: totals, status and the full list of payments. | | 400 | `{ s: "error", d: "invalid_body"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "advance_invoice_not_found"|"resource_not_found", t }` | No such record in this account. | | 409 | `{ s: "error", d: "conflict", t }` | The request was well formed and the caller is not at fault — the state of the world is the refusal. | | 429 | `object` | Too many calls to this route in the current window. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `DELETE /account/{accountId}/advanceInvoice/{id}/payments/{paymentId}` **operationId** `advance_invoice_payment_delete` — Delete a payment of an advance invoice Removes the payment and re-derives the document status. Returns the remaining state. Request bodies are validated strictly: an unknown property is rejected, not dropped. Rate limited to 60 requests per 60 s and 600 per hour (429, see the response). | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Id of the advance invoice. | | `paymentId` | path | yes | `string` | Payment id (decimal string) from payments[].id. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: DocumentPaymentsResultDto, t }` | The advance invoice's payment state after the call: totals, status and the full list of payments. | | 400 | `{ s: "error", d: "invalid_body"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "advance_invoice_not_found"|"resource_not_found", t }` | No such record in this account. | | 429 | `object` | Too many calls to this route in the current window. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### Receipts ### `GET /account/{accountId}/receipt` **operationId** `receipt_list` — List receipts Returns a page of receipts plus an aggregate stats block. Note the envelope shape: d.data.list, d.data.total and d.data.stats — receipts carry stats where the document resources carry nextCursor. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `shortList` | query | no | `boolean` | Accepted but has no effect on receipts (no reduced projection exists). | | `archived` | query | no | `string` | Accepted but not applied by the list today; filter on the archived column with filterModel instead. | | `search` | query | no | `string` | Case-insensitive substring search across every stored column of the receipt (each cast to text), e.g. organisation, eKasa identifier, amounts, dates. | | `filterModel` | query | no | `string` | URL-encoded JSON object { items: [{ field, operator, value }] }, items ANDed; the parameter is filterModel, not filter. Operators: contains, doesnotcontain, equals, is, =, !=, <>, doesnotequal, not, isoneof, startswith, endswith, before, after, onorbefore, onorafter, >, <, >=, <=; an unknown field or operator answers 400 invalid_request. | | `sortModel` | query | no | `string` | URL-encoded JSON array of { field, direction } (ASC/DESC); the parameter is sortModel, not sort. An unknown field or direction answers 400 invalid_request; unparseable JSON falls back to the default order. | | `ids` | query | no | `string[]` | Fetch exactly these rows by id (integers). Overrides search, filterModel, sortModel and paging. CSV (ids=1,2), repeated (ids[]=1&ids[]=2) or a JSON array. | | `pageSize` | query | no | `integer` | Items per page, 1-500 (default 10). A larger value is rejected with 400; a value that is not a positive integer is treated as absent.; default 10 | | `page` | query | no | `integer` | Zero-based page index. Ignored when cursor is supplied.; default 0 | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: { data: ApiListMeta & { list: ReceiptDto[], stats: ReceiptStatsDto } }, t }` | d.data.list is the page of receipts and d.data.stats the aggregate block. | | 400 | `{ s: "error", d: "invalid_ids"|"no_ids_provided"|"too_many_files"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "receipt_not_found"|"resource_not_found", t }` | No such record in this account. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `POST /account/{accountId}/receipt` **operationId** `receipt_create` — Store a receipt Stores an eKasa receipt or a hand-written paragón. Look the eKasa receipt up with receipt_find first — it also tells you whether the account already has it. Answers 200, not 201. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | **Request body:** `multipart/form-data` → `object` Sent as multipart/form-data, not JSON. The receiptData part is a JSON string whose parsed shape is ReceiptWriteDto. Up to 10 further parts are attachment files; each file's basename (without extension) is used as its attachment reference id. | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: ReceiptDto, t }` | The stored receipt, with its attachments. | | 400 | `{ s: "error", d: "invalid_ids"|"no_ids_provided"|"too_many_files"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "receipt_not_found"|"resource_not_found", t }` | No such record in this account. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `PUT /account/{accountId}/receipt/{receiptId}` **operationId** `receipt_update` — Update a receipt Merge update. Attachments are reconciled against the files sent: a stored attachment whose URL is absent from this request is removed. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `receiptId` | path | yes | `integer` | Numeric id of the stored receipt — not the eKasa receiptId string. | **Request body:** `multipart/form-data` → `object` Sent as multipart/form-data, not JSON. The receiptData part is a JSON string whose parsed shape is ReceiptWriteDto. Up to 10 further parts are attachment files; each file's basename (without extension) is used as its attachment reference id. | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: ReceiptDto, t }` | The updated receipt. | | 400 | `{ s: "error", d: "invalid_ids"|"no_ids_provided"|"too_many_files"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "receipt_not_found"|"resource_not_found", t }` | No such record in this account. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `DELETE /account/{accountId}/receipt/{receiptId}` **operationId** `receipt_delete` — Archive or purge a receipt Archives by default. d reports which happened: { id, archived: true } or, with purge=true, { id, purged: true } — the two keys are mutually exclusive and only the applicable one is present. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `receiptId` | path | yes | `integer` | Numeric id of the stored receipt. | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `purge` | query | no | `string` | Hard-delete instead of archive. Only the literal true enables it.; default "false" | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: ReceiptDeleteResultDto, t }` | Success envelope. | | 400 | `{ s: "error", d: "invalid_ids"|"no_ids_provided"|"too_many_files"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "receipt_not_found"|"resource_not_found", t }` | No such record in this account. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/receipt/export` **operationId** `receipt_export` — Export receipts as ZIP or XML Returns a binary body, not the { s, d, t } envelope. Declared before :id, so export is never read as a receipt id. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `ids` | query | yes | `string` | Comma-separated receipt ids to include. | | `provider` | query | no | `"ZIP"|"XML"` | Export format. ZIP bundles the receipts; XML emits an accounting feed.; default "ZIP" | | `translations` | query | no | `string` | JSON-encoded label overrides for the generated file. | | status | body | meaning | | --- | --- | --- | | 200 | `binary` | The export archive or XML document. | | 400 | `{ s: "error", d: "invalid_ids"|"no_ids_provided"|"too_many_files"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "receipt_not_found"|"resource_not_found", t }` | No such record in this account. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/receipt/find/{receiptId}` **operationId** `receipt_find` — Look a receipt up in eKasa Queries the Slovak eKasa service for a receipt by its printed identifier and reports whether this account already stored it. Rate-limited to 20 calls per 60 s per caller because it makes an outbound request to Finančná správa — expect 429 above that. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `receiptId` | path | yes | `string` | The eKasa receipt identifier printed on the receipt (an O-… string), not a stored id. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: ReceiptLookupResultDto, t }` | Success envelope. | | 400 | `{ s: "error", d: "invalid_ids"|"no_ids_provided"|"too_many_files"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "receipt_not_found"|"resource_not_found", t }` | No such record in this account. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 429 | `{ s: "error", d: "rate_limit_exceeded", t }` | Too many calls to this route in the current window. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ### `GET /account/{accountId}/receipt/{id}` **operationId** `receipt_get` — Get one receipt Returns the receipt with its items and attachments, or null in d. | parameter | in | required | type | notes | | --- | --- | --- | --- | --- | | `accountId` | path | yes | `integer | string` | The account the document belongs to: either the numeric account id or the account's publicId string (the id in the web app URL). Must be the account the API key was issued for — a key used against another account answers 403 api_key_account_mismatch. | | `id` | path | yes | `integer` | Numeric id of the stored receipt. | | status | body | meaning | | --- | --- | --- | | 200 | `{ s: "ok", d: ReceiptDto, t }` | The receipt. | | 400 | `{ s: "error", d: "invalid_ids"|"no_ids_provided"|"too_many_files"|"invalid_request", t }` | Rejected input. | | 401 | `{ s: "error", d: "invalid_api_key"|"api_key_expired"|"unauthorized", t }` | The Authorization: Bearer key is missing, malformed, revoked or expired. | | 403 | `{ s: "error", d: "insufficient_permissions_api_key"|"api_key_account_mismatch", t }` | The key is valid but may not do this: insufficient_permissions_api_key when its permission bitfield does not cover the operation, api_key_account_mismatch when the key is bound to an account other than the accountId in the path. | | 404 | `{ s: "error", d: "receipt_not_found"|"resource_not_found", t }` | No such record in this account. | | 413 | `{ s: "error", d: "file_too_large", t }` | An uploaded attachment is larger than the per-file limit. | | 500 | `{ s: "error", d: "internal_server_error"|"account_not_found", t }` | A genuine server fault. | ## Schemas Every schema referenced by the endpoints above, defined once. Names in the `type` column of an endpoint table refer here. #### `AdvanceInvoiceCreateDto` | property | type | required | notes | | --- | --- | --- | --- | | `number` | `number` | no | Document number. Omit to let the server continue the account's series — call …/latestNumber to see where it currently stands. Stored as a numeric column, so it is returned as a string by the Postgres driver. | | `issueDate` | `string(date-time)` | no | — | | `sender` | `CompanyDetailsDto` | no | Supplier snapshot. Defaults to the account's company profile when omitted. | | `recipient` | `CompanyDetailsDto` | no | Customer snapshot. | | `fields` | `DocumentFieldDto[]` | no | Line items. An empty array is accepted and renders a document with no lines. | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | no | default "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | no | Language the PDF renders in.; default "sk" | | `useVat` | `boolean` | no | Whether VAT is applied. Set false for a non-VAT-payer and supply noVatReason.; default true | | `noVatReason` | `string` | no | Printed explanation when useVat is false. | | `rounding` | `string` | no | Rounding mode as a free-form token, as stored. null means no rounding. | | `note` | `string` | no | Free-text note printed on the document. | | `color` | `string` | no | Accent colour of the template, as a CSS hex string.; default "#FBF9FF" | | `style` | `"modern"|"simple"` | no | default "modern" | | `stamp` | `"none"|"default"` | no | Whether a stamp graphic is printed.; default "none" | | `poster` | `string` | no | Header image reference, as stored. Also settable by uploading a poster part in a multipart/form-data request. | | `status` | `"paid"|"draft"|"processing"|"archived"|"overdue"|"cancelled"|"closed"|"settled"` | no | Defaults to processing.; default "processing" | | `dueDate` | `string(date-time)` | no | — | | `deliveryDate` | `string(date-time)` | no | — | | `orderNumber` | `string | integer` | no | Purchase-order number as a string of 1–32 digits; leading zeros are preserved ("00005" stays "00005"). A JSON number is still accepted for backward compatibility and is stored as a string. | | `paymentMethod` | `"banktransfer"|"cash"|"card"|"crypto"|"paypal"|"custom"` | no | — | | `customPM` | `string` | no | — | | `deliveryMethod` | `"email"|"post"|"courier"|"personal"` | no | — | | `IBAN` | `string` | no | e.g. "SK3112000000198742637541" | | `BIC` | `string` | no | e.g. "GIBASKBX" | | `variableSymbol` | `string` | no | — | | `constantSymbol` | `string` | no | — | | `specificSymbol` | `string` | no | — | | `showQR` | `boolean` | no | default true | | `deposit` | `number` | no | — | | `discount` | `number` | no | default 0 | | `nonPay` | `boolean` | no | default false | #### `AdvanceInvoiceDto` | property | type | required | notes | | --- | --- | --- | --- | | `id` | `number` | yes | Server-assigned id, unique per document type. | | `number` | `string` | yes | Document number. A decimal column, therefore a string on the wire, e.g. "20260042".; nullable | | `issueDate` | `string(date-time)` | yes | nullable | | `createdAt` | `string(date-time)` | yes | — | | `updatedAt` | `string(date-time)` | yes | nullable | | `createdBy` | `DocumentUserDto` | yes | Creator, reduced by formatUser(). null when the document was created by an API key rather than a signed-in user.; nullable | | `fields` | `DocumentFieldDto[]` | yes | Line items. Omitted from list responses — fetch the document by id to get them. | | `sender` | `CompanyDetailsDto` | yes | nullable | | `recipient` | `CompanyDetailsDto` | yes | nullable | | `totalPrice` | `string` | yes | Computed grand total including VAT. A decimal column, therefore a string on the wire. null on a document with no priced lines.; nullable | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | yes | nullable; e.g. "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | yes | e.g. "sk" | | `useVat` | `boolean` | yes | e.g. true | | `noVatReason` | `string` | yes | nullable | | `rounding` | `string` | yes | nullable | | `note` | `string` | yes | nullable | | `color` | `string` | yes | e.g. "#FBF9FF" | | `style` | `"modern"|"simple"` | yes | nullable; e.g. "modern" | | `stamp` | `"none"|"default"` | yes | nullable; e.g. "none" | | `poster` | `string` | yes | nullable | | `dueDate` | `string(date-time)` | yes | nullable | | `deliveryDate` | `string(date-time)` | yes | nullable | | `paymentMethod` | `"banktransfer"|"cash"|"card"|"crypto"|"paypal"|"custom"` | yes | nullable; e.g. "banktransfer" | | `customPM` | `string` | yes | Label used when paymentMethod is custom.; nullable | | `deliveryMethod` | `string` | yes | Delivery method. A free-form string is accepted beyond the listed values.; nullable | | `IBAN` | `string` | yes | nullable; e.g. "SK3112000000198742637541" | | `BIC` | `string` | yes | nullable; e.g. "GIBASKBX" | | `variableSymbol` | `string` | yes | nullable; e.g. "20260042" | | `constantSymbol` | `string` | yes | nullable | | `specificSymbol` | `string` | yes | nullable | | `qrCode` | `string` | yes | PAY-by-square payload string rendered as the payment QR code, not an image.; nullable | | `showQR` | `boolean` | yes | e.g. true | | `paypalUser` | `string` | yes | nullable; e.g. null | | `status` | `"paid"|"draft"|"processing"|"archived"|"overdue"|"cancelled"|"closed"|"settled"` | yes | nullable; e.g. "processing" | | `orderNumber` | `string` | yes | Purchase-order number, always returned as a string; leading zeros are preserved ("00005" stays "00005").; nullable | | `deposit` | `number` | yes | Deposit amount, integer.; nullable | | `discount` | `number` | yes | Whole-document discount in percent. | | `nonPay` | `boolean` | yes | Print as a non-payment record. | #### `AdvanceInvoiceListItemDto` | property | type | required | notes | | --- | --- | --- | --- | | `id` | `number` | yes | Server-assigned id, unique per document type. | | `number` | `string` | yes | Document number. A decimal column, therefore a string on the wire, e.g. "20260042".; nullable | | `issueDate` | `string(date-time)` | yes | nullable | | `createdAt` | `string(date-time)` | yes | — | | `updatedAt` | `string(date-time)` | yes | nullable | | `createdBy` | `DocumentUserDto` | yes | Creator, reduced by formatUser(). null when the document was created by an API key rather than a signed-in user.; nullable | | `sender` | `CompanyDetailsDto` | yes | nullable | | `recipient` | `CompanyDetailsDto` | yes | nullable | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | yes | nullable; e.g. "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | yes | e.g. "sk" | | `useVat` | `boolean` | yes | e.g. true | | `noVatReason` | `string` | yes | nullable | | `rounding` | `string` | yes | nullable | | `note` | `string` | yes | nullable | | `color` | `string` | yes | e.g. "#FBF9FF" | | `style` | `"modern"|"simple"` | yes | nullable; e.g. "modern" | | `stamp` | `"none"|"default"` | yes | nullable; e.g. "none" | | `poster` | `string` | yes | nullable | | `dueDate` | `string(date-time)` | yes | nullable | | `deliveryDate` | `string(date-time)` | yes | nullable | | `paymentMethod` | `"banktransfer"|"cash"|"card"|"crypto"|"paypal"|"custom"` | yes | nullable; e.g. "banktransfer" | | `customPM` | `string` | yes | Label used when paymentMethod is custom.; nullable | | `deliveryMethod` | `string` | yes | Delivery method. A free-form string is accepted beyond the listed values.; nullable | | `IBAN` | `string` | yes | nullable; e.g. "SK3112000000198742637541" | | `BIC` | `string` | yes | nullable; e.g. "GIBASKBX" | | `variableSymbol` | `string` | yes | nullable; e.g. "20260042" | | `constantSymbol` | `string` | yes | nullable | | `specificSymbol` | `string` | yes | nullable | | `qrCode` | `string` | yes | PAY-by-square payload string rendered as the payment QR code, not an image.; nullable | | `showQR` | `boolean` | yes | e.g. true | | `paypalUser` | `string` | yes | nullable; e.g. null | | `status` | `"paid"|"draft"|"processing"|"archived"|"overdue"|"cancelled"|"closed"|"settled"` | yes | nullable; e.g. "processing" | | `orderNumber` | `string` | yes | Purchase-order number, always returned as a string; leading zeros are preserved ("00005" stays "00005").; nullable | | `deposit` | `number` | yes | Deposit amount, integer.; nullable | | `discount` | `number` | yes | Whole-document discount in percent. | | `nonPay` | `boolean` | yes | Print as a non-payment record. | | `totalPrice` | `number` | yes | Precomputed grand total including VAT, as a JSON number (list rows only; the single-document endpoint returns the same value as a decimal string).; nullable | #### `AdvanceInvoiceUpdateDto` | property | type | required | notes | | --- | --- | --- | --- | | `number` | `number` | no | Document number. Omit to let the server continue the account's series — call …/latestNumber to see where it currently stands. Stored as a numeric column, so it is returned as a string by the Postgres driver. | | `issueDate` | `string(date-time)` | no | — | | `sender` | `CompanyDetailsDto` | no | Supplier snapshot. Defaults to the account's company profile when omitted. | | `recipient` | `CompanyDetailsDto` | no | Customer snapshot. | | `fields` | `DocumentFieldDto[]` | no | Line items. An empty array is accepted and renders a document with no lines. | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | no | default "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | no | Language the PDF renders in.; default "sk" | | `useVat` | `boolean` | no | Whether VAT is applied. Set false for a non-VAT-payer and supply noVatReason.; default true | | `noVatReason` | `string` | no | Printed explanation when useVat is false. | | `rounding` | `string` | no | Rounding mode as a free-form token, as stored. null means no rounding. | | `note` | `string` | no | Free-text note printed on the document. | | `color` | `string` | no | Accent colour of the template, as a CSS hex string.; default "#FBF9FF" | | `style` | `"modern"|"simple"` | no | default "modern" | | `stamp` | `"none"|"default"` | no | Whether a stamp graphic is printed.; default "none" | | `poster` | `string` | no | Header image reference, as stored. Also settable by uploading a poster part in a multipart/form-data request. | | `status` | `"paid"|"draft"|"processing"|"archived"|"overdue"|"cancelled"|"closed"|"settled"` | no | Defaults to processing.; default "processing" | | `dueDate` | `string(date-time)` | no | — | | `deliveryDate` | `string(date-time)` | no | — | | `orderNumber` | `string | integer` | no | Purchase-order number as a string of 1–32 digits; leading zeros are preserved ("00005" stays "00005"). A JSON number is still accepted for backward compatibility and is stored as a string. | | `paymentMethod` | `"banktransfer"|"cash"|"card"|"crypto"|"paypal"|"custom"` | no | — | | `customPM` | `string` | no | — | | `deliveryMethod` | `"email"|"post"|"courier"|"personal"` | no | — | | `IBAN` | `string` | no | e.g. "SK3112000000198742637541" | | `BIC` | `string` | no | e.g. "GIBASKBX" | | `variableSymbol` | `string` | no | — | | `constantSymbol` | `string` | no | — | | `specificSymbol` | `string` | no | — | | `showQR` | `boolean` | no | default true | | `deposit` | `number` | no | — | | `discount` | `number` | no | default 0 | | `nonPay` | `boolean` | no | default false | #### `ApiErrorEnvelope` | property | type | required | notes | | --- | --- | --- | --- | | `s` | `"error"` | yes | Always error on a non-2xx response. | | `d` | `"invalid_request"|"invalid_api_key"|"api_key_expired"|"insufficient_permissions_api_key"|"unauthorized"|"not_found"|"no_ids_provided"|"invalid_ids"|"email_missing"|"internal_server_error"` | yes | Error alias — a single lowercase snake_case token, never free text and never a nested object (sanitizeErrorPayload enforces that). Unknown aliases must be handled as a generic failure of the response's HTTP class. | | `details` | `object[]` | no | UC-992 — present only on 400 invalid_request, and only for the fields that FAILED DTO validation; a field that validated is never listed. Omitted entirely otherwise, so its absence is not a signal. field is the dotted path with bracketed array indexes (items[0].vat). rule is the stable validator token (isIn, isNotEmpty, whitelistValidation for an extra key) — branch on it rather than on message. message is short English for a human reader. No submitted value is ever echoed back (the body may carry personal data or credentials) and no server internal is named. At most 20 entries. | | `t` | `string(date-time)` | yes | — | #### `ApiListMeta` | property | type | required | notes | | --- | --- | --- | --- | | `total` | `number` | yes | Total number of rows matching the filter, ignoring pagination. | | `nextCursor` | `string` | no | Opaque token for the next page (base64 text; ids are 32-bit integers, the token is not an id). Pass it back unchanged as ?cursor=; when cursor is supplied, page is ignored. It is omitted for an empty page, for ids= lookups and for computed-column sorts (use page there). It is not an end-of-list marker — a full last page still carries one; stop when list is shorter than pageSize or empty. Not returned by receipts. | | `count` | `object` | no | Row count per status over the whole account, keyed by status value. Returned only when ?index=true. | | `amount` | `object` | no | Summed totalPrice per status over the whole account, keyed by status value. Returned only when ?index=true. | #### `ApiOkEnvelope` | property | type | required | notes | | --- | --- | --- | --- | | `s` | `"ok"` | yes | Outcome discriminator. Always ok on a 2xx response. Branch on this field, not on whether d is present — d is populated on both branches. | | `t` | `string(date-time)` | yes | Server timestamp of the response, ISO-8601 in UTC. | #### `CompanyDetailsDto` | property | type | required | notes | | --- | --- | --- | --- | | `name` | `string` | yes | Legal name. | | `address` | `string` | yes | Full address as one line, as entered. | | `email` | `string` | yes | e.g. "fakturacia@example.sk" | | `phone` | `string` | yes | e.g. "+421 900 000 000" | | `ico` | `number` | yes | IČO (company registration number) as a number — a leading zero is not preserved. | | `dic` | `number` | yes | DIČ (tax number) as a number. | | `icDph` | `string` | yes | IČ DPH (VAT id) as a string, including the country prefix. | | `court` | `string` | no | Commercial-register court note printed in the footer. | #### `CreditNoteCreateDto` | property | type | required | notes | | --- | --- | --- | --- | | `number` | `number` | no | Document number. Omit to let the server continue the account's series — call …/latestNumber to see where it currently stands. Stored as a numeric column, so it is returned as a string by the Postgres driver. | | `issueDate` | `string(date-time)` | no | — | | `sender` | `CompanyDetailsDto` | no | Supplier snapshot. Defaults to the account's company profile when omitted. | | `recipient` | `CompanyDetailsDto` | no | Customer snapshot. | | `fields` | `DocumentFieldDto[]` | no | Line items. An empty array is accepted and renders a document with no lines. | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | no | default "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | no | Language the PDF renders in.; default "sk" | | `useVat` | `boolean` | no | Whether VAT is applied. Set false for a non-VAT-payer and supply noVatReason.; default true | | `noVatReason` | `string` | no | Printed explanation when useVat is false. | | `rounding` | `string` | no | Rounding mode as a free-form token, as stored. null means no rounding. | | `note` | `string` | no | Free-text note printed on the document. | | `color` | `string` | no | Accent colour of the template, as a CSS hex string.; default "#FBF9FF" | | `style` | `"modern"|"simple"` | no | default "modern" | | `stamp` | `"none"|"default"` | no | Whether a stamp graphic is printed.; default "none" | | `poster` | `string` | no | Header image reference, as stored. Also settable by uploading a poster part in a multipart/form-data request. | | `status` | `"processing"|"issued"|"applied"|"refunded"|"cancelled"|"archived"` | no | Defaults to processing.; default "processing" | | `invoiceId` | `number` | no | Id of the invoice this credit note corrects. Optional — omit it to credit an invoice that does not live in Účtovisko and set invoiceNumber instead. | | `invoiceNumber` | `number` | no | Printed number of the credited invoice. | | `orderNumber` | `string | integer` | no | Purchase-order number as a string of 1–32 digits; leading zeros are preserved ("00005" stays "00005"). A JSON number is still accepted for backward compatibility and is stored as a string. | | `dueDate` | `string(date-time)` | no | — | | `deliveryDate` | `string(date-time)` | no | — | | `paymentMethod` | `"banktransfer"|"cash"|"card"|"crypto"|"paypal"|"custom"` | no | — | | `customPM` | `string` | no | — | | `deliveryMethod` | `"email"|"post"|"courier"|"personal"` | no | — | | `IBAN` | `string` | no | e.g. "SK3112000000198742637541" | | `BIC` | `string` | no | e.g. "GIBASKBX" | | `variableSymbol` | `string` | no | — | | `constantSymbol` | `string` | no | — | | `specificSymbol` | `string` | no | — | | `showQR` | `boolean` | no | default true | #### `CreditNoteDto` | property | type | required | notes | | --- | --- | --- | --- | | `id` | `number` | yes | Server-assigned id, unique per document type. | | `number` | `string` | yes | Document number. A decimal column, therefore a string on the wire, e.g. "20260042".; nullable | | `issueDate` | `string(date-time)` | yes | nullable | | `createdAt` | `string(date-time)` | yes | — | | `updatedAt` | `string(date-time)` | yes | nullable | | `createdBy` | `DocumentUserDto` | yes | Creator, reduced by formatUser(). null when the document was created by an API key rather than a signed-in user.; nullable | | `fields` | `DocumentFieldDto[]` | yes | Line items. Omitted from list responses — fetch the document by id to get them. | | `sender` | `CompanyDetailsDto` | yes | nullable | | `recipient` | `CompanyDetailsDto` | yes | nullable | | `totalPrice` | `string` | yes | Computed grand total including VAT. A decimal column, therefore a string on the wire. null on a document with no priced lines.; nullable | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | yes | nullable; e.g. "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | yes | e.g. "sk" | | `useVat` | `boolean` | yes | e.g. true | | `noVatReason` | `string` | yes | nullable | | `rounding` | `string` | yes | nullable | | `note` | `string` | yes | nullable | | `color` | `string` | yes | e.g. "#FBF9FF" | | `style` | `"modern"|"simple"` | yes | nullable; e.g. "modern" | | `stamp` | `"none"|"default"` | yes | nullable; e.g. "none" | | `poster` | `string` | yes | nullable | | `dueDate` | `string(date-time)` | yes | nullable | | `deliveryDate` | `string(date-time)` | yes | nullable | | `paymentMethod` | `"banktransfer"|"cash"|"card"|"crypto"|"paypal"|"custom"` | yes | nullable; e.g. "banktransfer" | | `customPM` | `string` | yes | Label used when paymentMethod is custom.; nullable | | `deliveryMethod` | `string` | yes | Delivery method. A free-form string is accepted beyond the listed values.; nullable | | `IBAN` | `string` | yes | nullable; e.g. "SK3112000000198742637541" | | `BIC` | `string` | yes | nullable; e.g. "GIBASKBX" | | `variableSymbol` | `string` | yes | nullable; e.g. "20260042" | | `constantSymbol` | `string` | yes | nullable | | `specificSymbol` | `string` | yes | nullable | | `qrCode` | `string` | yes | PAY-by-square payload string rendered as the payment QR code, not an image.; nullable | | `showQR` | `boolean` | yes | e.g. true | | `paypalUser` | `string` | yes | nullable; e.g. null | | `status` | `"processing"|"issued"|"applied"|"refunded"|"cancelled"|"archived"` | yes | nullable; e.g. "processing" | | `invoiceNumber` | `string` | yes | Number of the invoice being credited, as printed. A decimal column, therefore a string on the wire. Independent of invoiceId — a credit note can reference an invoice issued outside Účtovisko.; nullable | | `orderNumber` | `string` | yes | Purchase-order number, always returned as a string; leading zeros are preserved ("00005" stays "00005").; nullable | #### `CreditNoteListItemDto` | property | type | required | notes | | --- | --- | --- | --- | | `id` | `number` | yes | Server-assigned id, unique per document type. | | `number` | `string` | yes | Document number. A decimal column, therefore a string on the wire, e.g. "20260042".; nullable | | `issueDate` | `string(date-time)` | yes | nullable | | `createdAt` | `string(date-time)` | yes | — | | `updatedAt` | `string(date-time)` | yes | nullable | | `createdBy` | `DocumentUserDto` | yes | Creator, reduced by formatUser(). null when the document was created by an API key rather than a signed-in user.; nullable | | `sender` | `CompanyDetailsDto` | yes | nullable | | `recipient` | `CompanyDetailsDto` | yes | nullable | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | yes | nullable; e.g. "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | yes | e.g. "sk" | | `useVat` | `boolean` | yes | e.g. true | | `noVatReason` | `string` | yes | nullable | | `rounding` | `string` | yes | nullable | | `note` | `string` | yes | nullable | | `color` | `string` | yes | e.g. "#FBF9FF" | | `style` | `"modern"|"simple"` | yes | nullable; e.g. "modern" | | `stamp` | `"none"|"default"` | yes | nullable; e.g. "none" | | `poster` | `string` | yes | nullable | | `dueDate` | `string(date-time)` | yes | nullable | | `deliveryDate` | `string(date-time)` | yes | nullable | | `paymentMethod` | `"banktransfer"|"cash"|"card"|"crypto"|"paypal"|"custom"` | yes | nullable; e.g. "banktransfer" | | `customPM` | `string` | yes | Label used when paymentMethod is custom.; nullable | | `deliveryMethod` | `string` | yes | Delivery method. A free-form string is accepted beyond the listed values.; nullable | | `IBAN` | `string` | yes | nullable; e.g. "SK3112000000198742637541" | | `BIC` | `string` | yes | nullable; e.g. "GIBASKBX" | | `variableSymbol` | `string` | yes | nullable; e.g. "20260042" | | `constantSymbol` | `string` | yes | nullable | | `specificSymbol` | `string` | yes | nullable | | `qrCode` | `string` | yes | PAY-by-square payload string rendered as the payment QR code, not an image.; nullable | | `showQR` | `boolean` | yes | e.g. true | | `paypalUser` | `string` | yes | nullable; e.g. null | | `status` | `"processing"|"issued"|"applied"|"refunded"|"cancelled"|"archived"` | yes | nullable; e.g. "processing" | | `invoiceNumber` | `string` | yes | Number of the invoice being credited, as printed. A decimal column, therefore a string on the wire. Independent of invoiceId — a credit note can reference an invoice issued outside Účtovisko.; nullable | | `orderNumber` | `string` | yes | Purchase-order number, always returned as a string; leading zeros are preserved ("00005" stays "00005").; nullable | | `totalPrice` | `number` | yes | Precomputed grand total including VAT, as a JSON number (list rows only; the single-document endpoint returns the same value as a decimal string).; nullable | #### `CreditNoteUpdateDto` | property | type | required | notes | | --- | --- | --- | --- | | `number` | `number` | no | Document number. Omit to let the server continue the account's series — call …/latestNumber to see where it currently stands. Stored as a numeric column, so it is returned as a string by the Postgres driver. | | `issueDate` | `string(date-time)` | no | — | | `sender` | `CompanyDetailsDto` | no | Supplier snapshot. Defaults to the account's company profile when omitted. | | `recipient` | `CompanyDetailsDto` | no | Customer snapshot. | | `fields` | `DocumentFieldDto[]` | no | Line items. An empty array is accepted and renders a document with no lines. | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | no | default "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | no | Language the PDF renders in.; default "sk" | | `useVat` | `boolean` | no | Whether VAT is applied. Set false for a non-VAT-payer and supply noVatReason.; default true | | `noVatReason` | `string` | no | Printed explanation when useVat is false. | | `rounding` | `string` | no | Rounding mode as a free-form token, as stored. null means no rounding. | | `note` | `string` | no | Free-text note printed on the document. | | `color` | `string` | no | Accent colour of the template, as a CSS hex string.; default "#FBF9FF" | | `style` | `"modern"|"simple"` | no | default "modern" | | `stamp` | `"none"|"default"` | no | Whether a stamp graphic is printed.; default "none" | | `poster` | `string` | no | Header image reference, as stored. Also settable by uploading a poster part in a multipart/form-data request. | | `status` | `"processing"|"issued"|"applied"|"refunded"|"cancelled"|"archived"` | no | Defaults to processing.; default "processing" | | `invoiceId` | `number` | no | Id of the invoice this credit note corrects. Optional — omit it to credit an invoice that does not live in Účtovisko and set invoiceNumber instead. | | `invoiceNumber` | `number` | no | Printed number of the credited invoice. | | `orderNumber` | `string | integer` | no | Purchase-order number as a string of 1–32 digits; leading zeros are preserved ("00005" stays "00005"). A JSON number is still accepted for backward compatibility and is stored as a string. | | `dueDate` | `string(date-time)` | no | — | | `deliveryDate` | `string(date-time)` | no | — | | `paymentMethod` | `"banktransfer"|"cash"|"card"|"crypto"|"paypal"|"custom"` | no | — | | `customPM` | `string` | no | — | | `deliveryMethod` | `"email"|"post"|"courier"|"personal"` | no | — | | `IBAN` | `string` | no | e.g. "SK3112000000198742637541" | | `BIC` | `string` | no | e.g. "GIBASKBX" | | `variableSymbol` | `string` | no | — | | `constantSymbol` | `string` | no | — | | `specificSymbol` | `string` | no | — | | `showQR` | `boolean` | no | default true | #### `DocumentDeleteResultDto` | property | type | required | notes | | --- | --- | --- | --- | | `archived` | `number[]` | yes | Ids that were soft-archived (the default). They disappear from every list but the rows and their PDFs are retained. | | `removed` | `number[]` | yes | Ids that were hard-deleted. Non-empty only when ?purge=true was sent. | #### `DocumentFieldDto` | property | type | required | notes | | --- | --- | --- | --- | | `label` | `string` | yes | Item name as printed. | | `description` | `string` | yes | Longer description printed under the label. May be an empty string. | | `quantity` | `number` | yes | e.g. 8 | | `unitPrice` | `number` | yes | Unit price excluding VAT, in the document currency. | | `vat` | `number` | yes | VAT rate as a percentage (20 = 20 %). Use 0 with useVat: false. | | `unit` | `string` | yes | Unit of measure as printed. | | `stockItemId` | `string` | no | Links the line to a warehouse stock item. When set on a receipt/issue the server also records a stock movement. | #### `DocumentPaymentCreateDto` | property | type | required | notes | | --- | --- | --- | --- | | `amount` | `number` | yes | Positive, at most two decimal places, at most 1 000 000 000. | | `currency` | `string` | no | ISO-4217 code (three letters). Defaults to the document's currency. | | `paidAt` | `string(date-time)` | no | ISO-8601 date-time. Defaults to now. Not before 2000-01-01 and not more than a day in the future (400 invalid_body). | | `method` | `"banktransfer"|"cash"|"card"|"crypto"|"paypal"|"custom"` | no | — | | `note` | `string` | no | — | #### `DocumentPaymentDto` | property | type | required | notes | | --- | --- | --- | --- | | `id` | `string` | yes | Payment id: a decimal Snowflake string (it does not fit a JS number). | | `amount` | `number` | yes | Always positive, two decimals. | | `currency` | `string` | yes | ISO-4217 code. | | `paidAt` | `string(date-time)` | yes | — | | `method` | `"banktransfer"|"cash"|"card"|"crypto"|"paypal"|"custom"` | yes | nullable | | `source` | `"manual"|"openBanking"` | yes | manual = recorded through the app or the API; openBanking = matched from a bank transaction (its amount cannot be edited). | | `obTransactionId` | `string` | yes | Id of the bank transaction this payment came from; null for manual payments.; nullable | | `counterpartyName` | `string` | yes | nullable | | `counterpartyIban` | `string` | yes | nullable | | `note` | `string` | yes | nullable | | `createdBy` | `number` | yes | Internal user id of whoever recorded it; null for bank-matched payments.; nullable | | `createdAt` | `string(date-time)` | yes | — | #### `DocumentPaymentUpdateDto` | property | type | required | notes | | --- | --- | --- | --- | | `amount` | `number` | no | Positive, at most two decimal places. Refused with 409 conflict on a bank-confirmed payment (source: "openBanking"). | | `currency` | `string` | no | e.g. "EUR" | | `paidAt` | `string(date-time)` | no | — | | `method` | `"banktransfer"|"cash"|"card"|"crypto"|"paypal"|"custom"` | no | — | | `note` | `string` | no | — | #### `DocumentPaymentsResultDto` | property | type | required | notes | | --- | --- | --- | --- | | `documentType` | `"invoice"|"advanceInvoice"` | yes | — | | `documentId` | `number` | yes | e.g. 1042 | | `currency` | `string` | yes | e.g. "EUR" | | `due` | `number` | yes | Amount due on the document. | | `paid` | `number` | yes | Sum of the recorded payments. | | `remaining` | `number` | yes | max(0, due - paid). | | `status` | `string` | yes | The document's status after the change. A document's status is derived from its payments, so recording, editing or deleting one can move it (for example to paid). | | `payments` | `DocumentPaymentDto[]` | yes | — | #### `DocumentSendDto` | property | type | required | notes | | --- | --- | --- | --- | | `email` | `string` | yes | Recipient address. Required — a missing value answers 422 email_missing. The PDF is rendered server-side and attached. | #### `DocumentStatusUpdateDto` | property | type | required | notes | | --- | --- | --- | --- | | `status` | `string` | yes | New status. Accepted values are the status enum of the document type — see the status property of that type's response schema. | #### `DocumentSummaryCurrencyBucketDto` | property | type | required | notes | | --- | --- | --- | --- | | `currency` | `string` | yes | e.g. "EUR" | | `total` | `SummaryBucketTotalsDto` | yes | — | | `thisMonth` | `SummaryBucketTotalsDto` | yes | — | | `unpaid` | `SummaryBucketTotalsDto` | yes | null for types with no payment state.; nullable | | `overdue` | `SummaryOverdueTotalsDto` | yes | nullable | | `accepted` | `SummaryBucketTotalsDto` | yes | Price offers only.; nullable | | `processed` | `SummaryBucketTotalsDto` | yes | Uploaded invoices only.; nullable | | `vat` | `SummaryVatTotalsDto` | yes | Receipts only.; nullable | | `byStatus` | `object` | yes | Per stored status, upper-cased. Zero buckets are present. | | `extra` | `object` | no | UC-1328 — type-specific money tiles that have no generic slot. Travel fulfillments: unsettled, settled, prepayment, documentsMissing. Absent for other types. | #### `DocumentSummaryMonthDto` | property | type | required | notes | | --- | --- | --- | --- | | `from` | `string` | yes | e.g. "2026-10-01T00:00:00.000Z" | | `to` | `string` | yes | e.g. "2026-11-01T00:00:00.000Z" | #### `DocumentSummaryPeriodDto` | property | type | required | notes | | --- | --- | --- | --- | | `from` | `string` | yes | nullable; e.g. "2026-10-01T00:00:00.000Z" | | `to` | `string` | yes | nullable; e.g. "2026-11-01T00:00:00.000Z" | #### `DocumentUserDto` | property | type | required | notes | | --- | --- | --- | --- | | `id` | `number` | yes | e.g. 42 | | `publicId` | `string` | yes | Unguessable external id. Use this in URLs and links, never id.; nullable | | `username` | `string` | yes | Login identifier of the creator (an e-mail address). | | `settings` | `object` | yes | Display fields only. | #### `IncomeDocumentCreateDto` | property | type | required | notes | | --- | --- | --- | --- | | `number` | `number` | no | Document number. Omit to let the server continue the account's series — call …/latestNumber to see where it currently stands. Stored as a numeric column, so it is returned as a string by the Postgres driver. | | `issueDate` | `string(date-time)` | no | — | | `sender` | `CompanyDetailsDto` | no | Supplier snapshot. Defaults to the account's company profile when omitted. | | `recipient` | `CompanyDetailsDto` | no | Customer snapshot. | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | no | default "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | no | Language the PDF renders in.; default "sk" | | `useVat` | `boolean` | no | Whether VAT is applied. Set false for a non-VAT-payer and supply noVatReason.; default true | | `noVatReason` | `string` | no | Printed explanation when useVat is false. | | `rounding` | `string` | no | Rounding mode as a free-form token, as stored. null means no rounding. | | `color` | `string` | no | Accent colour of the template, as a CSS hex string.; default "#FBF9FF" | | `style` | `"modern"|"simple"` | no | default "modern" | | `stamp` | `"none"|"default"` | no | Whether a stamp graphic is printed.; default "none" | | `poster` | `string` | no | Header image reference, as stored. Also settable by uploading a poster part in a multipart/form-data request. | | `status` | `"draft"|"issued"|"cancelled"|"archived"` | no | Defaults to draft.; default "draft" | | `invoiceId` | `number` | no | Id of the invoice being settled. | | `invoiceNumber` | `number` | no | e.g. 20260041 | | `invoicePrice` | `number` | no | Total of the referenced invoice. Supply it when invoiceId is omitted; otherwise the server takes it from the invoice. | | `totalPrice` | `number` | no | Amount actually received. Omit to record a full settlement of invoicePrice. | | `paymentPurpose` | `string` | no | e.g. "Úhrada faktúry 20260041" | #### `IncomeDocumentDto` | property | type | required | notes | | --- | --- | --- | --- | | `id` | `number` | yes | Server-assigned id, unique per document type. | | `number` | `string` | yes | Document number. A decimal column, therefore a string on the wire, e.g. "20260042".; nullable | | `issueDate` | `string(date-time)` | yes | nullable | | `createdAt` | `string(date-time)` | yes | — | | `updatedAt` | `string(date-time)` | yes | nullable | | `createdBy` | `DocumentUserDto` | yes | Creator, reduced by formatUser(). null when the document was created by an API key rather than a signed-in user.; nullable | | `sender` | `CompanyDetailsDto` | yes | nullable | | `recipient` | `CompanyDetailsDto` | yes | nullable | | `totalPrice` | `string` | yes | Computed grand total including VAT. A decimal column, therefore a string on the wire. null on a document with no priced lines.; nullable | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | yes | nullable; e.g. "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | yes | e.g. "sk" | | `useVat` | `boolean` | yes | e.g. true | | `noVatReason` | `string` | yes | nullable | | `rounding` | `string` | yes | nullable | | `color` | `string` | yes | e.g. "#FBF9FF" | | `style` | `"modern"|"simple"` | yes | nullable; e.g. "modern" | | `stamp` | `"none"|"default"` | yes | nullable; e.g. "none" | | `poster` | `string` | yes | nullable | | `status` | `"draft"|"issued"|"cancelled"|"archived"` | yes | Defaults to draft on create.; nullable | | `invoiceId` | `number` | yes | Id of the invoice this payment settles, when it is an Účtovisko invoice. null when the referenced invoice was deleted (the FK is ON DELETE SET NULL) or never existed here.; nullable | | `invoiceNumber` | `string` | yes | Printed number of the invoice being settled. decimal column → string.; nullable | | `invoicePrice` | `string` | yes | Total of the referenced invoice, for the "paid X of Y" line. decimal column → string. Not recomputed — it is a snapshot taken when the document was issued.; nullable | | `paymentPurpose` | `string` | yes | Printed payment purpose.; nullable | #### `IncomeDocumentListItemDto` | property | type | required | notes | | --- | --- | --- | --- | | `id` | `number` | yes | Server-assigned id, unique per document type. | | `number` | `string` | yes | Document number. A decimal column, therefore a string on the wire, e.g. "20260042".; nullable | | `issueDate` | `string(date-time)` | yes | nullable | | `createdAt` | `string(date-time)` | yes | — | | `updatedAt` | `string(date-time)` | yes | nullable | | `createdBy` | `DocumentUserDto` | yes | Creator, reduced by formatUser(). null when the document was created by an API key rather than a signed-in user.; nullable | | `sender` | `CompanyDetailsDto` | yes | nullable | | `recipient` | `CompanyDetailsDto` | yes | nullable | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | yes | nullable; e.g. "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | yes | e.g. "sk" | | `useVat` | `boolean` | yes | e.g. true | | `noVatReason` | `string` | yes | nullable | | `rounding` | `string` | yes | nullable | | `color` | `string` | yes | e.g. "#FBF9FF" | | `style` | `"modern"|"simple"` | yes | nullable; e.g. "modern" | | `stamp` | `"none"|"default"` | yes | nullable; e.g. "none" | | `poster` | `string` | yes | nullable | | `status` | `"draft"|"issued"|"cancelled"|"archived"` | yes | Defaults to draft on create.; nullable | | `invoiceId` | `number` | yes | Id of the invoice this payment settles, when it is an Účtovisko invoice. null when the referenced invoice was deleted (the FK is ON DELETE SET NULL) or never existed here.; nullable | | `invoiceNumber` | `string` | yes | Printed number of the invoice being settled. decimal column → string.; nullable | | `invoicePrice` | `string` | yes | Total of the referenced invoice, for the "paid X of Y" line. decimal column → string. Not recomputed — it is a snapshot taken when the document was issued.; nullable | | `paymentPurpose` | `string` | yes | Printed payment purpose.; nullable | | `totalPrice` | `number` | yes | Precomputed grand total including VAT, as a JSON number (list rows only; the single-document endpoint returns the same value as a decimal string).; nullable | #### `IncomeDocumentUpdateDto` | property | type | required | notes | | --- | --- | --- | --- | | `number` | `number` | no | Document number. Omit to let the server continue the account's series — call …/latestNumber to see where it currently stands. Stored as a numeric column, so it is returned as a string by the Postgres driver. | | `issueDate` | `string(date-time)` | no | — | | `sender` | `CompanyDetailsDto` | no | Supplier snapshot. Defaults to the account's company profile when omitted. | | `recipient` | `CompanyDetailsDto` | no | Customer snapshot. | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | no | default "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | no | Language the PDF renders in.; default "sk" | | `useVat` | `boolean` | no | Whether VAT is applied. Set false for a non-VAT-payer and supply noVatReason.; default true | | `noVatReason` | `string` | no | Printed explanation when useVat is false. | | `rounding` | `string` | no | Rounding mode as a free-form token, as stored. null means no rounding. | | `color` | `string` | no | Accent colour of the template, as a CSS hex string.; default "#FBF9FF" | | `style` | `"modern"|"simple"` | no | default "modern" | | `stamp` | `"none"|"default"` | no | Whether a stamp graphic is printed.; default "none" | | `poster` | `string` | no | Header image reference, as stored. Also settable by uploading a poster part in a multipart/form-data request. | | `status` | `"draft"|"issued"|"cancelled"|"archived"` | no | Defaults to draft.; default "draft" | | `invoiceId` | `number` | no | Id of the invoice being settled. | | `invoiceNumber` | `number` | no | e.g. 20260041 | | `invoicePrice` | `number` | no | Total of the referenced invoice. Supply it when invoiceId is omitted; otherwise the server takes it from the invoice. | | `totalPrice` | `number` | no | Amount actually received. Omit to record a full settlement of invoicePrice. | | `paymentPurpose` | `string` | no | e.g. "Úhrada faktúry 20260041" | #### `InvoiceCreateDto` | property | type | required | notes | | --- | --- | --- | --- | | `number` | `number` | no | Document number. Omit to let the server continue the account's series — call …/latestNumber to see where it currently stands. Stored as a numeric column, so it is returned as a string by the Postgres driver. | | `issueDate` | `string(date-time)` | no | — | | `sender` | `CompanyDetailsDto` | no | Supplier snapshot. Defaults to the account's company profile when omitted. | | `recipient` | `CompanyDetailsDto` | no | Customer snapshot. | | `fields` | `DocumentFieldDto[]` | no | Line items. An empty array is accepted and renders a document with no lines. | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | no | default "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | no | Language the PDF renders in.; default "sk" | | `useVat` | `boolean` | no | Whether VAT is applied. Set false for a non-VAT-payer and supply noVatReason.; default true | | `noVatReason` | `string` | no | Printed explanation when useVat is false. | | `rounding` | `string` | no | Rounding mode as a free-form token, as stored. null means no rounding. | | `note` | `string` | no | Free-text note printed on the document. | | `color` | `string` | no | Accent colour of the template, as a CSS hex string.; default "#FBF9FF" | | `style` | `"modern"|"simple"` | no | default "modern" | | `stamp` | `"none"|"default"` | no | Whether a stamp graphic is printed.; default "none" | | `poster` | `string` | no | Header image reference, as stored. Also settable by uploading a poster part in a multipart/form-data request. | | `status` | `"paid"|"concept"|"processing"|"archived"|"overdue"|"cancelled"` | no | Defaults to processing when omitted.; default "processing" | | `dueDate` | `string(date-time)` | no | — | | `deliveryDate` | `string(date-time)` | no | — | | `orderNumber` | `string | integer` | no | Purchase-order number as a string of 1–10 digits; leading zeros are preserved ("00005" stays "00005"). A JSON number is still accepted for backward compatibility and is stored as a string. | | `paymentMethod` | `"banktransfer"|"cash"|"card"|"crypto"|"paypal"|"custom"` | no | — | | `customPM` | `string` | no | Required when paymentMethod is custom. | | `deliveryMethod` | `"email"|"post"|"courier"|"personal"` | no | One of the listed values, or any other string. | | `IBAN` | `string` | no | e.g. "SK3112000000198742637541" | | `BIC` | `string` | no | e.g. "GIBASKBX" | | `variableSymbol` | `string` | no | Payment reference. Left unset the server does not invent one — supply it if your bank reconciliation depends on it. | | `constantSymbol` | `string` | no | — | | `specificSymbol` | `string` | no | — | | `showQR` | `boolean` | no | Whether to render the PAY-by-square QR code.; default true | | `deposit` | `number` | no | Deposit already received, subtracted from the amount due. | | `discount` | `number` | no | Whole-document discount in percent.; default 0 | | `nonPay` | `boolean` | no | Print as a non-payment record.; default false | | `peppolAutoSend` | `boolean` | no | Queue the invoice for eFaktúra (Peppol) delivery on issue.; default false | #### `InvoiceDto` | property | type | required | notes | | --- | --- | --- | --- | | `id` | `number` | yes | Server-assigned id, unique per document type. | | `number` | `string` | yes | Document number. A decimal column, therefore a string on the wire, e.g. "20260042".; nullable | | `issueDate` | `string(date-time)` | yes | nullable | | `createdAt` | `string(date-time)` | yes | — | | `updatedAt` | `string(date-time)` | yes | nullable | | `createdBy` | `DocumentUserDto` | yes | Creator, reduced by formatUser(). null when the document was created by an API key rather than a signed-in user.; nullable | | `fields` | `DocumentFieldDto[]` | yes | Line items. Omitted from list responses — fetch the document by id to get them. | | `sender` | `CompanyDetailsDto` | yes | nullable | | `recipient` | `CompanyDetailsDto` | yes | nullable | | `totalPrice` | `string` | yes | Computed grand total including VAT. A decimal column, therefore a string on the wire. null on a document with no priced lines.; nullable | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | yes | nullable; e.g. "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | yes | e.g. "sk" | | `useVat` | `boolean` | yes | e.g. true | | `noVatReason` | `string` | yes | nullable | | `rounding` | `string` | yes | nullable | | `note` | `string` | yes | nullable | | `color` | `string` | yes | e.g. "#FBF9FF" | | `style` | `"modern"|"simple"` | yes | nullable; e.g. "modern" | | `stamp` | `"none"|"default"` | yes | nullable; e.g. "none" | | `poster` | `string` | yes | nullable | | `dueDate` | `string(date-time)` | yes | nullable | | `deliveryDate` | `string(date-time)` | yes | nullable | | `paymentMethod` | `"banktransfer"|"cash"|"card"|"crypto"|"paypal"|"custom"` | yes | nullable; e.g. "banktransfer" | | `customPM` | `string` | yes | Label used when paymentMethod is custom.; nullable | | `deliveryMethod` | `string` | yes | Delivery method. A free-form string is accepted beyond the listed values.; nullable | | `IBAN` | `string` | yes | nullable; e.g. "SK3112000000198742637541" | | `BIC` | `string` | yes | nullable; e.g. "GIBASKBX" | | `variableSymbol` | `string` | yes | nullable; e.g. "20260042" | | `constantSymbol` | `string` | yes | nullable | | `specificSymbol` | `string` | yes | nullable | | `qrCode` | `string` | yes | PAY-by-square payload string rendered as the payment QR code, not an image.; nullable | | `showQR` | `boolean` | yes | e.g. true | | `paypalUser` | `string` | yes | nullable; e.g. null | | `status` | `"paid"|"concept"|"processing"|"archived"|"overdue"|"cancelled"` | yes | Lifecycle status. processing is the default on create; overdue is derived from dueDate by a scheduled job, so do not compute it client-side.; nullable | | `orderNumber` | `string` | yes | Purchase-order number, always returned as a string; leading zeros are preserved ("00005" stays "00005").; nullable | | `deposit` | `number` | yes | Deposit already paid, subtracted from the amount due. Integer minor-unit-free.; nullable | | `discount` | `number` | yes | Whole-document discount in percent. | | `nonPay` | `boolean` | yes | When true the document prints as a non-payment record (no amount due). | | `peppolStatus` | `"NOT_SENT"|"QUEUED"|"SENT"|"DELIVERED"|"FAILED"` | yes | State of the outbound e-invoice (Peppol / eFaktúra) delivery. NOT_SENT until POST …/{id}/peppol/send is called or auto-send fires. | | `peppolAutoSend` | `boolean` | yes | Whether this invoice is queued for eFaktúra delivery automatically on issue. | | `peppolSentAt` | `string(date-time)` | yes | nullable | | `peppolDeliveredAt` | `string(date-time)` | yes | nullable | | `peppolFailedAt` | `string(date-time)` | yes | nullable | #### `InvoiceImportResultDto` | property | type | required | notes | | --- | --- | --- | --- | | `invoices` | `InvoiceDto[]` | yes | Invoices created from the uploaded files. | | `advanceInvoices` | `object[]` | no | Advance invoices recognised in the same upload. Shape matches the advance-invoice schema. | | `recommendCreditNotes` | `object[]` | no | Invoices the importer believes should get a credit note (a negative total, or a duplicate of an already-issued number). Advisory only — nothing is created. | #### `InvoiceListItemDto` | property | type | required | notes | | --- | --- | --- | --- | | `id` | `number` | yes | Server-assigned id, unique per document type. | | `number` | `string` | yes | Document number. A decimal column, therefore a string on the wire, e.g. "20260042".; nullable | | `issueDate` | `string(date-time)` | yes | nullable | | `createdAt` | `string(date-time)` | yes | — | | `updatedAt` | `string(date-time)` | yes | nullable | | `createdBy` | `DocumentUserDto` | yes | Creator, reduced by formatUser(). null when the document was created by an API key rather than a signed-in user.; nullable | | `sender` | `CompanyDetailsDto` | yes | nullable | | `recipient` | `CompanyDetailsDto` | yes | nullable | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | yes | nullable; e.g. "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | yes | e.g. "sk" | | `useVat` | `boolean` | yes | e.g. true | | `noVatReason` | `string` | yes | nullable | | `rounding` | `string` | yes | nullable | | `note` | `string` | yes | nullable | | `color` | `string` | yes | e.g. "#FBF9FF" | | `style` | `"modern"|"simple"` | yes | nullable; e.g. "modern" | | `stamp` | `"none"|"default"` | yes | nullable; e.g. "none" | | `poster` | `string` | yes | nullable | | `dueDate` | `string(date-time)` | yes | nullable | | `deliveryDate` | `string(date-time)` | yes | nullable | | `paymentMethod` | `"banktransfer"|"cash"|"card"|"crypto"|"paypal"|"custom"` | yes | nullable; e.g. "banktransfer" | | `customPM` | `string` | yes | Label used when paymentMethod is custom.; nullable | | `deliveryMethod` | `string` | yes | Delivery method. A free-form string is accepted beyond the listed values.; nullable | | `IBAN` | `string` | yes | nullable; e.g. "SK3112000000198742637541" | | `BIC` | `string` | yes | nullable; e.g. "GIBASKBX" | | `variableSymbol` | `string` | yes | nullable; e.g. "20260042" | | `constantSymbol` | `string` | yes | nullable | | `specificSymbol` | `string` | yes | nullable | | `qrCode` | `string` | yes | PAY-by-square payload string rendered as the payment QR code, not an image.; nullable | | `showQR` | `boolean` | yes | e.g. true | | `paypalUser` | `string` | yes | nullable; e.g. null | | `status` | `"paid"|"concept"|"processing"|"archived"|"overdue"|"cancelled"` | yes | Lifecycle status. processing is the default on create; overdue is derived from dueDate by a scheduled job, so do not compute it client-side.; nullable | | `orderNumber` | `string` | yes | Purchase-order number, always returned as a string; leading zeros are preserved ("00005" stays "00005").; nullable | | `deposit` | `number` | yes | Deposit already paid, subtracted from the amount due. Integer minor-unit-free.; nullable | | `discount` | `number` | yes | Whole-document discount in percent. | | `nonPay` | `boolean` | yes | When true the document prints as a non-payment record (no amount due). | | `peppolStatus` | `"NOT_SENT"|"QUEUED"|"SENT"|"DELIVERED"|"FAILED"` | yes | State of the outbound e-invoice (Peppol / eFaktúra) delivery. NOT_SENT until POST …/{id}/peppol/send is called or auto-send fires. | | `peppolAutoSend` | `boolean` | yes | Whether this invoice is queued for eFaktúra delivery automatically on issue. | | `peppolSentAt` | `string(date-time)` | yes | nullable | | `peppolDeliveredAt` | `string(date-time)` | yes | nullable | | `peppolFailedAt` | `string(date-time)` | yes | nullable | | `totalPrice` | `number` | yes | Precomputed grand total including VAT, as a JSON number (list rows only; the single-document endpoint returns the same value as a decimal string).; nullable | | `remaining` | `number` | yes | Unpaid amount: max(0, amount due - recorded payments). Same value as on the single invoice. Sortable and filterable as remaining. | | `isOverdue` | `boolean` | yes | True when the invoice is payable, has a positive remaining and its dueDate is before today (Europe/Bratislava calendar day). An invoice without a due date is never overdue. | | `correctedByCreditNote` | `object` | yes | Credit notes issued against this invoice: how many and their summed amount. null when there are none.; nullable | #### `InvoiceSendResultDto` | property | type | required | notes | | --- | --- | --- | --- | | `sent` | `boolean` | yes | e.g. true | | `email` | `string` | yes | e.g. "odberatel@example.sk" | #### `InvoiceShortListItemDto` | property | type | required | notes | | --- | --- | --- | --- | | `id` | `number` | yes | e.g. 1042 | | `number` | `string` | yes | nullable; e.g. "20260042" | | `sender` | `string` | yes | Supplier name only, not the full company block.; nullable | | `recipient` | `string` | yes | Customer name only.; nullable | | `issueDate` | `string(date-time)` | yes | nullable | #### `InvoiceSummaryDto` | property | type | required | notes | | --- | --- | --- | --- | | `currencies` | `DocumentSummaryCurrencyBucketDto[]` | yes | One bucket per currency used in the period. Amounts are NEVER summed across buckets — pick one or render one strip per currency. | | `statusCounts` | `object` | yes | Currency-agnostic row counts keyed by upper-cased status, plus ALL. | | `period` | `DocumentSummaryPeriodDto` | yes | — | | `month` | `DocumentSummaryMonthDto` | yes | — | | `truncated` | `boolean` | yes | True when the row ceiling was reached, so the figures are partial and must be labelled as such in the UI. | | `generatedAt` | `string` | yes | e.g. "2026-10-08T09:30:00.000Z" | | `tabCounts` | `object` | no | Invoices per derived tab (all, concept, unpaid, overdue, paid, cancelled, archived). Unlike the rest of the summary it ignores the archived filter and counts archived invoices too. | | `overdueAllTime` | `SummaryOverdueAllTimeDto` | no | Overdue to date WITHOUT the period filter (invoices and advance invoices). Present only when from/to is set; count is >= the overdue figure of the period. | | `metrics` | `object` | no | UC-1328 — currency-agnostic figures (counts, kilometres) for types whose KPI tiles are not money. Same period/archived scope as the strip. Travel only; keys per type in list-summary-contract.md "Travel". Absent for document types. | #### `InvoiceUpdateDto` | property | type | required | notes | | --- | --- | --- | --- | | `number` | `number` | no | Document number. Omit to let the server continue the account's series — call …/latestNumber to see where it currently stands. Stored as a numeric column, so it is returned as a string by the Postgres driver. | | `issueDate` | `string(date-time)` | no | — | | `sender` | `CompanyDetailsDto` | no | Supplier snapshot. Defaults to the account's company profile when omitted. | | `recipient` | `CompanyDetailsDto` | no | Customer snapshot. | | `fields` | `DocumentFieldDto[]` | no | Line items. An empty array is accepted and renders a document with no lines. | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | no | default "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | no | Language the PDF renders in.; default "sk" | | `useVat` | `boolean` | no | Whether VAT is applied. Set false for a non-VAT-payer and supply noVatReason.; default true | | `noVatReason` | `string` | no | Printed explanation when useVat is false. | | `rounding` | `string` | no | Rounding mode as a free-form token, as stored. null means no rounding. | | `note` | `string` | no | Free-text note printed on the document. | | `color` | `string` | no | Accent colour of the template, as a CSS hex string.; default "#FBF9FF" | | `style` | `"modern"|"simple"` | no | default "modern" | | `stamp` | `"none"|"default"` | no | Whether a stamp graphic is printed.; default "none" | | `poster` | `string` | no | Header image reference, as stored. Also settable by uploading a poster part in a multipart/form-data request. | | `status` | `"paid"|"concept"|"processing"|"archived"|"overdue"|"cancelled"` | no | Defaults to processing when omitted.; default "processing" | | `dueDate` | `string(date-time)` | no | — | | `deliveryDate` | `string(date-time)` | no | — | | `orderNumber` | `string | integer` | no | Purchase-order number as a string of 1–10 digits; leading zeros are preserved ("00005" stays "00005"). A JSON number is still accepted for backward compatibility and is stored as a string. | | `paymentMethod` | `"banktransfer"|"cash"|"card"|"crypto"|"paypal"|"custom"` | no | — | | `customPM` | `string` | no | Required when paymentMethod is custom. | | `deliveryMethod` | `"email"|"post"|"courier"|"personal"` | no | One of the listed values, or any other string. | | `IBAN` | `string` | no | e.g. "SK3112000000198742637541" | | `BIC` | `string` | no | e.g. "GIBASKBX" | | `variableSymbol` | `string` | no | Payment reference. Left unset the server does not invent one — supply it if your bank reconciliation depends on it. | | `constantSymbol` | `string` | no | — | | `specificSymbol` | `string` | no | — | | `showQR` | `boolean` | no | Whether to render the PAY-by-square QR code.; default true | | `deposit` | `number` | no | Deposit already received, subtracted from the amount due. | | `discount` | `number` | no | Whole-document discount in percent.; default 0 | | `nonPay` | `boolean` | no | Print as a non-payment record.; default false | | `peppolAutoSend` | `boolean` | no | Queue the invoice for eFaktúra (Peppol) delivery on issue.; default false | #### `PriceOfferCreateDto` | property | type | required | notes | | --- | --- | --- | --- | | `number` | `number` | no | Document number. Omit to let the server continue the account's series — call …/latestNumber to see where it currently stands. Stored as a numeric column, so it is returned as a string by the Postgres driver. | | `issueDate` | `string(date-time)` | no | — | | `sender` | `CompanyDetailsDto` | no | Supplier snapshot. Defaults to the account's company profile when omitted. | | `recipient` | `CompanyDetailsDto` | no | Customer snapshot. | | `fields` | `DocumentFieldDto[]` | no | Line items. An empty array is accepted and renders a document with no lines. | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | no | default "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | no | Language the PDF renders in.; default "sk" | | `useVat` | `boolean` | no | Whether VAT is applied. Set false for a non-VAT-payer and supply noVatReason.; default true | | `noVatReason` | `string` | no | Printed explanation when useVat is false. | | `rounding` | `string` | no | Rounding mode as a free-form token, as stored. null means no rounding. | | `note` | `string` | no | Free-text note printed on the document. | | `color` | `string` | no | Accent colour of the template, as a CSS hex string.; default "#FBF9FF" | | `style` | `"modern"|"simple"` | no | default "modern" | | `stamp` | `"none"|"default"` | no | Whether a stamp graphic is printed.; default "none" | | `poster` | `string` | no | Header image reference, as stored. Also settable by uploading a poster part in a multipart/form-data request. | | `status` | `"draft"|"sent"|"accepted"|"rejected"|"expired"|"archived"` | no | Defaults to sent when omitted.; default "sent" | | `validityDate` | `string(date-time)` | no | — | | `discount` | `number` | no | default 0 | #### `PriceOfferDto` | property | type | required | notes | | --- | --- | --- | --- | | `id` | `number` | yes | Server-assigned id, unique per document type. | | `number` | `string` | yes | Document number. A decimal column, therefore a string on the wire, e.g. "20260042".; nullable | | `issueDate` | `string(date-time)` | yes | nullable | | `createdAt` | `string(date-time)` | yes | — | | `updatedAt` | `string(date-time)` | yes | nullable | | `createdBy` | `DocumentUserDto` | yes | Creator, reduced by formatUser(). null when the document was created by an API key rather than a signed-in user.; nullable | | `fields` | `DocumentFieldDto[]` | yes | Line items. Omitted from list responses — fetch the document by id to get them. | | `sender` | `CompanyDetailsDto` | yes | nullable | | `recipient` | `CompanyDetailsDto` | yes | nullable | | `totalPrice` | `string` | yes | Computed grand total including VAT. A decimal column, therefore a string on the wire. null on a document with no priced lines.; nullable | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | yes | nullable; e.g. "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | yes | e.g. "sk" | | `useVat` | `boolean` | yes | e.g. true | | `noVatReason` | `string` | yes | nullable | | `rounding` | `string` | yes | nullable | | `note` | `string` | yes | nullable | | `color` | `string` | yes | e.g. "#FBF9FF" | | `style` | `"modern"|"simple"` | yes | nullable; e.g. "modern" | | `stamp` | `"none"|"default"` | yes | nullable; e.g. "none" | | `poster` | `string` | yes | nullable | | `status` | `"draft"|"sent"|"accepted"|"rejected"|"expired"|"archived"` | yes | Defaults to sent on create — not draft. expired is derived from validityDate.; nullable | | `validityDate` | `string(date-time)` | yes | Last day the offer is binding. There is no dueDate on a price offer.; nullable | | `discount` | `number` | yes | Whole-document discount in percent. | #### `PriceOfferListItemDto` | property | type | required | notes | | --- | --- | --- | --- | | `id` | `number` | yes | Server-assigned id, unique per document type. | | `number` | `string` | yes | Document number. A decimal column, therefore a string on the wire, e.g. "20260042".; nullable | | `issueDate` | `string(date-time)` | yes | nullable | | `createdAt` | `string(date-time)` | yes | — | | `updatedAt` | `string(date-time)` | yes | nullable | | `createdBy` | `DocumentUserDto` | yes | Creator, reduced by formatUser(). null when the document was created by an API key rather than a signed-in user.; nullable | | `sender` | `CompanyDetailsDto` | yes | nullable | | `recipient` | `CompanyDetailsDto` | yes | nullable | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | yes | nullable; e.g. "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | yes | e.g. "sk" | | `useVat` | `boolean` | yes | e.g. true | | `noVatReason` | `string` | yes | nullable | | `rounding` | `string` | yes | nullable | | `note` | `string` | yes | nullable | | `color` | `string` | yes | e.g. "#FBF9FF" | | `style` | `"modern"|"simple"` | yes | nullable; e.g. "modern" | | `stamp` | `"none"|"default"` | yes | nullable; e.g. "none" | | `poster` | `string` | yes | nullable | | `status` | `"draft"|"sent"|"accepted"|"rejected"|"expired"|"archived"` | yes | Defaults to sent on create — not draft. expired is derived from validityDate.; nullable | | `validityDate` | `string(date-time)` | yes | Last day the offer is binding. There is no dueDate on a price offer.; nullable | | `discount` | `number` | yes | Whole-document discount in percent. | | `totalPrice` | `number` | yes | Precomputed grand total including VAT, as a JSON number (list rows only; the single-document endpoint returns the same value as a decimal string).; nullable | #### `PriceOfferUpdateDto` | property | type | required | notes | | --- | --- | --- | --- | | `number` | `number` | no | Document number. Omit to let the server continue the account's series — call …/latestNumber to see where it currently stands. Stored as a numeric column, so it is returned as a string by the Postgres driver. | | `issueDate` | `string(date-time)` | no | — | | `sender` | `CompanyDetailsDto` | no | Supplier snapshot. Defaults to the account's company profile when omitted. | | `recipient` | `CompanyDetailsDto` | no | Customer snapshot. | | `fields` | `DocumentFieldDto[]` | no | Line items. An empty array is accepted and renders a document with no lines. | | `currency` | `"EUR"|"CZK"|"USD"|"GBP"|"CHF"|"PLN"|"HUF"|"UAH"|"RON"` | no | default "EUR" | | `language` | `"sk"|"cz"|"en"|"de"` | no | Language the PDF renders in.; default "sk" | | `useVat` | `boolean` | no | Whether VAT is applied. Set false for a non-VAT-payer and supply noVatReason.; default true | | `noVatReason` | `string` | no | Printed explanation when useVat is false. | | `rounding` | `string` | no | Rounding mode as a free-form token, as stored. null means no rounding. | | `note` | `string` | no | Free-text note printed on the document. | | `color` | `string` | no | Accent colour of the template, as a CSS hex string.; default "#FBF9FF" | | `style` | `"modern"|"simple"` | no | default "modern" | | `stamp` | `"none"|"default"` | no | Whether a stamp graphic is printed.; default "none" | | `poster` | `string` | no | Header image reference, as stored. Also settable by uploading a poster part in a multipart/form-data request. | | `status` | `"draft"|"sent"|"accepted"|"rejected"|"expired"|"archived"` | no | Defaults to sent when omitted.; default "sent" | | `validityDate` | `string(date-time)` | no | — | | `discount` | `number` | no | default 0 | #### `ReceiptAttachmentDto` | property | type | required | notes | | --- | --- | --- | --- | | `id` | `number` | yes | e.g. 77 | | `filename` | `string` | yes | e.g. "IMG_4821.jpg" | | `url` | `string` | yes | Fetchable URL of the attachment. | | `mimetype` | `string` | yes | e.g. "image/jpeg" | | `size` | `number` | yes | Size in bytes.; nullable | | `order` | `number` | yes | Display order, ascending. | | `createdAt` | `string(date-time)` | yes | — | #### `ReceiptDeleteResultDto` | property | type | required | notes | | --- | --- | --- | --- | | `id` | `number` | yes | e.g. 4821 | | `purged` | `boolean` | no | Present and true when the row was hard-deleted (?purge=true). | | `archived` | `boolean` | no | Present and true when the row was soft-archived (the default). | #### `ReceiptDto` | property | type | required | notes | | --- | --- | --- | --- | | `id` | `number` | yes | e.g. 4821 | | `receiptId` | `string` | yes | eKasa receipt identifier (O-…) — the value printed on the receipt, not the id. Use GET …/receipt/find/{receiptId} to look one up in eKasa before importing it. | | `receiptNumber` | `number` | yes | Sequence number within the cash register. | | `type` | `string` | yes | eKasa receipt type as reported by the register. | | `cashRegisterCode` | `string` | yes | e.g. "88812345678901234567" | | `ico` | `string` | yes | Issuer IČO. | | `dic` | `string` | yes | Issuer DIČ. | | `icDph` | `string` | yes | Issuer IČ DPH. | | `issueDate` | `string(date-time)` | yes | Moment the receipt was issued at the register.; nullable | | `createDate` | `string(date-time)` | yes | Moment eKasa recorded it. Usually equal to issueDate.; nullable | | `createdAt` | `string(date-time)` | yes | Moment the row was stored in Účtovisko. | | `source` | `"ekasa"|"manual"` | no | UC-829 — where the data came from, derived (not stored): ekasa when the row carries both the eKasa identifier and the register control code (receiptId + okp), manual otherwise. Read-only; writing it is ignored. Present on the READ endpoints (GET …/receipt and GET …/receipt/{id}) — the create/update acknowledgements and the webhook payloads keep their previous shape. | | `verified` | `boolean` | no | UC-829 — true only when the fiscal data is confirmed by eKasa (source = ekasa) and the receipt is not a paragón. Derived, read-only, same endpoints as source. | | `totalPrice` | `number` | yes | Total including VAT. A float column → a JSON number, not a string. | | `taxBaseBasic` | `number` | yes | nullable; e.g. 9.98 | | `taxBaseReduced` | `number` | yes | nullable; e.g. null | | `vatAmountBasic` | `number` | yes | nullable; e.g. 2 | | `vatAmountReduced` | `number` | yes | nullable; e.g. null | | `vatRateBasic` | `number` | yes | nullable; e.g. 20 | | `vatRateReduced` | `number` | yes | nullable; e.g. 10 | | `freeTaxAmount` | `number` | yes | Amount outside the VAT system.; nullable | | `exemption` | `boolean` | yes | Whether the receipt is VAT-exempt. | | `okp` | `string` | yes | eKasa OKP (unique receipt identifier code). A fiscal integrity code printed on the receipt — public, not a credential.; nullable | | `pkp` | `string` | yes | eKasa PKP (taxpayer signature code), printed on offline receipts.; nullable | | `paragon` | `boolean` | yes | True for a hand-written paper receipt entered without eKasa data. | | `paragonNumber` | `string` | yes | nullable | | `invoiceNumber` | `string` | yes | Related invoice number when the receipt settles one.; nullable | | `transactionId` | `string` | yes | Register transaction id, when the register supplied one.; nullable | | `customerId` | `string` | yes | nullable | | `note` | `string` | yes | User note.; nullable | | `items` | `ReceiptItemDto[]` | yes | — | | `organization` | `ReceiptOrganizationDto` | yes | — | | `unit` | `ReceiptUnitDto` | yes | — | | `attachments` | `ReceiptAttachmentDto[]` | yes | Always loaded (the relation is eager). | | `tag` | `object` | yes | Category tag, or null.; nullable | #### `ReceiptItemDto` | property | type | required | notes | | --- | --- | --- | --- | | `name` | `string` | yes | e.g. "Káva 250 g" | | `itemType` | `string` | yes | eKasa item classification, as delivered by the register. | | `quantity` | `number` | yes | e.g. 2 | | `vatRate` | `number` | yes | VAT rate as a percentage. | | `price` | `number` | yes | Line price including VAT, as printed on the receipt. | | `sellerId` | `string` | no | nullable | | `sellerIdType` | `string` | no | nullable | | `specialRegulation` | `string` | no | nullable | | `voucherNumber` | `string` | no | nullable | #### `ReceiptLookupResultDto` | property | type | required | notes | | --- | --- | --- | --- | | `receipt` | `object` | yes | Receipt as returned by the eKasa service, passed through unchanged. Shape is defined by Finančná správa, not by Účtovisko, so it is documented as a free-form object. | | `isDuplicate` | `boolean` | yes | True when this receiptId is already stored in the account. | | `status` | `"found"|"duplicate"|"not_found"|"ekasa_unavailable"|"too_old"` | yes | UC-829 — normalized outcome of the lookup. duplicate outranks found: the receipt is in eKasa but this account already stored it. The three failure values are reported on the error envelope instead ({ s: "error", d: "", status: "" }), so one client error path can branch on them: not_found → receipt_not_found_in_ekasa, too_old → receipt_too_old_for_ekasa, ekasa_unavailable → ekasa_unavailable. | | `suggestedCategoryId` | `string` | yes | Category (receipt tag) id to preselect, matched from the issuer by the account‘s auto-pair rules (autoPairOrganizations, IČO or normalized name). null when no rule matches.; nullable | | `duplicates` | `object[]` | yes | Up to three receipts of THIS account that already carry the same receiptId, newest first. Empty unless isDuplicate is true. | #### `ReceiptOrganizationDto` | property | type | required | notes | | --- | --- | --- | --- | | `name` | `string` | yes | e.g. "Predajňa s. r. o." | | `ico` | `string` | yes | e.g. "54321678" | | `dic` | `string` | yes | e.g. "2120123456" | | `icDph` | `string` | yes | nullable; e.g. "SK2120123456" | | `municipality` | `string` | yes | e.g. "Košice" | | `streetName` | `string` | yes | e.g. "Hlavná" | | `buildingNumber` | `string` | yes | e.g. "12" | | `propertyRegistrationNumber` | `string` | yes | nullable | | `postalCode` | `string` | yes | e.g. "04001" | | `country` | `string` | yes | e.g. "SK" | | `vatPayer` | `boolean` | yes | VAT-payer flag as reported by eKasa. | | `manualVatPayer` | `boolean` | yes | Set when a user overrode the reported flag by hand. The override, not eKasa, decides how the receipt is booked. | #### `ReceiptStatsDto` | property | type | required | notes | | --- | --- | --- | --- | | `monthlyExpenses` | `number` | yes | Sum of receipt totals in the current calendar month. | | `monthOnMonthChange` | `number` | yes | Change against the previous month, as a percentage. May be negative. | | `totalReceipts` | `number` | yes | Number of non-archived receipts in the account. | | `vatToDeduct` | `number` | yes | Deductible VAT total over the same period. | #### `ReceiptUnitDto` | property | type | required | notes | | --- | --- | --- | --- | | `cashRegisterCode` | `string` | yes | eKasa cash-register code of the issuing unit. | | `name` | `string` | yes | nullable | | `unitType` | `string` | yes | nullable | | `municipality` | `string` | yes | e.g. "Košice" | | `streetName` | `string` | yes | e.g. "Hlavná" | | `buildingNumber` | `string` | yes | e.g. "12" | | `propertyRegistrationNumber` | `string` | yes | nullable | | `postalCode` | `string` | yes | e.g. "04001" | | `country` | `string` | yes | e.g. "SK" | #### `SummaryBucketTotalsDto` | property | type | required | notes | | --- | --- | --- | --- | | `amount` | `number` | yes | Rounded to 2 decimals. | | `count` | `number` | yes | e.g. 5 | #### `SummaryOverdueAllTimeDto` | property | type | required | notes | | --- | --- | --- | --- | | `count` | `number` | yes | Overdue rows across all currencies (counts may be added up). | | `byCurrency` | `SummaryOverdueCurrencyDto[]` | yes | Money per currency — never summed across entries. | #### `SummaryOverdueCurrencyDto` | property | type | required | notes | | --- | --- | --- | --- | | `currency` | `string` | yes | e.g. "EUR" | | `count` | `number` | yes | e.g. 2 | | `amount` | `number` | yes | Invoices: outstanding balance (what is still owed). Advance invoices: document total. | #### `SummaryOverdueTotalsDto` | property | type | required | notes | | --- | --- | --- | --- | | `amount` | `number` | yes | Rounded to 2 decimals. | | `count` | `number` | yes | e.g. 5 | | `maxDaysOverdue` | `number` | yes | Largest whole-day age among the overdue rows. 0 when none. | #### `SummaryVatTotalsDto` | property | type | required | notes | | --- | --- | --- | --- | | `basic` | `number` | yes | e.g. 38.99 | | `reduced` | `number` | yes | e.g. 0 | | `total` | `number` | yes | e.g. 38.99 |