{"openapi":"3.1.0","jsonSchemaDialect":"https://spec.openapis.org/oas/3.1/dialect/base","info":{"title":"vporiadku API","version":"1.3.0","summary":"Invoices, payments, clients and catalogue of a vporiadku workspace.","description":"The vporiadku public REST API: documents and their lifecycle, payments, clients, the item catalogue, expenses, received e-invoices, recurring schedules, issuer profiles, bank accounts and webhook endpoints of one workspace. Human-readable guide: https://vporiadku.sk/sk/vyvojari\n\nAuthentication: two credentials, held to the same scopes. An **API key** belongs to one workspace: send it as `Authorization: Bearer fak_…` or `X-API-Key: fak_…`. Keys are created in the app under Settings → API by the workspace owner or an admin, and need the Firma add-on module. The full key is shown once; only its SHA-256 is stored. A **partner app** serving many workspaces uses OAuth 2.0 instead and sends an access token as `Authorization: Bearer vpa_…`. Either acts as the owner of its workspace and never reaches another.\n\nOAuth 2.0 for partner apps: register the app under Settings → API → Apps to get a `client_id` (`vpc_…`) and a client secret (`vps_…`, shown once). Send the customer to https://vporiadku.sk/oauth/authorize with `response_type=code`, your `client_id`, a registered `redirect_uri` (exact match, always required), the space-separated `scope` you need, a `state`, and PKCE: `code_challenge` with `code_challenge_method=S256` (required). The customer signs in, picks the workspace and approves; the browser comes back with `code` and `state`, or with `error=access_denied`. Exchange the code within 10 minutes at `POST https://api.vporiadku.sk/api/oauth/token` (`application/x-www-form-urlencoded`: `grant_type=authorization_code`, `code`, `redirect_uri`, `code_verifier`; client authentication by HTTP Basic or `client_id` + `client_secret`). The answer carries `access_token` (valid 60 minutes), `refresh_token`, `scope` and the connected `workspace_id`. Refresh with `grant_type=refresh_token`: every refresh returns a new refresh token and spends the old one (valid 365 days from issue); presenting a spent one again more than 30 seconds later revokes the whole chain. Revoke a token at `POST https://api.vporiadku.sk/api/oauth/revoke` (RFC 7009); revoking the last refresh token disconnects the app from the workspace. Token endpoint errors follow RFC 6749 §5.2 (`{ \"error\", \"error_description\" }`). An expired access token answers `401` with `WWW-Authenticate: Bearer error=\"invalid_token\"`. Refresh and retry. The workspace sees the app under Settings → API → Connected apps and may disconnect it at any time; its tokens then stop working at once.\n\nScopes: every key carries the scopes it was created with, and every access token what the customer approved; an operation they do not cover answers `403 API_KEY_SCOPE_MISSING` (for an access token also `WWW-Authenticate: Bearer error=\"insufficient_scope\"`). Writing a resource implies reading it. Keys issued before scopes existed carry `*` (full access). The scopes:\n\n- `invoices:read`, `invoices:write`\n- `payments:read`, `payments:write`\n- `clients:read`, `clients:write`\n- `items:read`, `items:write`\n- `expenses:read`, `expenses:write`\n- `received_invoices:read`\n- `recurring_invoices:read`\n- `company:read`\n- `bank_accounts:read`\n- `webhooks:read`, `webhooks:write`\n\nRate limits: 120 requests per 60 seconds per key (and per partner app in each workspace it is connected to) across all endpoints, in fixed windows. Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` (seconds until the window refills); over the limit the answer is `429 RATE_LIMIT_EXCEEDED` with `Retry-After`. 30 failed authentications per 60 seconds from one address block that address until the window ends; an expired access token is not counted as one.\n\nIdempotency: send `Idempotency-Key` on a POST or PATCH to make it safe to retry. Keys are scoped to the API key, or to the partner app in the workspace (they survive a token refresh), and remembered for 24 hours. A repeat with the same method, path and body is answered with the stored response and `Idempotent-Replayed: true`, and runs nothing; the same key with a different request answers `409 IDEMPOTENCY_KEY_REUSED`, and a repeat while the first is still running `409 IDEMPOTENCY_KEY_IN_USE`. Only successful responses are stored, so a request that failed can be retried with the same key.\n\nPagination: lists take `page` (1-based) and `limit` (default 20, at most 100) and answer `{ data, total, page, limit }`. The document list also filters and sorts (see `listInvoices`), including `updatedSince` for an incremental sync.\n\nErrors: `{ \"data\": null, \"meta\": null, \"error\": { \"code\", \"message\", \"details\" } }`. Switch on `error.code`; the message is English prose and may change. Unknown body fields are a 400, not silently dropped. Success bodies are the resource itself (or the page object), with no envelope.\n\nMoney is a decimal number in the document currency; dates are `YYYY-MM-DD`, timestamps ISO 8601 UTC; ids are UUIDs.\n\nWebhooks: the `webhooks` section lists every event vporiadku can push. Endpoints are registered under Settings → API → Webhooks, or through `/webhooks` by an API key or a partner app with `webhooks:write`. Through the API an endpoint may carry only events whose data the credential can read:\n\n- `invoices:read`: `invoice.created`, `invoice.updated`, `invoice.sent`, `invoice.viewed`, `invoice.paid`, `invoice.overdue`, `invoice.cancelled`, `credit_note.created`, `quote.created`, `quote.accepted`, `quote.rejected`, `quote.expired`, `delivery_note.created`, `order.created`, `einvoice.sent`, `einvoice.delivered`, `einvoice.failed`\n- `payments:read`: `payment.recorded`, `payment.matched`\n- `clients:read`: `client.created`\n- `items:read`: `item.created`\n- `expenses:read`: `expense.created`, `expense.updated`, `expense.paid`, `supplier.created`\n- `received_invoices:read`: `einvoice.received`\n- `recurring_invoices:read`: `recurring_invoice.generated`, `recurring_invoice.failed`\n\n`ping` is open to every credential; bank-feed, VAT-report, subscription and team events stay in the app.","contact":{"name":"vporiadku","email":"podpora@vporiadku.sk","url":"https://vporiadku.sk/sk/vyvojari"}},"servers":[{"url":"https://api.vporiadku.sk/api/v1","description":"This deployment"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":[]}],"tags":[{"name":"meta","description":"Checking a key."},{"name":"invoices","description":"Invoices and every other document type (proforma, advance, credit and debit note, quote, delivery note, orders, cancellation) and their lifecycle."},{"name":"payments","description":"Money received against documents."},{"name":"clients","description":"The client directory."},{"name":"items","description":"The item and service catalogue (Profi)."},{"name":"expenses","description":"Received documents and other expenses (Profi)."},{"name":"received_invoices","description":"The e-Faktúra inbox: e-invoices received over Peppol or uploaded, read-only."},{"name":"recurring_invoices","description":"Recurring invoice schedules, read-only."},{"name":"companies","description":"The issuer company profiles of the workspace, read-only."},{"name":"bank_accounts","description":"The bank accounts documents are paid into, read-only."},{"name":"webhooks","description":"Webhook endpoints the credential manages: a partner app registers its own in each workspace it is connected to."}],"paths":{"/ping":{"get":{"operationId":"ping","summary":"Check a key or an access token: its workspace, plan and scopes","description":"Needs no scope, so any valid key can be tested with it.\n\nRequired scope: none (any valid key).","tags":["meta"],"responses":{"200":{"description":"The key works.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ping"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":[]}],"x-required-scope":null}},"/invoices":{"get":{"operationId":"listInvoices","summary":"List documents (invoices and every other document type)","description":"Every document type (invoices, proformas, credit notes, quotes, …), each with its lines, client and bank account. Filters combine: type, status, payment state (`overdue` tests the due date, not just the status), client, a date range on the issue, supply or due date (`dateType`), a named `period`, number range, tags, currency, free text over the number and the client name, and `updatedSince` for an incremental sync. Newest first by the filtered date unless `sortBy` says otherwise; ties are broken by creation time and id, so paging never repeats or skips a row.\n\nRequired scope: `invoices:read`.","tags":["invoices"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"description":"1-based page; anything that is not a positive integer reads as 1."}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Page size; values above 100 are clamped to 100."}},{"name":"sortBy","in":"query","required":false,"schema":{"enum":["number","clientName","issueDate","dueDate","validUntil","totalGross","updatedAt"],"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string"}},{"name":"documentType","in":"query","required":false,"schema":{"enum":["invoice","proforma","advance","credit_note","debit_note","quote","delivery_note","order_received","order_sent","cancellation","payment_tax_document"],"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"enum":["draft","issued","sent","pending","partially_paid","paid","overdue","cancelled","accepted","rejected","expired","confirmed","delivered","completed"],"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"maxLength":100,"type":"string"}},{"name":"dateType","in":"query","required":false,"schema":{"enum":["issue","delivery","due"],"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"enum":["this_month","last_month","this_quarter","this_year","last_year","all","custom"],"type":"string"}},{"name":"dateFrom","in":"query","required":false,"schema":{"type":"string","description":"Inclusive lower bound on the date `dateType` names (issue date by default).","format":"date"}},{"name":"dateTo","in":"query","required":false,"schema":{"type":"string","description":"Inclusive upper bound on the date `dateType` names.","format":"date"}},{"name":"clientId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"paymentState","in":"query","required":false,"schema":{"enum":["unpaid","partially_paid","paid","overdue","not_yet_due"],"type":"string"}},{"name":"numberFrom","in":"query","required":false,"schema":{"maxLength":50,"type":"string"}},{"name":"numberTo","in":"query","required":false,"schema":{"maxLength":50,"type":"string"}},{"name":"tags","in":"query","required":false,"schema":{"type":"array","maxItems":20,"items":{"type":"string"},"description":"Documents carrying every listed tag. Repeat the parameter or separate the tags with commas."}},{"name":"currency","in":"query","required":false,"schema":{"type":"string"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string","description":"Only documents changed at or after this instant, ISO 8601 with a time zone (`2026-10-14T08:00:00Z`). Use it for an incremental sync: store the time you started each sync and pass it the next time.","format":"date-time"}}],"responses":{"200":{"description":"One page of documents.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["invoices:read"]}],"x-required-scope":"invoices:read"},"post":{"operationId":"createInvoice","summary":"Create a document","description":"Totals sent by the client are accepted but ignored: the server always recomputes them. A document posted with a live status (e.g. `issued`) is issued in the same request. Leave `invoiceNumber` out to take the next number of the series. A foreign currency needs a plan that includes it; quotes, delivery notes and orders need the commercial-documents feature.\n\nRequired scope: `invoices:write`.","tags":["invoices"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoice"}}}},"responses":{"201":{"description":"The created document.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["invoices:write"]}],"x-required-scope":"invoices:write"}},"/invoices/{id}":{"get":{"operationId":"getInvoice","summary":"Get one document with its lines and client","description":"Required scope: `invoices:read`.","tags":["invoices"],"parameters":[{"$ref":"#/components/parameters/Id"}],"responses":{"200":{"description":"The document.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["invoices:read"]}],"x-required-scope":"invoices:read"},"patch":{"operationId":"updateInvoice","summary":"Update a document that is still editable","description":"An issued document is locked: only its lifecycle flags can still change, and a correction is a credit note. Send only the fields to change.\n\nRequired scope: `invoices:write`.","tags":["invoices"],"parameters":[{"$ref":"#/components/parameters/Id"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoice"}}}},"responses":{"200":{"description":"The updated document.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["invoices:write"]}],"x-required-scope":"invoices:write"},"delete":{"operationId":"deleteInvoice","summary":"Delete a draft that has no payments (it goes to the recycle bin)","description":"Only a draft with no payment recorded can be deleted; it goes to the recycle bin for 30 days. An issued document is voided with `cancel`.\n\nRequired scope: `invoices:write`.","tags":["invoices"],"parameters":[{"$ref":"#/components/parameters/Id"}],"responses":{"204":{"description":"Deleted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["invoices:write"]}],"x-required-scope":"invoices:write"}},"/invoices/{id}/pdf":{"get":{"operationId":"getInvoicePdf","summary":"Download a document as the PDF its customer receives","description":"The same renderer the dashboard and the customer portal use: what you archive is what the customer received.\n\nRequired scope: `invoices:read`.","tags":["invoices"],"parameters":[{"$ref":"#/components/parameters/Id"}],"responses":{"200":{"description":"The PDF.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["invoices:read"]}],"x-required-scope":"invoices:read"}},"/invoices/{id}/isdoc":{"get":{"operationId":"getInvoiceIsdoc","summary":"Download a document as ISDOC 6.0.1 XML for accounting software","description":"ISDOC 6.0.1, the XML Czech and Slovak accounting software imports. Quotes, orders and delivery notes are not accounting documents and have no ISDOC form (`409 DOCUMENT_NOT_EXPORTABLE`). Needs the accounting-export feature of the plan, as the export in the dashboard does.\n\nRequired scope: `invoices:read`.","tags":["invoices"],"parameters":[{"$ref":"#/components/parameters/Id"}],"responses":{"200":{"description":"The ISDOC XML.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/xml":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["invoices:read"]}],"x-required-scope":"invoices:read"}},"/invoices/{id}/ubl":{"get":{"operationId":"getInvoiceUbl","summary":"Download an issued invoice as Peppol BIS Billing 3.0 UBL XML","description":"The Peppol BIS Billing 3.0 (EN 16931) UBL 2.1 XML an e-invoice carries, after the same validation a send runs: a document that would be refused answers `422` with what is missing. Needs the e-Faktúra module.\n\nRequired scope: `invoices:read`.","tags":["invoices"],"parameters":[{"$ref":"#/components/parameters/Id"}],"responses":{"200":{"description":"The UBL XML.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/xml":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["invoices:read"]}],"x-required-scope":"invoices:read"}},"/invoices/{id}/issue":{"post":{"operationId":"issueInvoice","summary":"Issue a draft: fix its number and lock its content","description":"Keeps the number the draft was given from its series when it was created (or sets `number` when given), freezes the content and marks the document issued. Issuing an issued document changes nothing.\n\nRequired scope: `invoices:write`.","tags":["invoices"],"parameters":[{"$ref":"#/components/parameters/Id"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueInvoice"}}}},"responses":{"200":{"description":"The issued document.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["invoices:write"]}],"x-required-scope":"invoices:write"}},"/invoices/{id}/duplicate":{"post":{"operationId":"duplicateInvoice","summary":"Copy a document into a new draft with today's dates and the next number","description":"The copy is a new draft dated today (its due date and validity keep their distance from the issue date, a supply date becomes today), numbered from its series, with the client, lines, currency and texts of the original and a link back to it (`sourceDocumentId`). Payments do not carry over. A storno or a tax document of a payment cannot be copied (`422`). Counted against the plan like any new document.\n\nRequired scope: `invoices:write`.","tags":["invoices"],"parameters":[{"$ref":"#/components/parameters/Id"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"description":"The new draft.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["invoices:write"]}],"x-required-scope":"invoices:write"}},"/invoices/{id}/send":{"post":{"operationId":"sendInvoice","summary":"E-mail an issued document to its client with the PDF attached","description":"E-mails the document to the client's address with the PDF attached, from the workspace's own SMTP when it has one. The client must have an e-mail address; a draft is refused.\n\nRequired scope: `invoices:write`.","tags":["invoices"],"parameters":[{"$ref":"#/components/parameters/Id"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Sent or queued.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["invoices:write"]}],"x-required-scope":"invoices:write"}},"/invoices/{id}/reminder":{"post":{"operationId":"sendInvoiceReminder","summary":"E-mail a payment reminder for an unpaid document","description":"Only for a document that asks for payment and still has something outstanding.\n\nRequired scope: `invoices:write`.","tags":["invoices"],"parameters":[{"$ref":"#/components/parameters/Id"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Sent or queued.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["invoices:write"]}],"x-required-scope":"invoices:write"}},"/invoices/{id}/credit-note":{"post":{"operationId":"createCreditNote","summary":"Issue a credit note (dobropis) against an invoice","description":"Without `items` the whole invoice is credited; with `items` only those lines, given with positive amounts (the server negates them). The credit note is linked back to the invoice and may not exceed what is left of it.\n\nRequired scope: `invoices:write`.","tags":["invoices"],"parameters":[{"$ref":"#/components/parameters/Id"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCreditNote"}}}},"responses":{"201":{"description":"The credit note.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["invoices:write"]}],"x-required-scope":"invoices:write"}},"/invoices/{id}/cancel":{"post":{"operationId":"cancelInvoice","summary":"Void an issued document with a cancellation (storno) document","description":"Raises a cancellation (storno) document against the issued document and marks it cancelled. Nothing is deleted.\n\nRequired scope: `invoices:write`.","tags":["invoices"],"parameters":[{"$ref":"#/components/parameters/Id"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelInvoice"}}}},"responses":{"201":{"description":"The cancellation document.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["invoices:write"]}],"x-required-scope":"invoices:write"}},"/invoices/{id}/payments":{"get":{"operationId":"listInvoicePayments","summary":"List the payments recorded on a document","description":"Required scope: `payments:read`.","tags":["payments"],"parameters":[{"$ref":"#/components/parameters/Id"},{"name":"page","in":"query","required":false,"schema":{"maximum":1000000,"minimum":1,"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"description":"One page of payments.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["payments:read"]}],"x-required-scope":"payments:read"},"post":{"operationId":"createInvoicePayment","summary":"Record a payment; once the document is covered it becomes paid","description":"Moves the document to partially paid or paid, raises the tax document of a payment on an advance invoice, fires `payment.recorded` and sends the thank-you e-mail when the workspace has it on. An amount over what is outstanding is refused unless `allowOverpayment` is `true`.\n\nRequired scope: `payments:write`.","tags":["payments"],"parameters":[{"$ref":"#/components/parameters/Id"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePayment"}}}},"responses":{"201":{"description":"The recorded payment.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["payments:write"]}],"x-required-scope":"payments:write"}},"/invoices/{id}/mark-paid":{"post":{"operationId":"markInvoicePaid","summary":"Settle a document in full: record what is still outstanding as one payment","description":"Records what is still outstanding as one payment, like the dashboard's \"mark as paid\". With nothing outstanding only the status moves. A draft cannot be settled; an already paid document answers 409.\n\nRequired scope: `payments:write`.","tags":["payments"],"parameters":[{"$ref":"#/components/parameters/Id"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkInvoicePaid"}}}},"responses":{"200":{"description":"The paid document.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["payments:write"]}],"x-required-scope":"payments:write"}},"/payments/{id}":{"delete":{"operationId":"deletePayment","summary":"Delete a recorded payment; the document status follows","description":"The document's status is recomputed from the payments that remain.\n\nRequired scope: `payments:write`.","tags":["payments"],"parameters":[{"$ref":"#/components/parameters/Id"}],"responses":{"204":{"description":"Deleted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["payments:write"]}],"x-required-scope":"payments:write"}},"/clients":{"get":{"operationId":"listClients","summary":"List clients","description":"Newest first unless `sortBy` says otherwise; ties are broken by id, so paging never repeats or skips a client. `updatedSince` returns only clients changed since then, for an incremental sync.\n\nRequired scope: `clients:read`.","tags":["clients"],"parameters":[{"name":"search","in":"query","required":false,"schema":{"maxLength":120,"type":"string","description":"Matches the name, IČO, DIČ or e-mail address."}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"description":"1-based page; anything that is not a positive integer reads as 1."}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Page size; values above 100 are clamped to 100."}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string","description":"Only clients changed at or after this instant, ISO 8601 with a time zone.","format":"date-time"}},{"name":"sortBy","in":"query","required":false,"schema":{"enum":["name","createdAt","updatedAt"],"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"One page of clients.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["clients:read"]}],"x-required-scope":"clients:read"},"post":{"operationId":"createClient","summary":"Create a client","description":"Refused with `409 CLIENT_DUPLICATE_SUSPECTED` when the directory already holds a client that looks the same, unless `allowDuplicate=true`. The Start plan is limited to 5 clients (`403 PLAN_LIMIT_REACHED`).\n\nRequired scope: `clients:write`.","tags":["clients"],"parameters":[{"name":"allowDuplicate","in":"query","required":false,"description":"`true` saves past the duplicate warning.","schema":{"type":"string","enum":["true","false"]}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClient"}}}},"responses":{"201":{"description":"The created client.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["clients:write"]}],"x-required-scope":"clients:write"}},"/clients/{id}":{"get":{"operationId":"getClient","summary":"Get one client","description":"Required scope: `clients:read`.","tags":["clients"],"parameters":[{"$ref":"#/components/parameters/Id"}],"responses":{"200":{"description":"The client.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["clients:read"]}],"x-required-scope":"clients:read"},"patch":{"operationId":"updateClient","summary":"Update a client","description":"Required scope: `clients:write`.","tags":["clients"],"parameters":[{"$ref":"#/components/parameters/Id"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateClient"}}}},"responses":{"200":{"description":"The updated client.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["clients:write"]}],"x-required-scope":"clients:write"},"delete":{"operationId":"deleteClient","summary":"Delete a client no document names (it goes to the recycle bin)","description":"A client named by any document cannot be deleted (`409`).\n\nRequired scope: `clients:write`.","tags":["clients"],"parameters":[{"$ref":"#/components/parameters/Id"}],"responses":{"204":{"description":"Deleted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["clients:write"]}],"x-required-scope":"clients:write"}},"/items":{"get":{"operationId":"listItems","summary":"List catalogue items","description":"Needs the item catalogue feature of the Profi plan.\n\nRequired scope: `items:read`.","tags":["items"],"parameters":[{"name":"search","in":"query","required":false,"schema":{"maxLength":200,"type":"string"}},{"name":"category","in":"query","required":false,"schema":{"maxLength":100,"type":"string"}},{"name":"isActive","in":"query","required":false,"schema":{"type":"boolean","description":"Only active (`true`) or only inactive (`false`) items."}},{"name":"clientId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"sortBy","in":"query","required":false,"schema":{"enum":["name","sku","catalogueNumber","unitPrice","category","createdAt","updatedAt","margin"],"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"enum":["ASC","DESC"],"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"maximum":1000000,"minimum":1,"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"description":"One page of items.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["items:read"]}],"x-required-scope":"items:read"},"post":{"operationId":"createItem","summary":"Create a catalogue item","description":"Required scope: `items:write`.","tags":["items"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateItem"}}}},"responses":{"201":{"description":"The created item.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["items:write"]}],"x-required-scope":"items:write"}},"/items/{id}":{"get":{"operationId":"getItem","summary":"Get one catalogue item","description":"Required scope: `items:read`.","tags":["items"],"parameters":[{"$ref":"#/components/parameters/Id"}],"responses":{"200":{"description":"The item.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["items:read"]}],"x-required-scope":"items:read"},"patch":{"operationId":"updateItem","summary":"Update a catalogue item","description":"Required scope: `items:write`.","tags":["items"],"parameters":[{"$ref":"#/components/parameters/Id"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateItem"}}}},"responses":{"200":{"description":"The updated item.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["items:write"]}],"x-required-scope":"items:write"},"delete":{"operationId":"deleteItem","summary":"Delete a catalogue item (it goes to the recycle bin)","description":"The item goes to the recycle bin for 30 days.\n\nRequired scope: `items:write`.","tags":["items"],"parameters":[{"$ref":"#/components/parameters/Id"}],"responses":{"204":{"description":"Deleted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["items:write"]}],"x-required-scope":"items:write"}},"/expenses":{"get":{"operationId":"listExpenses","summary":"List expenses (received documents)","description":"Needs the expenses feature of the Profi plan.\n\nRequired scope: `expenses:read`.","tags":["expenses"],"parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"supplierId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","required":false,"schema":{"enum":["draft","pending","partially_paid","paid","overdue","cancelled"],"type":"string"}},{"name":"category","in":"query","required":false,"schema":{"enum":["material","goods","services","subcontractors","rent","energy","telecom","software","marketing","travel","fuel","vehicle","office","equipment","education","insurance","bank_fees","taxes_fees","representation","other"],"type":"string"}},{"name":"source","in":"query","required":false,"schema":{"enum":["manual","ocr","peppol","import"],"type":"string"}},{"name":"dateFrom","in":"query","required":false,"schema":{"type":"string","description":"ISO 8601 date, e.g. 2026-10-12."}},{"name":"dateTo","in":"query","required":false,"schema":{"type":"string","description":"ISO 8601 date, e.g. 2026-10-12."}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string","description":"Only expenses changed at or after this instant, ISO 8601 with a time zone. Use it for an incremental sync.","format":"date-time"}},{"name":"unpaidOnly","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"needsReview","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"sortBy","in":"query","required":false,"schema":{"enum":["issueDate","dueDate","totalGross","supplierName","createdAt"],"type":"string"}},{"name":"sortDir","in":"query","required":false,"schema":{"enum":["ASC","DESC"],"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"maximum":1000000,"minimum":1,"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"description":"One page of expenses.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["expenses:read"]}],"x-required-scope":"expenses:read"},"post":{"operationId":"createExpense","summary":"Book an expense","description":"A second document with the same supplier and number is refused (`409`) unless `allowDuplicate=true`.\n\nRequired scope: `expenses:write`.","tags":["expenses"],"parameters":[{"name":"allowDuplicate","in":"query","required":false,"description":"`true` books past the duplicate guard.","schema":{"type":"boolean","default":false}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExpense"}}}},"responses":{"201":{"description":"The booked expense.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Expense"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["expenses:write"]}],"x-required-scope":"expenses:write"}},"/expenses/{id}":{"get":{"operationId":"getExpense","summary":"Get one expense","description":"Required scope: `expenses:read`.","tags":["expenses"],"parameters":[{"$ref":"#/components/parameters/Id"}],"responses":{"200":{"description":"The expense.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Expense"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["expenses:read"]}],"x-required-scope":"expenses:read"},"patch":{"operationId":"updateExpense","summary":"Update an expense","description":"Required scope: `expenses:write`.","tags":["expenses"],"parameters":[{"$ref":"#/components/parameters/Id"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExpense"}}}},"responses":{"200":{"description":"The updated expense.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Expense"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["expenses:write"]}],"x-required-scope":"expenses:write"},"delete":{"operationId":"deleteExpense","summary":"Delete an expense (it goes to the recycle bin)","description":"The expense goes to the recycle bin for 30 days.\n\nRequired scope: `expenses:write`.","tags":["expenses"],"parameters":[{"$ref":"#/components/parameters/Id"}],"responses":{"204":{"description":"Deleted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["expenses:write"]}],"x-required-scope":"expenses:write"}},"/received-invoices":{"get":{"operationId":"listReceivedInvoices","summary":"List received e-invoices (the e-Faktúra inbox)","description":"Reading does not mark a document read; only a person opening it in the dashboard does.\n\nRequired scope: `received_invoices:read`.","tags":["received_invoices"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"enum":["new","read","converted","ignored"],"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"maxLength":120,"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"maximum":1000000,"minimum":1,"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"description":"One page of received e-invoices.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceivedInvoiceList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["received_invoices:read"]}],"x-required-scope":"received_invoices:read"}},"/received-invoices/{id}":{"get":{"operationId":"getReceivedInvoice","summary":"Get one received e-invoice with its lines","description":"Required scope: `received_invoices:read`.","tags":["received_invoices"],"parameters":[{"$ref":"#/components/parameters/Id"}],"responses":{"200":{"description":"The received e-invoice.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceivedInvoiceDetail"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["received_invoices:read"]}],"x-required-scope":"received_invoices:read"}},"/received-invoices/{id}/xml":{"get":{"operationId":"getReceivedInvoiceXml","summary":"Get the archived original UBL XML of a received e-invoice","description":"The legal document: the archived original, byte for byte, with its SHA-256.\n\nRequired scope: `received_invoices:read`.","tags":["received_invoices"],"parameters":[{"$ref":"#/components/parameters/Id"}],"responses":{"200":{"description":"The original XML.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceivedInvoiceXml"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["received_invoices:read"]}],"x-required-scope":"received_invoices:read"}},"/recurring-invoices":{"get":{"operationId":"listRecurringInvoices","summary":"List recurring invoice schedules","description":"Required scope: `recurring_invoices:read`.","tags":["recurring_invoices"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"maximum":1000000,"minimum":1,"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"description":"One page of schedules.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoiceList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["recurring_invoices:read"]}],"x-required-scope":"recurring_invoices:read"}},"/recurring-invoices/{id}":{"get":{"operationId":"getRecurringInvoice","summary":"Get one schedule with its recent runs","description":"Required scope: `recurring_invoices:read`.","tags":["recurring_invoices"],"parameters":[{"$ref":"#/components/parameters/Id"}],"responses":{"200":{"description":"The schedule with its recent runs.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoice"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["recurring_invoices:read"]}],"x-required-scope":"recurring_invoices:read"}},"/companies":{"get":{"operationId":"listCompanies","summary":"List the issuer company profiles of the workspace","description":"Required scope: `company:read`.","tags":["companies"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"maximum":1000000,"minimum":1,"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"description":"One page of issuer profiles.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["company:read"]}],"x-required-scope":"company:read"}},"/bank-accounts":{"get":{"operationId":"listBankAccounts","summary":"List the bank accounts the workspace is paid into","description":"Name one in `bankAccountId` when creating a document to have it paid into an account other than the primary one.\n\nRequired scope: `bank_accounts:read`.","tags":["bank_accounts"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"maximum":1000000,"minimum":1,"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"description":"One page of bank accounts.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["bank_accounts:read"]}],"x-required-scope":"bank_accounts:read"}},"/bank-accounts/{id}":{"get":{"operationId":"getBankAccount","summary":"Get one bank account","description":"Required scope: `bank_accounts:read`.","tags":["bank_accounts"],"parameters":[{"$ref":"#/components/parameters/Id"}],"responses":{"200":{"description":"The bank account.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["bank_accounts:read"]}],"x-required-scope":"bank_accounts:read"}},"/webhooks":{"get":{"operationId":"listWebhooks","summary":"List the webhook endpoints this credential manages","description":"A partner app sees the endpoints it registered in this workspace; an API key sees the workspace's own, including those registered in the app.\n\nRequired scope: `webhooks:read`.","tags":["webhooks"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"maximum":1000000,"minimum":1,"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"description":"One page of endpoints.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["webhooks:read"]}],"x-required-scope":"webhooks:read"},"post":{"operationId":"createWebhook","summary":"Register a webhook endpoint; the answer carries its signing secret once","description":"Name the events explicitly. Each must be one whose data the credential may read (`invoice.*` needs `invoices:read`, `expense.*` `expenses:read`, and so on; account events such as bank feeds, VAT reports, the subscription and the team are kept off the API), or the answer is `403 WEBHOOK_EVENT_NOT_ALLOWED`. The URL must be publicly reachable over https (`422 WEBHOOK_URL_NOT_ALLOWED`). A partner app may register 5 endpoints per workspace; they are deleted when the workspace disconnects the app. The answer carries the signing secret, once.\n\nRequired scope: `webhooks:write`.","tags":["webhooks"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhook"}}}},"responses":{"201":{"description":"The endpoint and its secret.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecret"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["webhooks:write"]}],"x-required-scope":"webhooks:write"}},"/webhooks/{id}":{"get":{"operationId":"getWebhook","summary":"Get one webhook endpoint","description":"Required scope: `webhooks:read`.","tags":["webhooks"],"parameters":[{"$ref":"#/components/parameters/Id"}],"responses":{"200":{"description":"The endpoint.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["webhooks:read"]}],"x-required-scope":"webhooks:read"},"patch":{"operationId":"updateWebhook","summary":"Change the URL, events, label or state of a webhook endpoint","description":"What the endpoint receives after the change must lie within the credential's scopes, including events it was already subscribed to. `isActive: true` resumes an endpoint that was switched off after repeated failures.\n\nRequired scope: `webhooks:write`.","tags":["webhooks"],"parameters":[{"$ref":"#/components/parameters/Id"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhook"}}}},"responses":{"200":{"description":"The updated endpoint.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["webhooks:write"]}],"x-required-scope":"webhooks:write"},"delete":{"operationId":"deleteWebhook","summary":"Delete a webhook endpoint","description":"Deliveries still waiting for a retry are closed off; the delivery log is kept.\n\nRequired scope: `webhooks:write`.","tags":["webhooks"],"parameters":[{"$ref":"#/components/parameters/Id"}],"responses":{"204":{"description":"Deleted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["webhooks:write"]}],"x-required-scope":"webhooks:write"}},"/webhooks/{id}/rotate-secret":{"post":{"operationId":"rotateWebhookSecret","summary":"Replace the signing secret of a webhook endpoint","description":"The old secret stops signing at once; deliveries from now on use the new one.\n\nRequired scope: `webhooks:write`.","tags":["webhooks"],"parameters":[{"$ref":"#/components/parameters/Id"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The endpoint and its new secret.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecret"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["webhooks:write"]}],"x-required-scope":"webhooks:write"}},"/webhooks/{id}/test":{"post":{"operationId":"testWebhook","summary":"Send a signed ping event to a webhook endpoint and report the result","description":"Sends a signed `ping` event to this endpoint now and reports how it answered.\n\nRequired scope: `webhooks:write`.","tags":["webhooks"],"parameters":[{"$ref":"#/components/parameters/Id"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The test delivery.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]},{"oauth2":["webhooks:write"]}],"x-required-scope":"webhooks:write"}}},"webhooks":{"invoice.created":{"post":{"operationId":"webhook:invoice.created","summary":"An invoice was created.","description":"Group `invoice`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:invoice"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"invoice.updated":{"post":{"operationId":"webhook:invoice.updated","summary":"An invoice was modified.","description":"Group `invoice`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:invoice"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"invoice.sent":{"post":{"operationId":"webhook:invoice.sent","summary":"An invoice was e-mailed to the customer.","description":"Group `invoice`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:invoice"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"invoice.viewed":{"post":{"operationId":"webhook:invoice.viewed","summary":"The customer opened the public link of an invoice.","description":"Group `invoice`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:invoice"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"invoice.paid":{"post":{"operationId":"webhook:invoice.paid","summary":"An invoice became fully settled.","description":"Group `invoice`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:invoice"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"invoice.overdue":{"post":{"operationId":"webhook:invoice.overdue","summary":"An invoice passed its due date unpaid.","description":"Group `invoice`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:invoice"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"invoice.cancelled":{"post":{"operationId":"webhook:invoice.cancelled","summary":"An issued invoice was voided by a storno document.","description":"Group `invoice`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:invoice"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"credit_note.created":{"post":{"operationId":"webhook:credit_note.created","summary":"A credit note was issued against an invoice.","description":"Group `document`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:document"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"quote.created":{"post":{"operationId":"webhook:quote.created","summary":"A quote was created.","description":"Group `document`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:document"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"quote.accepted":{"post":{"operationId":"webhook:quote.accepted","summary":"A quote was marked accepted by the customer.","description":"Group `document`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:document"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"quote.rejected":{"post":{"operationId":"webhook:quote.rejected","summary":"A quote was marked rejected.","description":"Group `document`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:document"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"quote.expired":{"post":{"operationId":"webhook:quote.expired","summary":"A quote passed its validity date without an answer.","description":"Group `document`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:document"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"delivery_note.created":{"post":{"operationId":"webhook:delivery_note.created","summary":"A delivery note was created.","description":"Group `document`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:document"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"order.created":{"post":{"operationId":"webhook:order.created","summary":"An order confirmation was created.","description":"Group `document`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:document"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"payment.recorded":{"post":{"operationId":"webhook:payment.recorded","summary":"A settlement was recorded against an invoice.","description":"Group `payment`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:payment"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"payment.matched":{"post":{"operationId":"webhook:payment.matched","summary":"A bank statement entry was allocated to a document.","description":"Group `payment`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:payment"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"expense.created":{"post":{"operationId":"webhook:expense.created","summary":"A received document was booked.","description":"Group `expense`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:expense"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"expense.updated":{"post":{"operationId":"webhook:expense.updated","summary":"A received document was modified.","description":"Group `expense`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:expense"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"expense.paid":{"post":{"operationId":"webhook:expense.paid","summary":"A received document became fully settled.","description":"Group `expense`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:expense"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"client.created":{"post":{"operationId":"webhook:client.created","summary":"A customer record was created.","description":"Group `contact`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:contact"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"supplier.created":{"post":{"operationId":"webhook:supplier.created","summary":"A supplier record was created.","description":"Group `contact`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:contact"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"item.created":{"post":{"operationId":"webhook:item.created","summary":"A catalogue item was created.","description":"Group `catalogue`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:catalogue"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"einvoice.sent":{"post":{"operationId":"webhook:einvoice.sent","summary":"A document was handed to the Peppol Access Point.","description":"Group `einvoice`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:einvoice"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"einvoice.delivered":{"post":{"operationId":"webhook:einvoice.delivered","summary":"The Access Point confirmed delivery to the recipient.","description":"Group `einvoice`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:einvoice"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"einvoice.failed":{"post":{"operationId":"webhook:einvoice.failed","summary":"A transmission was rejected or failed validation.","description":"Group `einvoice`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:einvoice"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"einvoice.received":{"post":{"operationId":"webhook:einvoice.received","summary":"An inbound e-invoice arrived in the workspace inbox.","description":"Group `einvoice`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:einvoice"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"bank_statement.imported":{"post":{"operationId":"webhook:bank_statement.imported","summary":"A bank statement was imported and reconciled.","description":"Group `banking`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:banking"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"bank_feed.synced":{"post":{"operationId":"webhook:bank_feed.synced","summary":"An automatic bank feed imported transactions and reconciled them.","description":"Group `banking`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:banking"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"bank_feed.consent_expiring":{"post":{"operationId":"webhook:bank_feed.consent_expiring","summary":"A PSD2 bank consent is close to expiry, or has expired, and needs re-authorisation.","description":"Group `banking`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:banking"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"recurring_invoice.generated":{"post":{"operationId":"webhook:recurring_invoice.generated","summary":"A recurring schedule issued a document.","description":"Group `recurring`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:recurring"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"recurring_invoice.failed":{"post":{"operationId":"webhook:recurring_invoice.failed","summary":"A recurring schedule failed to issue a document.","description":"Group `recurring`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:recurring"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"vat_report.generated":{"post":{"operationId":"webhook:vat_report.generated","summary":"A VAT return or control statement was generated.","description":"Group `vat`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:vat"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"subscription.updated":{"post":{"operationId":"webhook:subscription.updated","summary":"The workspace's own vporiadku subscription changed.","description":"Group `billing`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:billing"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"team.member_joined":{"post":{"operationId":"webhook:team.member_joined","summary":"An invited user activated their workspace membership.","description":"Group `team`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:team"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}},"ping":{"post":{"operationId":"webhook:ping","summary":"Test event, sent only by the \"send test event\" button.","description":"Group `system`, payload schema version 1. Delivered only to endpoints subscribed to it.","tags":["webhooks:system"],"parameters":[{"name":"x-vporiadku-signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<timestamp>.<raw body>\"` with the endpoint secret.","schema":{"type":"string"}},{"name":"x-vporiadku-timestamp","in":"header","required":true,"description":"Unix seconds, part of the signed material. Reject older than 300 seconds.","schema":{"type":"integer"}},{"name":"x-vporiadku-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-vporiadku-delivery-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-vporiadku-idempotency-key","in":"header","required":true,"description":"Same as the envelope field; stable across retries and manual resends.","schema":{"type":"string"}},{"name":"x-vporiadku-attempt","in":"header","required":true,"schema":{"type":"integer"}},{"name":"x-vporiadku-api-version","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"responses":{"200":{"description":"Any 2xx within 10 seconds acknowledges the delivery. Anything else is retried up to 8 attempts in total, except 400, 401, 403, 404, 405, 410 and 422."}}}}},"components":{"schemas":{"Error":{"type":"object","description":"Every error response has this shape.","properties":{"data":{"type":"null"},"meta":{"type":"null"},"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. `API_KEY_SCOPE_MISSING`. Switch on this, never on the message. New codes may appear; treat an unknown one by its HTTP status."},"message":{"type":"string","description":"Human-readable English explanation. May change."},"details":{"type":"object","description":"Structured context of the error, e.g. `{ \"required\": \"invoices:write\" }`.","additionalProperties":true}},"required":["code","message"],"additionalProperties":true}},"required":["data","meta","error"],"additionalProperties":true},"Ping":{"type":"object","properties":{"ok":{"type":"boolean","description":"Always `true`.","const":true},"plan":{"type":"string","description":"Stored plan of the workspace: `free`, `pro` or the grandfathered `firma`."},"authType":{"type":"string","description":"What authenticated the request.","enum":["api_key","oauth_app"]},"keyPrefix":{"type":"string","description":"The first characters of the API key or the access token."},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes of the credential; `[\"*\"]` on a key issued before scopes existed (full access)."},"workspace":{"type":"object","description":"The workspace the credential acts in.","properties":{"id":{"type":"string","description":"The workspace: the `workspaceId` of every webhook envelope.","format":"uuid"},"name":{"type":["string","null"],"description":"Company name of the workspace, or its owner's name."}},"required":["id","name"],"additionalProperties":true},"app":{"oneOf":[{"type":"object","description":"The partner app an access token belongs to.","properties":{"id":{"type":"string","format":"uuid"},"clientId":{"type":"string"},"name":{"type":"string"}},"required":["id","clientId","name"],"additionalProperties":true},{"type":"null"}],"description":"`null` for an API key."},"environment":{"type":"string","description":"`sandbox` for a sandbox key (`fak_test_…`) or the token of a sandbox app, `live` otherwise.","enum":["live","sandbox"]},"sandbox":{"oneOf":[{"type":"object","description":"The sandbox the credential acts in.","properties":{"expiresAt":{"type":"string","description":"When the sandbox and everything in it expires.","format":"date-time"}},"required":["expiresAt"],"additionalProperties":true},{"type":"null"}],"description":"`null` outside a sandbox."}},"required":["ok","plan","keyPrefix","scopes","environment"],"additionalProperties":true},"SendResult":{"type":"object","properties":{"queued":{"type":"boolean","description":"`true` when the mail provider was unavailable and the message waits in the retry queue; the document already counts as sent."}},"required":["queued"],"additionalProperties":true},"InvoiceLine":{"type":"object","description":"One line of a document. Amounts are decimal numbers in the document currency.","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"quantity":{"type":"number"},"unit":{"type":"string"},"unitPrice":{"type":"number","description":"Unit price before the line discount, in the document currency."},"vatRate":{"type":"number","description":"VAT rate in percent; 0 is legitimate (reverse charge, export, non-payer)."},"discountPercent":{"type":"number"},"totalNet":{"type":"number"},"totalVat":{"type":"number"},"totalGross":{"type":"number"}},"required":["id","name","description","quantity","unit","unitPrice","vatRate","discountPercent","totalNet","totalVat","totalGross"],"additionalProperties":true},"ClientSummary":{"type":"object","description":"The client a document names.","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":["string","null"]},"ico":{"type":["string","null"],"description":"IČO: Slovak company registration number."},"dic":{"type":["string","null"],"description":"DIČ: tax identification number."},"icDph":{"type":["string","null"],"description":"IČ DPH: EU VAT identification number."}},"required":["id","name","email","ico","dic","icDph"],"additionalProperties":true},"Invoice":{"type":"object","description":"A document: an invoice or any other document type. Lists carry the same shape.","properties":{"id":{"type":"string","format":"uuid"},"invoiceNumber":{"type":"string","description":"Document number; assigned from the series when the document is issued."},"documentType":{"type":"string","enum":["invoice","proforma","advance","credit_note","debit_note","quote","delivery_note","order_received","order_sent","cancellation","payment_tax_document"]},"status":{"type":"string","enum":["draft","issued","sent","pending","partially_paid","paid","overdue","cancelled","accepted","rejected","expired","confirmed","delivered","completed"]},"issueDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"supplyDate":{"type":["string","null"],"description":"Date of supply (tax point).","format":"date"},"currency":{"type":"string","description":"ISO 4217 currency code.","enum":["EUR","USD","GBP","CHF","JPY","CAD","AUD","CZK","PLN","HUF","RON","BGN","SEK","DKK","NOK","ISK","HRK","CNY","KRW","INR","IDR","THB","VND","PHP","MYR","SGD","HKD","TWD","NZD","AED","SAR","ILS","TRY","ZAR","EGP","NGN","KES","BRL","MXN","ARS","CLP","COP","PEN","UAH","GEL","KZT","RSD","BAM","MKD","ALL","MDL"]},"exchangeRate":{"type":["number","null"],"description":"Rate to EUR for a foreign-currency document."},"totalNet":{"type":"number"},"totalVat":{"type":"number"},"totalGross":{"type":"number"},"amountDue":{"type":"number","description":"What the customer is asked to pay: gross less advance deduction and retainer."},"variableSymbol":{"type":["string","null"]},"paymentMethod":{"type":["string","null"]},"documentLanguage":{"type":["string","null"],"description":"Language the document is printed and e-mailed in. A document created without one takes its client's `documentLanguage`, else Slovak.","enum":["sk","uk","en","cs","de","ru",null]},"clientId":{"type":["string","null"],"format":"uuid"},"client":{"$ref":"#/components/schemas/ClientSummary","description":"The client, when the document names one."},"companyId":{"type":["string","null"],"description":"Issuer company profile.","format":"uuid"},"relatedInvoiceId":{"type":["string","null"],"description":"The document a credit note, debit note or cancellation corrects.","format":"uuid"},"isLocked":{"type":"boolean","description":"`true` once issued: the content is frozen."},"issuedAt":{"type":["string","null"],"format":"date-time"},"isSent":{"type":"boolean"},"sentAt":{"type":["string","null"],"format":"date-time"},"cancelledAt":{"type":["string","null"],"format":"date-time"},"tags":{"type":["array","null"],"items":{"type":"string"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLine"},"description":"The lines, on the detail and on every list page."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","invoiceNumber","documentType","status","issueDate","dueDate","currency","totalNet","totalVat","totalGross","amountDue"],"additionalProperties":true},"Payment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"invoiceId":{"type":"string","format":"uuid"},"amount":{"type":"number","description":"Amount received, in the document currency."},"paymentDate":{"type":"string","format":"date"},"paymentMethod":{"type":"string","enum":["cash","bank_transfer","card","paypal","other"]},"note":{"type":["string","null"]},"isRoundingAdjustment":{"type":"boolean","description":"`true` on a halierové vyrovnanie the server booked to settle a few cents of difference."},"createdAt":{"type":"string","format":"date-time"}},"required":["id","invoiceId","amount","paymentDate","paymentMethod","note","isRoundingAdjustment","createdAt"],"additionalProperties":true},"Client":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":["string","null"]},"ico":{"type":["string","null"],"description":"IČO: Slovak company registration number."},"dic":{"type":["string","null"],"description":"DIČ: tax identification number."},"icDph":{"type":["string","null"],"description":"IČ DPH: EU VAT identification number."},"contactPerson":{"type":["string","null"]},"phone":{"type":["string","null"]},"iban":{"type":["string","null"]},"addressJson":{"oneOf":[{"$ref":"#/components/schemas/PostalAddress"},{"type":"null"}]},"postalAddressJson":{"oneOf":[{"$ref":"#/components/schemas/PostalAddress"},{"type":"null"}]},"documentLanguage":{"type":["string","null"],"description":"Language a new document for this client is printed and e-mailed in when it names no `documentLanguage` of its own. `null` is the default, Slovak.","enum":["sk","uk","en","cs","de","ru",null]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name"],"additionalProperties":true},"PostalAddress":{"type":"object","description":"A postal address. Every field is optional.","properties":{"street":{"type":"string"},"city":{"type":"string"},"zip":{"type":"string"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code or a country name."}},"required":[],"additionalProperties":true},"Item":{"type":"object","description":"A catalogue item or service.","properties":{"id":{"type":"string","format":"uuid"},"sku":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"unit":{"type":"string"},"unitPrice":{"type":"number","description":"Default unit price without VAT."},"vatRate":{"type":"number"},"currency":{"type":"string","description":"ISO 4217 currency code.","enum":["EUR","USD","GBP","CHF","JPY","CAD","AUD","CZK","PLN","HUF","RON","BGN","SEK","DKK","NOK","ISK","HRK","CNY","KRW","INR","IDR","THB","VND","PHP","MYR","SGD","HKD","TWD","NZD","AED","SAR","ILS","TRY","ZAR","EGP","NGN","KES","BRL","MXN","ARS","CLP","COP","PEN","UAH","GEL","KZT","RSD","BAM","MKD","ALL","MDL"]},"category":{"type":["string","null"]},"isActive":{"type":"boolean"},"purchasePrice":{"type":["number","null"]},"barcode":{"type":["string","null"]},"clientPrice":{"type":["number","null"],"description":"The negotiated price of the client named by `clientId` on the list, else `null`."},"effectiveUnitPrice":{"type":"number","description":"`clientPrice` when there is one, else `unitPrice`."},"usageCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","unit","unitPrice","vatRate","currency","isActive"],"additionalProperties":true},"Expense":{"type":"object","description":"A received document (expense).","properties":{"id":{"type":"string","format":"uuid"},"supplierId":{"type":["string","null"],"format":"uuid"},"supplierName":{"type":"string"},"supplierIco":{"type":["string","null"]},"documentNumber":{"type":"string","description":"The supplier's document number."},"variableSymbol":{"type":["string","null"]},"issueDate":{"type":"string","format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"status":{"type":"string"},"category":{"type":"string"},"source":{"type":"string","description":"How the document entered the system."},"currency":{"type":"string","description":"ISO 4217 currency code.","enum":["EUR","USD","GBP","CHF","JPY","CAD","AUD","CZK","PLN","HUF","RON","BGN","SEK","DKK","NOK","ISK","HRK","CNY","KRW","INR","IDR","THB","VND","PHP","MYR","SGD","HKD","TWD","NZD","AED","SAR","ILS","TRY","ZAR","EGP","NGN","KES","BRL","MXN","ARS","CLP","COP","PEN","UAH","GEL","KZT","RSD","BAM","MKD","ALL","MDL"]},"totalNet":{"type":"number"},"totalVat":{"type":"number"},"totalGross":{"type":"number"},"amountPaid":{"type":"number"},"amountDue":{"type":"number"},"vatDeductible":{"type":"boolean"},"deductibleVat":{"type":"number"},"note":{"type":["string","null"]},"receivedEInvoiceId":{"type":["string","null"],"description":"The received e-invoice the expense was converted from.","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","supplierName","documentNumber","issueDate","status","currency","totalGross"],"additionalProperties":true},"ReceivedInvoice":{"type":"object","description":"A received e-invoice as the inbox lists it.","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["new","read","converted","ignored"]},"source":{"type":"string","description":"How it arrived: Peppol or a manual upload."},"documentTypeCode":{"type":["string","null"],"description":"UNCL1001 code, e.g. 380 for an invoice."},"isCreditNote":{"type":"boolean"},"documentNumber":{"type":["string","null"]},"issueDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"currency":{"type":"string"},"senderName":{"type":["string","null"]},"senderVatId":{"type":["string","null"]},"totalNet":{"type":"number"},"totalVat":{"type":"number"},"totalGross":{"type":"number"},"payableAmount":{"type":"number"},"hasParseErrors":{"type":"boolean"},"convertedExpenseId":{"type":["string","null"],"format":"uuid"},"receivedAt":{"type":"string","format":"date-time"}},"required":["id","status","currency","totalGross","receivedAt"],"additionalProperties":true},"ReceivedInvoiceDetail":{"type":"object","description":"A received e-invoice with its parties, lines and VAT breakdown. Carries every field of `ReceivedInvoice` too.","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"},"documentNumber":{"type":["string","null"]},"issueDate":{"type":["string","null"],"format":"date"},"currency":{"type":"string"},"totalGross":{"type":"number"},"sender":{"oneOf":[{"$ref":"#/components/schemas/UblParty"},{"type":"null"}]},"recipient":{"oneOf":[{"$ref":"#/components/schemas/UblParty"},{"type":"null"}]},"paymentIban":{"type":["string","null"]},"paymentReference":{"type":["string","null"]},"taxSubtotals":{"type":"array","items":{"$ref":"#/components/schemas/UblTaxSubtotal"}},"lines":{"type":"array","items":{"$ref":"#/components/schemas/UblLine"}},"parseErrors":{"type":"array","items":{"type":"string"}},"rawXmlSha256":{"type":"string","description":"SHA-256 of the archived original."},"retentionUntil":{"type":["string","null"],"description":"The archive keeps the original until this date.","format":"date"}},"required":["id","status","lines","taxSubtotals"],"additionalProperties":true},"UblParty":{"type":"object","properties":{"name":{"type":["string","null"]},"registrationName":{"type":["string","null"]},"endpointId":{"type":["string","null"],"description":"Peppol participant id."},"endpointScheme":{"type":["string","null"]},"vatId":{"type":["string","null"]},"companyId":{"type":["string","null"]},"street":{"type":["string","null"]},"city":{"type":["string","null"]},"zip":{"type":["string","null"]},"countryCode":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":[],"additionalProperties":true},"UblLine":{"type":"object","properties":{"lineNumber":{"type":"integer"},"name":{"type":"string"},"description":{"type":["string","null"]},"quantity":{"type":"number"},"unitCode":{"type":"string","description":"UN/ECE Recommendation 20 unit code."},"unitPrice":{"type":"number"},"netAmount":{"type":"number"},"vatRate":{"type":"number"},"vatCategory":{"type":["string","null"]}},"required":["lineNumber","name","description","quantity","unitCode","unitPrice","netAmount","vatRate","vatCategory"],"additionalProperties":true},"UblTaxSubtotal":{"type":"object","properties":{"taxableAmount":{"type":"number"},"taxAmount":{"type":"number"},"percent":{"type":"number"},"category":{"type":["string","null"]}},"required":["taxableAmount","taxAmount","percent","category"],"additionalProperties":true},"ReceivedInvoiceXml":{"type":"object","properties":{"xml":{"type":"string","description":"The original UBL document, byte for byte."},"fileName":{"type":"string"},"sha256":{"type":"string"}},"required":["xml","fileName","sha256"],"additionalProperties":true},"RecurringInvoice":{"type":"object","description":"A recurring invoice schedule.","properties":{"id":{"type":"string","format":"uuid"},"invoiceId":{"type":"string","description":"The template document every run copies.","format":"uuid"},"name":{"type":["string","null"]},"frequency":{"type":"string"},"nextRunDate":{"type":"string","format":"date"},"lastRunDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"maxOccurrences":{"type":["integer","null"]},"occurrencesCount":{"type":"integer"},"autoIssue":{"type":"boolean","description":"Whether a generated document is issued, not left as a draft."},"isActive":{"type":"boolean"},"lastRunStatus":{"type":["string","null"]},"runs":{"type":"array","items":{"$ref":"#/components/schemas/RecurringInvoiceRun"},"description":"The most recent runs; on the detail only."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","invoiceId","frequency","nextRunDate","isActive"],"additionalProperties":true},"RecurringInvoiceRun":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"runDate":{"type":"string","format":"date"},"status":{"type":"string"},"trigger":{"type":"string"},"generatedInvoiceId":{"type":["string","null"],"format":"uuid"},"generatedInvoiceNumber":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","runDate","status"],"additionalProperties":true},"Company":{"type":"object","description":"An issuer company profile.","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"ico":{"type":["string","null"]},"dic":{"type":["string","null"]},"icDph":{"type":["string","null"]},"addressJson":{"oneOf":[{"$ref":"#/components/schemas/PostalAddress"},{"type":"null"}]},"taxPayerType":{"type":["string","null"],"description":"VAT registration status of the issuer."},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"web":{"type":["string","null"]},"isActive":{"type":"boolean","description":"The profile a document is issued under when it names no `companyId`."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","isActive"],"additionalProperties":true},"BankAccount":{"type":"object","description":"A bank account of the workspace.","properties":{"id":{"type":"string","format":"uuid"},"iban":{"type":"string","description":"IBAN, as printed on documents."},"swift":{"type":["string","null"],"description":"BIC / SWIFT code."},"bankName":{"type":["string","null"]},"bankCode":{"type":["string","null"],"description":"Slovak four-digit bank code."},"currency":{"type":"string","description":"ISO 4217 currency code.","enum":["EUR","USD","GBP","CHF","JPY","CAD","AUD","CZK","PLN","HUF","RON","BGN","SEK","DKK","NOK","ISK","HRK","CNY","KRW","INR","IDR","THB","VND","PHP","MYR","SGD","HKD","TWD","NZD","AED","SAR","ILS","TRY","ZAR","EGP","NGN","KES","BRL","MXN","ARS","CLP","COP","PEN","UAH","GEL","KZT","RSD","BAM","MKD","ALL","MDL"]},"isPrimary":{"type":"boolean","description":"The account a document is paid to when it names no `bankAccountId`."},"isForeign":{"type":"boolean","description":"An account held outside Slovakia."},"autoPaymentMatching":{"type":"boolean","description":"Imported statements of this account are matched to documents automatically."}},"required":["id","iban","currency","isPrimary"],"additionalProperties":true},"Webhook":{"type":"object","description":"A webhook endpoint. Never carries its secret.","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","description":"Where the events are POSTed.","format":"uri"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string"},"description":"Events it receives."},"isActive":{"type":"boolean","description":"`false` while paused, by hand or automatically."},"consecutiveFailures":{"type":"integer","description":"Terminal failures since the last 2xx."},"disabledAt":{"type":["string","null"],"format":"date-time"},"disabledReason":{"type":["string","null"],"description":"Why it was switched off."},"lastSuccessAt":{"type":["string","null"],"format":"date-time"},"lastFailureAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","url","events","isActive"],"additionalProperties":true},"WebhookWithSecret":{"type":"object","description":"A webhook endpoint with its signing secret.","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","description":"Where the events are POSTed.","format":"uri"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string"},"description":"Events it receives."},"isActive":{"type":"boolean","description":"`false` while paused, by hand or automatically."},"consecutiveFailures":{"type":"integer","description":"Terminal failures since the last 2xx."},"disabledAt":{"type":["string","null"],"format":"date-time"},"disabledReason":{"type":["string","null"],"description":"Why it was switched off."},"lastSuccessAt":{"type":["string","null"],"format":"date-time"},"lastFailureAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"secret":{"type":"string","description":"Signing secret, `whsec_…`, answered only here and on rotation. Verify `x-vporiadku-signature` with it."}},"required":["id","url","events","isActive","secret"],"additionalProperties":true},"WebhookDelivery":{"type":"object","description":"One delivery of one event to one endpoint.","properties":{"id":{"type":"string","format":"uuid"},"event":{"type":"string"},"status":{"type":"string","description":"Lifecycle of the delivery.","enum":["pending","delivered","failed","dead_lettered"]},"attempts":{"type":"integer"},"responseStatus":{"type":["integer","null"],"description":"What the endpoint answered."},"durationMs":{"type":["integer","null"]},"lastAttemptAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","event","status"],"additionalProperties":true},"WebhookTestResult":{"type":"object","properties":{"dispatched":{"type":"boolean","description":"`true` when the ping was sent."},"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"},"description":"The delivery of the ping, with how the endpoint answered."}},"required":["dispatched","deliveries"],"additionalProperties":true},"InvoiceList":{"type":"object","description":"One page of documents.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"total":{"type":"integer","description":"Items matching the request, across all pages."},"page":{"type":"integer","description":"The 1-based page this response holds."},"limit":{"type":"integer","description":"The page size the server applied."}},"required":["data","total","page","limit"],"additionalProperties":true},"PaymentList":{"type":"object","description":"One page of payments.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}},"total":{"type":"integer","description":"Items matching the request, across all pages."},"page":{"type":"integer","description":"The 1-based page this response holds."},"limit":{"type":"integer","description":"The page size the server applied."}},"required":["data","total","page","limit"],"additionalProperties":true},"ClientList":{"type":"object","description":"One page of clients.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Client"}},"total":{"type":"integer","description":"Items matching the request, across all pages."},"page":{"type":"integer","description":"The 1-based page this response holds."},"limit":{"type":"integer","description":"The page size the server applied."}},"required":["data","total","page","limit"],"additionalProperties":true},"ItemList":{"type":"object","description":"One page of catalogue items.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Item"}},"total":{"type":"integer","description":"Items matching the request, across all pages."},"page":{"type":"integer","description":"The 1-based page this response holds."},"limit":{"type":"integer","description":"The page size the server applied."}},"required":["data","total","page","limit"],"additionalProperties":true},"ExpenseList":{"type":"object","description":"One page of expenses.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Expense"}},"total":{"type":"integer","description":"Items matching the request, across all pages."},"page":{"type":"integer","description":"The 1-based page this response holds."},"limit":{"type":"integer","description":"The page size the server applied."}},"required":["data","total","page","limit"],"additionalProperties":true},"ReceivedInvoiceList":{"type":"object","description":"One page of received e-invoices.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReceivedInvoice"}},"total":{"type":"integer","description":"Items matching the request, across all pages."},"page":{"type":"integer","description":"The 1-based page this response holds."},"limit":{"type":"integer","description":"The page size the server applied."}},"required":["data","total","page","limit"],"additionalProperties":true},"RecurringInvoiceList":{"type":"object","description":"One page of schedules.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RecurringInvoice"}},"total":{"type":"integer","description":"Items matching the request, across all pages."},"page":{"type":"integer","description":"The 1-based page this response holds."},"limit":{"type":"integer","description":"The page size the server applied."}},"required":["data","total","page","limit"],"additionalProperties":true},"CompanyList":{"type":"object","description":"One page of issuer profiles.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Company"}},"total":{"type":"integer","description":"Items matching the request, across all pages."},"page":{"type":"integer","description":"The 1-based page this response holds."},"limit":{"type":"integer","description":"The page size the server applied."}},"required":["data","total","page","limit"],"additionalProperties":true},"BankAccountList":{"type":"object","description":"One page of bank accounts.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BankAccount"}},"total":{"type":"integer","description":"Items matching the request, across all pages."},"page":{"type":"integer","description":"The 1-based page this response holds."},"limit":{"type":"integer","description":"The page size the server applied."}},"required":["data","total","page","limit"],"additionalProperties":true},"WebhookList":{"type":"object","description":"One page of webhook endpoints.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"total":{"type":"integer","description":"Items matching the request, across all pages."},"page":{"type":"integer","description":"The 1-based page this response holds."},"limit":{"type":"integer","description":"The page size the server applied."}},"required":["data","total","page","limit"],"additionalProperties":true},"WebhookEnvelope":{"type":"object","description":"Every delivery has this envelope; only `data` differs per event.","properties":{"id":{"type":"string","description":"Unique per event occurrence; stable across retries."},"event":{"type":"string","description":"Catalogue name, e.g. `invoice.paid`."},"apiVersion":{"type":"string","description":"Version of the envelope.","examples":["2026-07-30"]},"schemaVersion":{"type":"integer","description":"Version of this event's `data`. Branch on this."},"occurredAt":{"type":"string","format":"date-time","description":"When the business fact happened."},"createdAt":{"type":"string","format":"date-time","description":"Deprecated alias of `occurredAt`."},"workspaceId":{"type":"string","format":"uuid"},"idempotencyKey":{"type":"string","description":"Stable key of the business fact; deduplicate on it."},"attempt":{"type":"integer","description":"1 on the first try, incrementing on each retry."},"data":{"type":"object","additionalProperties":true,"description":"Event payload. Never contains a secret."}},"required":["id","event","apiVersion","schemaVersion","occurredAt","workspaceId","idempotencyKey","attempt","data"],"additionalProperties":true},"CreateInvoice":{"type":"object","properties":{"companyId":{"type":"string","format":"uuid"},"clientId":{"type":"string","format":"uuid"},"invoiceNumber":{"maxLength":50,"type":"string","pattern":"^(?=.*\\d)[A-Za-z0-9/\\-.]{1,50}$"},"documentType":{"enum":["invoice","proforma","advance","credit_note","debit_note","quote","delivery_note","order_received","order_sent","cancellation","payment_tax_document"],"type":"string"},"issueDate":{"type":"string","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dueDate":{"type":"string","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"supplyDate":{"type":"string","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"status":{"enum":["draft","issued","sent","pending","partially_paid","paid","overdue","cancelled","accepted","rejected","expired","confirmed","delivered","completed"],"type":"string"},"totalNet":{"type":"number"},"totalVat":{"type":"number"},"totalGross":{"type":"number"},"amountDue":{"type":"number"},"currency":{"enum":["EUR","USD","GBP","CHF","JPY","CAD","AUD","CZK","PLN","HUF","RON","BGN","SEK","DKK","NOK","ISK","HRK","CNY","KRW","INR","IDR","THB","VND","PHP","MYR","SGD","HKD","TWD","NZD","AED","SAR","ILS","TRY","ZAR","EGP","NGN","KES","BRL","MXN","ARS","CLP","COP","PEN","UAH","GEL","KZT","RSD","BAM","MKD","ALL","MDL"],"type":"string"},"paymentTerms":{"type":"string"},"paymentMethod":{"type":"string"},"note":{"type":"string"},"description":{"type":"string"},"orderNumber":{"type":"string"},"contractNumber":{"type":"string"},"openingText":{"type":"string"},"closingText":{"type":"string"},"internalNote":{"type":"string"},"variableSymbol":{"type":"string"},"dueDays":{"maximum":3650,"minimum":0,"type":"number"},"exchangeRate":{"maximum":999999.9999,"minimum":0.0001,"type":"number","description":"At most 6 decimal places."},"requiredVatText":{"type":"string"},"documentLanguage":{"enum":["sk","uk","en","cs","de","ru"],"type":"string"},"bankAccountId":{"type":"string","format":"uuid"},"items":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/InvoiceLineInput"}},"tags":{"type":"array","items":{"type":"string"}},"hasRetainer":{"type":"boolean"},"retainerAmount":{"maximum":9999999999,"minimum":0,"type":"number","description":"At most 2 decimal places."},"hasDocumentDiscount":{"type":"boolean"},"documentDiscountPercent":{"maximum":100,"minimum":0,"type":"number","description":"At most 2 decimal places."},"hasAdvanceDeduction":{"type":"boolean"},"advanceDeductionAmount":{"maximum":9999999999,"minimum":0,"type":"number","description":"At most 2 decimal places."},"showStampSignature":{"type":"boolean"},"contactPersonName":{"type":"string"},"contactPersonEmail":{"type":"string"},"contactPersonPhone":{"type":"string"},"relatedInvoiceId":{"type":"string","format":"uuid"}},"required":["issueDate","dueDate"],"additionalProperties":false},"InvoiceLineInput":{"type":"object","properties":{"name":{"maxLength":255,"minLength":1,"type":"string"},"description":{"maxLength":2000,"type":"string"},"quantity":{"maximum":9999999999,"minimum":-9999999999,"type":"number","description":"At most 4 decimal places."},"unit":{"maxLength":20,"type":"string"},"unitPrice":{"maximum":9999999999,"minimum":-9999999999,"type":"number","description":"At most 4 decimal places."},"vatRate":{"maximum":100,"minimum":0,"type":"number","description":"At most 2 decimal places."},"discountPercent":{"maximum":100,"minimum":0,"type":"number","description":"At most 2 decimal places."},"totalNet":{"type":"number"},"totalVat":{"type":"number"},"totalGross":{"type":"number"}},"required":["name","quantity","unitPrice"],"additionalProperties":false},"UpdateInvoice":{"type":"object","properties":{"companyId":{"type":"string","format":"uuid"},"clientId":{"type":"string","format":"uuid"},"invoiceNumber":{"maxLength":50,"type":"string","pattern":"^(?=.*\\d)[A-Za-z0-9/\\-.]{1,50}$"},"documentType":{"enum":["invoice","proforma","advance","credit_note","debit_note","quote","delivery_note","order_received","order_sent","cancellation","payment_tax_document"],"type":"string"},"issueDate":{"type":"string","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dueDate":{"type":"string","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"supplyDate":{"type":"string","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"status":{"enum":["draft","issued","sent","pending","partially_paid","paid","overdue","cancelled","accepted","rejected","expired","confirmed","delivered","completed"],"type":"string"},"totalNet":{"type":"number"},"totalVat":{"type":"number"},"totalGross":{"type":"number"},"amountDue":{"type":"number"},"currency":{"enum":["EUR","USD","GBP","CHF","JPY","CAD","AUD","CZK","PLN","HUF","RON","BGN","SEK","DKK","NOK","ISK","HRK","CNY","KRW","INR","IDR","THB","VND","PHP","MYR","SGD","HKD","TWD","NZD","AED","SAR","ILS","TRY","ZAR","EGP","NGN","KES","BRL","MXN","ARS","CLP","COP","PEN","UAH","GEL","KZT","RSD","BAM","MKD","ALL","MDL"],"type":"string"},"paymentTerms":{"type":"string"},"paymentMethod":{"type":"string"},"note":{"type":"string"},"items":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/InvoiceLineInput"}},"description":{"type":"string"},"orderNumber":{"type":"string"},"contractNumber":{"type":"string"},"openingText":{"type":"string"},"closingText":{"type":"string"},"internalNote":{"type":"string"},"variableSymbol":{"type":"string"},"dueDays":{"maximum":3650,"minimum":0,"type":"number"},"exchangeRate":{"maximum":999999.9999,"minimum":0.0001,"type":"number","description":"At most 6 decimal places."},"requiredVatText":{"type":"string"},"documentLanguage":{"enum":["sk","uk","en","cs","de","ru"],"type":"string"},"bankAccountId":{"type":"string","format":"uuid"},"tags":{"type":"array","items":{"type":"string"}},"hasRetainer":{"type":"boolean"},"retainerAmount":{"maximum":9999999999,"minimum":0,"type":"number","description":"At most 2 decimal places."},"hasDocumentDiscount":{"type":"boolean"},"documentDiscountPercent":{"maximum":100,"minimum":0,"type":"number","description":"At most 2 decimal places."},"hasAdvanceDeduction":{"type":"boolean"},"advanceDeductionAmount":{"maximum":9999999999,"minimum":0,"type":"number","description":"At most 2 decimal places."},"showStampSignature":{"type":"boolean"},"contactPersonName":{"type":"string"},"contactPersonEmail":{"type":"string"},"contactPersonPhone":{"type":"string"},"relatedInvoiceId":{"type":"string","format":"uuid"},"validUntil":{"type":"string","description":"ISO 8601 date, e.g. 2026-10-12."},"isLocked":{"type":"boolean"},"isSent":{"type":"boolean"},"sentAt":{"type":"string","description":"ISO 8601 date, e.g. 2026-10-12."}},"additionalProperties":false},"IssueInvoice":{"type":"object","properties":{"number":{"maxLength":50,"type":"string","pattern":"^(?=.*\\d)[A-Za-z0-9/\\-.]{1,50}$"},"issueDate":{"type":"string","description":"ISO 8601 date, e.g. 2026-10-12."}},"additionalProperties":false},"CreateCreditNote":{"type":"object","properties":{"reason":{"maxLength":500,"type":"string"},"issueDate":{"type":"string","description":"ISO 8601 date, e.g. 2026-10-12."},"items":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/CreditNoteLineInput"}}},"additionalProperties":false},"CreditNoteLineInput":{"type":"object","properties":{"name":{"maxLength":255,"minLength":1,"type":"string"},"description":{"maxLength":2000,"type":"string"},"quantity":{"maximum":9999999999,"minimum":-9999999999,"type":"number","description":"At most 4 decimal places."},"unit":{"maxLength":20,"type":"string"},"unitPrice":{"maximum":9999999999,"minimum":-9999999999,"type":"number","description":"At most 4 decimal places."},"vatRate":{"maximum":100,"minimum":0,"type":"number","description":"At most 2 decimal places."},"discountPercent":{"maximum":100,"minimum":0,"type":"number","description":"At most 2 decimal places."},"totalNet":{"type":"number"},"totalVat":{"type":"number"},"totalGross":{"type":"number"}},"required":["name","quantity","unitPrice"],"additionalProperties":false},"CancelInvoice":{"type":"object","properties":{"reason":{"maxLength":500,"type":"string"},"issueDate":{"type":"string","description":"ISO 8601 date, e.g. 2026-10-12."}},"additionalProperties":false},"CreatePayment":{"type":"object","properties":{"amount":{"maximum":9999999999,"minimum":0.01,"type":"number"},"paymentDate":{"type":"string","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"paymentMethod":{"enum":["cash","bank_transfer","card","paypal","other"],"type":"string"},"note":{"maxLength":500,"type":"string"},"allowOverpayment":{"type":"boolean"}},"required":["amount","paymentDate"],"additionalProperties":false},"MarkInvoicePaid":{"type":"object","properties":{"paymentDate":{"type":"string","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"paymentMethod":{"enum":["cash","bank_transfer","card","paypal","other"],"type":"string"}},"additionalProperties":false},"CreateClient":{"type":"object","properties":{"name":{"maxLength":200,"minLength":1,"type":"string"},"email":{"type":"string","format":"email"},"contactPerson":{"maxLength":200,"type":"string"},"cashAccountingMode":{"enum":["inherit","enabled","disabled"],"type":"string"},"documentLanguage":{"enum":["sk","uk","en","cs","de","ru"],"type":"string"},"phone":{"maxLength":40,"type":"string"},"iban":{"maxLength":34,"type":"string"},"ico":{"maxLength":32,"type":"string"},"dic":{"maxLength":32,"type":"string"},"icDph":{"maxLength":32,"type":"string"},"addressJson":{"$ref":"#/components/schemas/PostalAddressInput"},"postalAddressJson":{"$ref":"#/components/schemas/PostalAddressInput"},"contacts":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/ClientContactInput"}}},"required":["name"],"additionalProperties":false},"PostalAddressInput":{"type":"object","properties":{"street":{"maxLength":200,"type":"string"},"city":{"maxLength":200,"type":"string"},"zip":{"maxLength":200,"type":"string"},"country":{"maxLength":200,"type":"string"}},"additionalProperties":false},"ClientContactInput":{"type":"object","properties":{"type":{"enum":["email","phone","mobile","fax","other"],"type":"string"},"value":{"maxLength":200,"minLength":1,"type":"string"},"label":{"maxLength":80,"type":"string"},"isPrimary":{"type":"boolean"}},"required":["type","value"],"additionalProperties":false},"UpdateClient":{"type":"object","properties":{"name":{"maxLength":200,"minLength":1,"type":"string"},"email":{"type":"string","format":"email"},"contactPerson":{"maxLength":200,"type":"string"},"cashAccountingMode":{"enum":["inherit","enabled","disabled"],"type":"string"},"documentLanguage":{"enum":["sk","uk","en","cs","de","ru"],"type":"string"},"phone":{"maxLength":40,"type":"string"},"iban":{"maxLength":34,"type":"string"},"ico":{"maxLength":32,"type":"string"},"dic":{"maxLength":32,"type":"string"},"icDph":{"maxLength":32,"type":"string"},"addressJson":{"$ref":"#/components/schemas/PostalAddressInput"},"postalAddressJson":{"$ref":"#/components/schemas/PostalAddressInput"},"contacts":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/ClientContactInput"}}},"additionalProperties":false},"CreateItem":{"type":"object","properties":{"sku":{"maxLength":64,"type":"string"},"catalogueNumber":{"maxLength":64,"type":"string"},"name":{"maxLength":200,"minLength":1,"type":"string"},"description":{"maxLength":2000,"type":"string"},"unit":{"maxLength":20,"type":"string"},"unitPrice":{"maximum":99999999,"minimum":0,"type":"number","description":"At most 2 decimal places."},"vatRate":{"maximum":100,"minimum":0,"type":"number","description":"At most 2 decimal places."},"currency":{"enum":["EUR","USD","GBP","CHF","JPY","CAD","AUD","CZK","PLN","HUF","RON","BGN","SEK","DKK","NOK","ISK","HRK","CNY","KRW","INR","IDR","THB","VND","PHP","MYR","SGD","HKD","TWD","NZD","AED","SAR","ILS","TRY","ZAR","EGP","NGN","KES","BRL","MXN","ARS","CLP","COP","PEN","UAH","GEL","KZT","RSD","BAM","MKD","ALL","MDL"],"type":"string"},"category":{"maxLength":100,"type":"string"},"isActive":{"type":"boolean"},"purchasePrice":{"maximum":99999999,"minimum":0,"type":"number","description":"At most 2 decimal places."},"stockQuantity":{"maximum":99999999,"minimum":-99999999,"type":"number","description":"At most 3 decimal places."},"tracksStock":{"type":"boolean"},"lowStockThreshold":{"maximum":99999999,"minimum":0,"type":"number","description":"At most 3 decimal places."},"defaultWarehouseId":{"type":"string","format":"uuid"},"barcode":{"maxLength":64,"type":"string"},"sellInMultiplesOf":{"maximum":1000000,"minimum":0,"type":"number","description":"At most 4 decimal places."}},"required":["name"],"additionalProperties":false},"UpdateItem":{"type":"object","properties":{"sku":{"maxLength":64,"type":"string"},"catalogueNumber":{"maxLength":64,"type":"string"},"name":{"maxLength":200,"minLength":1,"type":"string"},"description":{"maxLength":2000,"type":"string"},"unit":{"maxLength":20,"type":"string"},"unitPrice":{"maximum":99999999,"minimum":0,"type":"number","description":"At most 2 decimal places."},"vatRate":{"maximum":100,"minimum":0,"type":"number","description":"At most 2 decimal places."},"currency":{"enum":["EUR","USD","GBP","CHF","JPY","CAD","AUD","CZK","PLN","HUF","RON","BGN","SEK","DKK","NOK","ISK","HRK","CNY","KRW","INR","IDR","THB","VND","PHP","MYR","SGD","HKD","TWD","NZD","AED","SAR","ILS","TRY","ZAR","EGP","NGN","KES","BRL","MXN","ARS","CLP","COP","PEN","UAH","GEL","KZT","RSD","BAM","MKD","ALL","MDL"],"type":"string"},"category":{"maxLength":100,"type":"string"},"isActive":{"type":"boolean"},"purchasePrice":{"maximum":99999999,"minimum":0,"type":"number","description":"At most 2 decimal places."},"stockQuantity":{"maximum":99999999,"minimum":-99999999,"type":"number","description":"At most 3 decimal places."},"tracksStock":{"type":"boolean"},"lowStockThreshold":{"maximum":99999999,"minimum":0,"type":"number","description":"At most 3 decimal places."},"defaultWarehouseId":{"type":"string","format":"uuid"},"barcode":{"maxLength":64,"type":"string"},"sellInMultiplesOf":{"maximum":1000000,"minimum":0,"type":"number","description":"At most 4 decimal places."}},"additionalProperties":false},"CreateExpense":{"type":"object","properties":{"supplierId":{"type":"string","format":"uuid"},"supplierName":{"maxLength":200,"type":"string"},"supplierIco":{"type":"string","pattern":"^\\d{8}$"},"supplierIcDph":{"maxLength":20,"type":"string"},"documentNumber":{"maxLength":60,"minLength":1,"type":"string"},"variableSymbol":{"maxLength":20,"type":"string"},"constantSymbol":{"maxLength":10,"type":"string"},"specificSymbol":{"maxLength":20,"type":"string"},"issueDate":{"type":"string","description":"ISO 8601 date, e.g. 2026-10-12."},"deliveryDate":{"type":"string","description":"ISO 8601 date, e.g. 2026-10-12."},"dueDate":{"type":"string","description":"ISO 8601 date, e.g. 2026-10-12."},"receivedDate":{"type":"string","description":"ISO 8601 date, e.g. 2026-10-12."},"status":{"enum":["draft","pending","partially_paid","paid","overdue","cancelled"],"type":"string"},"category":{"enum":["material","goods","services","subcontractors","rent","energy","telecom","software","marketing","travel","fuel","vehicle","office","equipment","education","insurance","bank_fees","taxes_fees","representation","other"],"type":"string"},"currency":{"enum":["EUR","USD","GBP","CHF","JPY","CAD","AUD","CZK","PLN","HUF","RON","BGN","SEK","DKK","NOK","ISK","HRK","CNY","KRW","INR","IDR","THB","VND","PHP","MYR","SGD","HKD","TWD","NZD","AED","SAR","ILS","TRY","ZAR","EGP","NGN","KES","BRL","MXN","ARS","CLP","COP","PEN","UAH","GEL","KZT","RSD","BAM","MKD","ALL","MDL"],"type":"string"},"exchangeRate":{"maximum":999999.9999,"minimum":0.0001,"type":"number","description":"At most 6 decimal places."},"items":{"type":"array","maxItems":200,"items":{"$ref":"#/components/schemas/ExpenseLineInput"}},"totalNet":{"maximum":100000000,"minimum":-100000000,"type":"number","description":"At most 2 decimal places."},"totalVat":{"maximum":100000000,"minimum":-100000000,"type":"number","description":"At most 2 decimal places."},"totalGross":{"maximum":100000000,"minimum":-100000000,"type":"number","description":"At most 2 decimal places."},"vatBreakdown":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/ExpenseVatBreakdownInput"}},"vatDeductible":{"type":"boolean"},"vatDeductionPercent":{"maximum":100,"minimum":0,"type":"number","description":"At most 2 decimal places."},"kvSection":{"enum":["B1","B2","B3","none"],"type":"string"},"correctionType":{"enum":["credit_note","debit_note"],"type":"string"},"correctedExpenseId":{"type":"string","format":"uuid"},"correctedDocumentNumber":{"maxLength":60,"type":"string"},"taxDeductible":{"type":"boolean"},"paymentMethod":{"enum":["cash","bank_transfer","card","paypal","other"],"type":"string"},"note":{"maxLength":4000,"type":"string"},"internalNote":{"maxLength":4000,"type":"string"},"attachmentUrl":{"maxLength":500,"type":"string"},"attachmentName":{"maxLength":255,"type":"string"},"attachmentMimeType":{"maxLength":120,"type":"string"}},"required":["documentNumber","issueDate"],"additionalProperties":false},"ExpenseLineInput":{"type":"object","properties":{"name":{"maxLength":300,"minLength":1,"type":"string"},"description":{"maxLength":2000,"type":"string"},"quantity":{"maximum":1000000,"minimum":-1000000,"type":"number","description":"At most 3 decimal places."},"unit":{"maxLength":20,"type":"string"},"unitPrice":{"maximum":100000000,"minimum":-100000000,"type":"number","description":"At most 2 decimal places."},"vatRate":{"maximum":100,"minimum":0,"type":"number","description":"At most 2 decimal places."},"discountPercent":{"maximum":100,"minimum":0,"type":"number","description":"At most 2 decimal places."},"vatAmountOverride":{"maximum":100000000,"minimum":-100000000,"type":"number","description":"At most 2 decimal places."}},"required":["name"],"additionalProperties":false},"ExpenseVatBreakdownInput":{"type":"object","properties":{"rate":{"maximum":100,"minimum":0,"type":"number","description":"At most 2 decimal places."},"base":{"maximum":100000000,"minimum":-100000000,"type":"number","description":"At most 2 decimal places."},"vat":{"maximum":100000000,"minimum":-100000000,"type":"number","description":"At most 2 decimal places."}},"required":["rate","base","vat"],"additionalProperties":false},"UpdateExpense":{"type":"object","properties":{"needsReview":{"type":"boolean"},"supplierId":{"type":"string","format":"uuid"},"supplierName":{"maxLength":200,"type":"string"},"supplierIco":{"type":"string","pattern":"^\\d{8}$"},"supplierIcDph":{"maxLength":20,"type":"string"},"documentNumber":{"maxLength":60,"minLength":1,"type":"string"},"variableSymbol":{"maxLength":20,"type":"string"},"constantSymbol":{"maxLength":10,"type":"string"},"specificSymbol":{"maxLength":20,"type":"string"},"issueDate":{"type":"string","description":"ISO 8601 date, e.g. 2026-10-12."},"deliveryDate":{"type":"string","description":"ISO 8601 date, e.g. 2026-10-12."},"dueDate":{"type":"string","description":"ISO 8601 date, e.g. 2026-10-12."},"receivedDate":{"type":"string","description":"ISO 8601 date, e.g. 2026-10-12."},"status":{"enum":["draft","pending","partially_paid","paid","overdue","cancelled"],"type":"string"},"category":{"enum":["material","goods","services","subcontractors","rent","energy","telecom","software","marketing","travel","fuel","vehicle","office","equipment","education","insurance","bank_fees","taxes_fees","representation","other"],"type":"string"},"currency":{"enum":["EUR","USD","GBP","CHF","JPY","CAD","AUD","CZK","PLN","HUF","RON","BGN","SEK","DKK","NOK","ISK","HRK","CNY","KRW","INR","IDR","THB","VND","PHP","MYR","SGD","HKD","TWD","NZD","AED","SAR","ILS","TRY","ZAR","EGP","NGN","KES","BRL","MXN","ARS","CLP","COP","PEN","UAH","GEL","KZT","RSD","BAM","MKD","ALL","MDL"],"type":"string"},"exchangeRate":{"maximum":999999.9999,"minimum":0.0001,"type":"number","description":"At most 6 decimal places."},"items":{"type":"array","maxItems":200,"items":{"$ref":"#/components/schemas/ExpenseLineInput"}},"totalNet":{"maximum":100000000,"minimum":-100000000,"type":"number","description":"At most 2 decimal places."},"totalVat":{"maximum":100000000,"minimum":-100000000,"type":"number","description":"At most 2 decimal places."},"totalGross":{"maximum":100000000,"minimum":-100000000,"type":"number","description":"At most 2 decimal places."},"vatBreakdown":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/ExpenseVatBreakdownInput"}},"vatDeductible":{"type":"boolean"},"vatDeductionPercent":{"maximum":100,"minimum":0,"type":"number","description":"At most 2 decimal places."},"kvSection":{"enum":["B1","B2","B3","none"],"type":"string"},"correctionType":{"enum":["credit_note","debit_note"],"type":"string"},"correctedExpenseId":{"type":"string","format":"uuid"},"correctedDocumentNumber":{"maxLength":60,"type":"string"},"taxDeductible":{"type":"boolean"},"paymentMethod":{"enum":["cash","bank_transfer","card","paypal","other"],"type":"string"},"note":{"maxLength":4000,"type":"string"},"internalNote":{"maxLength":4000,"type":"string"},"attachmentUrl":{"maxLength":500,"type":"string"},"attachmentName":{"maxLength":255,"type":"string"},"attachmentMimeType":{"maxLength":120,"type":"string"}},"additionalProperties":false},"CreateWebhook":{"type":"object","properties":{"url":{"maxLength":2048,"type":"string","format":"uri"},"description":{"maxLength":120,"type":"string"},"events":{"type":"array","uniqueItems":true,"maxItems":35,"minItems":1,"items":{"enum":["invoice.created","invoice.updated","invoice.sent","invoice.viewed","invoice.paid","invoice.overdue","invoice.cancelled","credit_note.created","quote.created","quote.accepted","quote.rejected","quote.expired","delivery_note.created","order.created","payment.recorded","payment.matched","expense.created","expense.updated","expense.paid","client.created","supplier.created","item.created","einvoice.sent","einvoice.delivered","einvoice.failed","einvoice.received","bank_statement.imported","bank_feed.synced","bank_feed.consent_expiring","recurring_invoice.generated","recurring_invoice.failed","vat_report.generated","subscription.updated","team.member_joined","ping"],"type":"string"}},"isActive":{"type":"boolean"}},"required":["url","events"],"additionalProperties":false},"UpdateWebhook":{"type":"object","properties":{"url":{"maxLength":2048,"type":"string","format":"uri"},"description":{"maxLength":120,"type":"string"},"events":{"type":"array","uniqueItems":true,"maxItems":35,"minItems":1,"items":{"enum":["invoice.created","invoice.updated","invoice.sent","invoice.viewed","invoice.paid","invoice.overdue","invoice.cancelled","credit_note.created","quote.created","quote.accepted","quote.rejected","quote.expired","delivery_note.created","order.created","payment.recorded","payment.matched","expense.created","expense.updated","expense.paid","client.created","supplier.created","item.created","einvoice.sent","einvoice.delivered","einvoice.failed","einvoice.received","bank_statement.imported","bank_feed.synced","bank_feed.consent_expiring","recurring_invoice.generated","recurring_invoice.failed","vat_report.generated","subscription.updated","team.member_joined","ping"],"type":"string"}},"isActive":{"type":"boolean"}},"additionalProperties":false}},"parameters":{"Id":{"name":"id","in":"path","required":true,"description":"UUID of the resource. A malformed one answers 400.","schema":{"type":"string","format":"uuid"}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry. The first request with a key runs; a repeat within 24 hours with the same method, path and body gets the stored response (with `Idempotent-Replayed: true`) and runs nothing. A UUID v4 per logical operation is a good key.","schema":{"type":"string","minLength":1,"maxLength":255}}},"headers":{"RateLimitLimit":{"description":"Requests this key may make per window (120).","schema":{"type":"integer"}},"RateLimitRemaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimitReset":{"description":"Seconds until the window ends and the allowance refills.","schema":{"type":"integer"}},"RetryAfter":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"IdempotentReplayed":{"description":"`true` when the response is replayed from an earlier request with the same `Idempotency-Key`.","schema":{"type":"string","enum":["true"]}}},"responses":{"BadRequest":{"description":"The request is malformed: `VALIDATION_FAILED` (with `details.errors`), `BAD_REQUEST` or `IDEMPOTENCY_KEY_INVALID`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"`UNAUTHORIZED`: the key is missing, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"`API_KEY_SCOPE_MISSING` (the key lacks the scope; `details.required` names it), `FORBIDDEN` (the workspace has no Firma add-on), `FEATURE_NOT_AVAILABLE` or `PLAN_LIMIT_REACHED` (the plan does not include it).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Not in this workspace. An id of another workspace is indistinguishable from one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"The state of the resource refuses the request (e.g. `DOCUMENT_LOCKED`, `INVOICE_ALREADY_PAID`, `INVOICE_NUMBER_ALREADY_EXISTS`), or the `Idempotency-Key` guards another request (`IDEMPOTENCY_KEY_REUSED`) or one still running (`IDEMPOTENCY_KEY_IN_USE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unprocessable":{"description":"A business rule refuses the data, e.g. a VAT rate that is not a Slovak statutory rate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"`RATE_LIMIT_EXCEEDED`: more than 120 requests in 60 seconds on this key, or more than 30 failed authentications from this address. Wait `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServerError":{"description":"`INTERNAL_ERROR`. Nothing internal is exposed. A failed request stores nothing under its `Idempotency-Key`; before retrying a write, check whether it took effect.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"`PDF_RENDERER_BUSY` or `SERVICE_UNAVAILABLE`: retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"fak_…","description":"An API key in the Authorization header."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key","description":"The same API key in the X-API-Key header."},"oauth2":{"type":"oauth2","description":"A partner app's access token (`vpa_…`), obtained with the authorization code flow and PKCE (S256). Revocation: https://api.vporiadku.sk/api/oauth/revoke.","flows":{"authorizationCode":{"authorizationUrl":"https://vporiadku.sk/oauth/authorize","tokenUrl":"https://api.vporiadku.sk/api/oauth/token","refreshUrl":"https://api.vporiadku.sk/api/oauth/token","scopes":{"invoices:read":"Read documents: list, detail, PDF, ISDOC and UBL.","invoices:write":"Create, update and delete drafts, issue, e-mail, remind, credit and cancel documents.","payments:read":"Read the payments recorded on documents.","payments:write":"Record payments, settle documents and delete payments.","clients:read":"Read the client directory.","clients:write":"Create, update and delete clients.","items:read":"Read the catalogue.","items:write":"Create, update and delete catalogue items.","expenses:read":"Read expenses.","expenses:write":"Book, update and delete expenses.","received_invoices:read":"Read received e-invoices and their originals.","recurring_invoices:read":"Read recurring invoice schedules.","company:read":"Read the company profiles.","bank_accounts:read":"Read the bank accounts.","webhooks:read":"Read the webhook endpoints the credential manages.","webhooks:write":"Register, change, test and delete webhook endpoints, for events the other scopes can read."}}}}}}}