{"openapi":"3.1.0","info":{"title":"Fakturanet API","version":"1.0.0","summary":"REST API pro doklady, kontakty, výdaje a exporty.","description":"REST API fakturační aplikace. Uživatelská příručka s rychlým startem a příklady je na https://api.fakturanet.cz.\n\n* Autentizace: API klíč z Nastavení → API klíče v hlavičce `Authorization: Bearer <klíč>` nebo `X-Api-Key`.\n* Data: JSON v UTF-8, peníze jako desetinné řetězce (`\"1210.50\"`), data ve formátu RRRR-MM-DD, časy ISO 8601.\n* Chyby: RFC 9457 `application/problem+json`.\n* POST vyžaduje hlavičku `Idempotency-Key`.\n* Limit 120 požadavků za 60 s na klíč, hlavičky `RateLimit` a `RateLimit-Policy`.","contact":{"name":"Podpora"}},"servers":[{"url":"https://api.fakturanet.cz/v1","description":"Tato instalace"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":[{"name":"Invoices","x-displayName":"Doklady","description":"Faktury, dobropisy, zálohové faktury a nabídky."},{"name":"Contacts","x-displayName":"Kontakty","description":"Odběratelé a dodavatelé."},{"name":"Expenses","x-displayName":"Výdaje","description":"Přijaté doklady."},{"name":"Exports","x-displayName":"Exporty","description":"Hromadné exporty do PDF, ISDOC, XLSX, Pohoda a Money S3."}],"x-problem-types":[{"type":"unauthorized","status":401,"title":"Unauthorized","description":"Chybí API klíč, nebo je neplatný, vypršel či byl zneplatněn. Odpověď obsahuje hlavičku `WWW-Authenticate`."},{"type":"insufficient-scope","status":403,"title":"Insufficient scope","description":"Klíč nemá oprávnění potřebné pro operaci. Vytvořte klíč s daným oprávněním."},{"type":"forbidden","status":403,"title":"Forbidden","description":"Role uživatele, který klíč vytvořil, akci nedovoluje (například role Pouze čtení zapisovat), nebo tento uživatel už ve firmě není."},{"type":"plan-required","status":403,"title":"Plan required","description":"Tarif firmy nezahrnuje potřebnou funkci, například API nebo úpravu vystavených dokladů."},{"type":"not-found","status":404,"title":"Not found","description":"Záznam neexistuje, byl smazán, nebo patří jiné firmě. Stejně tak neznámá cesta."},{"type":"method-not-allowed","status":405,"title":"Method not allowed","description":"Metoda není pro cestu podporovaná. Povolené metody jsou v hlavičce `Allow`."},{"type":"bad-request","status":400,"title":"Bad request","description":"Požadavek nelze zpracovat."},{"type":"malformed-json","status":400,"title":"Malformed JSON","description":"Tělo není platný JSON objekt."},{"type":"invalid-parameter","status":400,"title":"Invalid parameter","description":"Neplatný parametr v adrese, například `limit` nad 100, datum v jiném formátu než RRRR-MM-DD, neznámý `doc_type` nebo `min` s čárkou. Název parametru je v poli `detail`."},{"type":"idempotency-key-required","status":400,"title":"Idempotency key required","description":"POST požadavek nemá platnou hlavičku `Idempotency-Key`: 16–128 znaků z písmen, číslic a `.` `_` `:` `-`."},{"type":"conflict","status":409,"title":"Conflict","description":"Kolize s existujícím záznamem, například duplicitní číslo dokladu."},{"type":"already-issued","status":409,"title":"Already issued","description":"Vystavit lze jen koncept."},{"type":"export-not-ready","status":409,"title":"Export not ready","description":"Export se ještě zpracovává. Opakujte `GET /exports/{id}`, dokud nemá stav `ready`."},{"type":"export-expired","status":410,"title":"Export expired","description":"Soubor exportu je starší než 7 dní. Vytvořte nový export."},{"type":"precondition-failed","status":412,"description":"Záznam se změnil od chvíle, kdy jste ho přečetli s daným `ETag`. Načtěte ho znovu a změnu zopakujte s novým `ETag`."},{"type":"payload-too-large","status":413,"title":"Payload too large","description":"Tělo požadavku je větší než 1 MB."},{"type":"unsupported-media-type","status":415,"title":"Unsupported media type","description":"Tělo musí mít `Content-Type: application/json`."},{"type":"validation-failed","status":422,"title":"Validation failed","description":"Data neprošla kontrolou. Pole `errors` vypíše všechna chybná pole s odkazem (JSON Pointer); kontroly obchodních pravidel (například datum úhrady v budoucnosti nebo více než 3 rozpracované exporty) vrací důvod v poli `detail`."},{"type":"idempotency-key-reused","status":422,"title":"Idempotency key reused","description":"Stejný `Idempotency-Key` už byl použit s jinými daty."},{"type":"rate-limited","status":429,"title":"Too many requests","description":"Překročen limit 120 požadavků za 60 sekund na klíč, nebo 30 požadavků s neplatným klíčem za 60 sekund z jedné IP adresy. Počkejte podle hlavičky `Retry-After`."},{"type":"server-error","status":500,"title":"Server error","description":"Neočekávaná chyba. Při kontaktu s podporou uveďte `request_id`."}],"x-scopes":{"invoices:read":"Číst doklady a stahovat PDF","invoices:write":"Vytvářet, upravovat, vystavovat, hradit a mazat doklady","invoices:send":"Odesílat doklady e-mailem","contacts:read":"Číst kontakty","contacts:write":"Vytvářet, upravovat a mazat kontakty","expenses:read":"Číst výdaje","expenses:write":"Vytvářet, upravovat a mazat výdaje","exports:read":"Číst a stahovat exporty","exports:write":"Vytvářet exporty"},"paths":{"/invoices":{"get":{"operationId":"listInvoices","tags":["Invoices"],"summary":"Seznam dokladů","description":"Doklady firmy (faktury, dobropisy, zálohové faktury, nabídky) bez položek. Smazané se nevrací.\n\nOprávnění klíče: `invoices:read`.","x-required-scope":"invoices:read","responses":{"200":{"description":"Stránka záznamů od nejnovějšího.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Link":{"$ref":"#/components/headers/Link"}},"content":{"application/json":{"schema":{"type":"object","required":["data","meta","links"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"meta":{"$ref":"#/components/schemas/PageMeta"},"links":{"$ref":"#/components/schemas/PageLinks"}}},"example":{"data":[{"id":123,"contact_id":123,"doc_type":"invoice_vat","number":"2026110003","reg_number":"","variable_symbol":"2026110003","constant_symbol":"","specific_symbol":"","order_number":"","issued_by":"","issue_date":"2026-11-18","supply_date":"2026-11-18","due_date":"2026-12-16","payment_method":"bank_transfer","bank_account_id":1,"language":"cs","currency":"CZK","exchange_rate":"1","vat_treatment":"domestic","rounding":"none","show_qr":true,"template":"modern","color":"#172136","prices_include_vat":false,"discount_pct":"0","note":"Splatnost prodloužena na žádost odběratele.","supplier_snapshot":{"name":"Bozkurt Group s.r.o.","company_no":"03662268","vat_no":"CZ03662268","is_vat_payer":true,"street":"Klimentská 1207/10","city":"Praha","zip":"11000","country":"CZ","email":"info@fakturanet.cz","phone":null,"web":"https://fakturanet.cz","register_note":"Zapsaná v obchodním rejstříku vedeném Městským soudem v Praze, oddíl C, vložka 234971."},"customer_snapshot":{"name":"Jan Novák","city":"Praha","country":"CZ","email":"jan.novak@example.com"},"bank_snapshot":{"account_no":"19-2000145399","bank_code":"0800","iban":"CZ6508000000192000145399","swift":"GIBACZPX","currency":"CZK"},"vat_summary":[{"rate":"21","net":"948.00","vat":"199.08","gross":"1147.08"}],"total_net":"948","total_vat":"199.08","total_gross":"1147.08","rounding_amount":"0","paid_amount":"1147.08","status":"issued","paid_at":"2026-11-18T00:00:00+01:00","revision":2,"related_invoice_id":null,"recurring_id":null,"scheduled_date":null,"created_at":"2026-11-18T10:15:00+01:00","updated_at":"2026-11-18T10:15:00+01:00","correction_reason":null,"vies_check":null,"reverse_charge_code":null,"payment_status":"paid","pdf_url":"https://api.fakturanet.cz/v1/invoices/123/pdf","deleted_at":null}],"meta":{"page":1,"limit":20,"total":1,"pages":1},"links":{"next":null,"prev":null}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"parameters":[{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/Limit"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Fulltext v čísle, odběrateli a poznámce."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","unpaid","paid","overdue","future"]},"description":"Stav úhrady: `draft` koncept, `unpaid` nezaplaceno, `paid` zaplaceno, `overdue` po splatnosti, `future` naplánováno – datum vystavení v budoucnu."},{"name":"from","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Date"},"description":"Datum vystavení od (RRRR-MM-DD)."},{"name":"to","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Date"},"description":"Datum vystavení do (RRRR-MM-DD)."},{"name":"contact_id","in":"query","required":false,"schema":{"type":"integer"},"description":"Jen doklady kontaktu."},{"name":"doc_type","in":"query","required":false,"schema":{"type":"string","enum":["invoice_vat","invoice_non_vat","credit_note","reverse_charge","proforma","advance","quote_vat","quote_non_vat"]},"description":"Typ dokladu."},{"name":"payment_method","in":"query","required":false,"schema":{"type":"string","enum":["bank_transfer","cash","cash_on_delivery","card","paypal","mutual_offset"]},"description":"Způsob úhrady."},{"name":"min","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Decimal"},"description":"Částka celkem od."},{"name":"max","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Decimal"},"description":"Částka celkem do."},{"$ref":"#/components/parameters/UpdatedSince"}]},"post":{"operationId":"createInvoice","tags":["Invoices"],"summary":"Vytvořit doklad","description":"Vytvoří koncept, nebo s `\"issue\": true` rovnou vystaví doklad s číslem z číselné řady. Odběratele zadejte přes `contact_id`, nebo objektem `customer` (existující kontakt se najde podle IČO, bez IČO podle názvu; jinak se založí nový). Opakování se stejným `Idempotency-Key` vrátí původní výsledek.\n\nOprávnění klíče: `invoices:write`.","x-required-scope":"invoices:write","responses":{"201":{"description":"Vytvořeno. Hlavička `Location` obsahuje adresu záznamu.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Location":{"$ref":"#/components/headers/Location"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Invoice"}}},"example":{"data":{"id":123,"contact_id":123,"doc_type":"invoice_vat","number":"2026110003","reg_number":"","variable_symbol":"2026110003","constant_symbol":"","specific_symbol":"","order_number":"","issued_by":"","issue_date":"2026-11-18","supply_date":"2026-11-18","due_date":"2026-12-02","payment_method":"bank_transfer","bank_account_id":1,"language":"cs","currency":"CZK","exchange_rate":"1","vat_treatment":"domestic","rounding":"none","show_qr":true,"template":"modern","color":"#172136","prices_include_vat":false,"discount_pct":"0","note":"","supplier_snapshot":{"name":"Bozkurt Group s.r.o.","company_no":"03662268","vat_no":"CZ03662268","is_vat_payer":true,"street":"Klimentská 1207/10","city":"Praha","zip":"11000","country":"CZ","email":"info@fakturanet.cz","phone":null,"web":"https://fakturanet.cz","register_note":"Zapsaná v obchodním rejstříku vedeném Městským soudem v Praze, oddíl C, vložka 234971."},"customer_snapshot":{"name":"Jan Novák","city":"Praha","country":"CZ","email":"jan.novak@example.com"},"bank_snapshot":{"account_no":"19-2000145399","bank_code":"0800","iban":"CZ6508000000192000145399","swift":"GIBACZPX","currency":"CZK"},"vat_summary":[{"rate":"21","net":"948.00","vat":"199.08","gross":"1147.08"}],"total_net":"948","total_vat":"199.08","total_gross":"1147.08","rounding_amount":"0","paid_amount":"0","status":"issued","paid_at":null,"revision":1,"related_invoice_id":null,"recurring_id":null,"scheduled_date":null,"created_at":"2026-11-18T10:15:00+01:00","updated_at":"2026-11-18T10:15:00+01:00","correction_reason":null,"vies_check":null,"reverse_charge_code":null,"payment_status":"unpaid","pdf_url":"https://api.fakturanet.cz/v1/invoices/123/pdf","items":[{"id":1,"position":0,"quantity":"1","unit":"ks","description":"Fakturanet Professional – roční předplatné","vat_rate":"21","unit_price":"948","net":"948","vat":"199.08","gross":"1147.08","discount_pct":"0"}],"deleted_at":null}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCreate"},"example":{"doc_type":"invoice_vat","issue":true,"customer":{"name":"Jan Novák","city":"Praha","country":"CZ","email":"jan.novak@example.com"},"due_date":"2026-12-02","items":[{"description":"Fakturanet Professional – roční předplatné","quantity":"1","unit":"ks","unit_price":"948","vat_rate":"21"}]}}}}}},"/invoices/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"operationId":"getInvoice","tags":["Invoices"],"summary":"Detail dokladu","description":"Vrátí záznam včetně položek.\n\nOprávnění klíče: `invoices:read`.","x-required-scope":"invoices:read","responses":{"200":{"description":"Záznam.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Invoice"}}},"example":{"data":{"id":123,"contact_id":123,"doc_type":"invoice_vat","number":"2026110003","reg_number":"","variable_symbol":"2026110003","constant_symbol":"","specific_symbol":"","order_number":"","issued_by":"","issue_date":"2026-11-18","supply_date":"2026-11-18","due_date":"2026-12-02","payment_method":"bank_transfer","bank_account_id":1,"language":"cs","currency":"CZK","exchange_rate":"1","vat_treatment":"domestic","rounding":"none","show_qr":true,"template":"modern","color":"#172136","prices_include_vat":false,"discount_pct":"0","note":"","supplier_snapshot":{"name":"Bozkurt Group s.r.o.","company_no":"03662268","vat_no":"CZ03662268","is_vat_payer":true,"street":"Klimentská 1207/10","city":"Praha","zip":"11000","country":"CZ","email":"info@fakturanet.cz","phone":null,"web":"https://fakturanet.cz","register_note":"Zapsaná v obchodním rejstříku vedeném Městským soudem v Praze, oddíl C, vložka 234971."},"customer_snapshot":{"name":"Jan Novák","city":"Praha","country":"CZ","email":"jan.novak@example.com"},"bank_snapshot":{"account_no":"19-2000145399","bank_code":"0800","iban":"CZ6508000000192000145399","swift":"GIBACZPX","currency":"CZK"},"vat_summary":[{"rate":"21","net":"948.00","vat":"199.08","gross":"1147.08"}],"total_net":"948","total_vat":"199.08","total_gross":"1147.08","rounding_amount":"0","paid_amount":"0","status":"issued","paid_at":null,"revision":1,"related_invoice_id":null,"recurring_id":null,"scheduled_date":null,"created_at":"2026-11-18T10:15:00+01:00","updated_at":"2026-11-18T10:15:00+01:00","correction_reason":null,"vies_check":null,"reverse_charge_code":null,"payment_status":"unpaid","pdf_url":"https://api.fakturanet.cz/v1/invoices/123/pdf","items":[{"id":1,"position":0,"quantity":"1","unit":"ks","description":"Fakturanet Professional – roční předplatné","vat_rate":"21","unit_price":"948","net":"948","vat":"199.08","gross":"1147.08","discount_pct":"0"}],"deleted_at":null}}}}},"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"},"304":{"$ref":"#/components/responses/NotModified"}},"parameters":[{"$ref":"#/components/parameters/IfNoneMatch"}]},"patch":{"operationId":"updateInvoice","tags":["Invoices"],"summary":"Upravit doklad","description":"Částečná úprava (JSON Merge Patch): neuvedená pole zůstanou beze změny.\n\nOprávnění klíče: `invoices:write`.","x-required-scope":"invoices:write","responses":{"200":{"description":"Upravený záznam.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Invoice"}}},"example":{"data":{"id":123,"contact_id":123,"doc_type":"invoice_vat","number":"2026110003","reg_number":"","variable_symbol":"2026110003","constant_symbol":"","specific_symbol":"","order_number":"","issued_by":"","issue_date":"2026-11-18","supply_date":"2026-11-18","due_date":"2026-12-16","payment_method":"bank_transfer","bank_account_id":1,"language":"cs","currency":"CZK","exchange_rate":"1","vat_treatment":"domestic","rounding":"none","show_qr":true,"template":"modern","color":"#172136","prices_include_vat":false,"discount_pct":"0","note":"Splatnost prodloužena na žádost odběratele.","supplier_snapshot":{"name":"Bozkurt Group s.r.o.","company_no":"03662268","vat_no":"CZ03662268","is_vat_payer":true,"street":"Klimentská 1207/10","city":"Praha","zip":"11000","country":"CZ","email":"info@fakturanet.cz","phone":null,"web":"https://fakturanet.cz","register_note":"Zapsaná v obchodním rejstříku vedeném Městským soudem v Praze, oddíl C, vložka 234971."},"customer_snapshot":{"name":"Jan Novák","city":"Praha","country":"CZ","email":"jan.novak@example.com"},"bank_snapshot":{"account_no":"19-2000145399","bank_code":"0800","iban":"CZ6508000000192000145399","swift":"GIBACZPX","currency":"CZK"},"vat_summary":[{"rate":"21","net":"948.00","vat":"199.08","gross":"1147.08"}],"total_net":"948","total_vat":"199.08","total_gross":"1147.08","rounding_amount":"0","paid_amount":"0","status":"issued","paid_at":null,"revision":2,"related_invoice_id":null,"recurring_id":null,"scheduled_date":null,"created_at":"2026-11-18T10:15:00+01:00","updated_at":"2026-11-18T10:15:00+01:00","correction_reason":null,"vies_check":null,"reverse_charge_code":null,"payment_status":"unpaid","pdf_url":"https://api.fakturanet.cz/v1/invoices/123/pdf","items":[{"id":1,"position":0,"quantity":"1","unit":"ks","description":"Fakturanet Professional – roční předplatné","vat_rate":"21","unit_price":"948","net":"948","vat":"199.08","gross":"1147.08","discount_pct":"0"}],"deleted_at":null}}}}},"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"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceUpdate"},"example":{"due_date":"2026-12-16","note":"Splatnost prodloužena na žádost odběratele."}}}},"parameters":[{"$ref":"#/components/parameters/IfMatch"}]},"delete":{"operationId":"deleteInvoice","tags":["Invoices"],"summary":"Smazat doklad","description":"Smaže doklad. Vystavený doklad se archivuje v revizích; doklad zahrnutý v uloženém přiznání DPH smazat nelze (422).\n\nOprávnění klíče: `invoices:write`.","x-required-scope":"invoices:write","responses":{"204":{"description":"Smazáno.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}},"parameters":[{"$ref":"#/components/parameters/IfMatch"}]}},"/contacts":{"get":{"operationId":"listContacts","tags":["Contacts"],"summary":"Seznam kontaktů","description":"Kontakty seřazené od nejnovějšího.\n\nOprávnění klíče: `contacts:read`.","x-required-scope":"contacts:read","responses":{"200":{"description":"Stránka záznamů od nejnovějšího.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Link":{"$ref":"#/components/headers/Link"}},"content":{"application/json":{"schema":{"type":"object","required":["data","meta","links"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"meta":{"$ref":"#/components/schemas/PageMeta"},"links":{"$ref":"#/components/schemas/PageLinks"}}},"example":{"data":[{"id":123,"name":"Jan Novák","company_no":"","vat_no":"","street":"","city":"Praha","zip":"","country":"CZ","email":"fakturace.novak@example.com","phone":"","web":"","created_at":"2026-11-18T10:15:00+01:00","updated_at":"2026-11-18T10:15:00+01:00","deleted_at":null}],"meta":{"page":1,"limit":20,"total":1,"pages":1},"links":{"next":null,"prev":null}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"parameters":[{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/Limit"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Hledá v názvu, IČO a e-mailu."},{"$ref":"#/components/parameters/UpdatedSince"}]},"post":{"operationId":"createContact","tags":["Contacts"],"summary":"Vytvořit kontakt","description":"Vytvoří záznam. Opakování se stejným `Idempotency-Key` vrátí původní výsledek a nic nezaloží podruhé.\n\nOprávnění klíče: `contacts:write`.","x-required-scope":"contacts:write","responses":{"201":{"description":"Vytvořeno. Hlavička `Location` obsahuje adresu záznamu.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Location":{"$ref":"#/components/headers/Location"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Contact"}}},"example":{"data":{"id":123,"name":"Jan Novák","company_no":"","vat_no":"","street":"","city":"Praha","zip":"","country":"CZ","email":"jan.novak@example.com","phone":"","web":"","created_at":"2026-11-18T10:15:00+01:00","updated_at":"2026-11-18T10:15:00+01:00","deleted_at":null}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactInput","required":["name"]},"example":{"name":"Jan Novák","city":"Praha","country":"CZ","email":"jan.novak@example.com"}}}}}},"/contacts/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"operationId":"getContact","tags":["Contacts"],"summary":"Detail kontaktu","description":"Vrátí záznam včetně položek.\n\nOprávnění klíče: `contacts:read`.","x-required-scope":"contacts:read","responses":{"200":{"description":"Záznam.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Contact"}}},"example":{"data":{"id":123,"name":"Jan Novák","company_no":"","vat_no":"","street":"","city":"Praha","zip":"","country":"CZ","email":"jan.novak@example.com","phone":"","web":"","created_at":"2026-11-18T10:15:00+01:00","updated_at":"2026-11-18T10:15:00+01:00","deleted_at":null}}}}},"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"},"304":{"$ref":"#/components/responses/NotModified"}},"parameters":[{"$ref":"#/components/parameters/IfNoneMatch"}]},"patch":{"operationId":"updateContact","tags":["Contacts"],"summary":"Upravit kontakt","description":"Částečná úprava (JSON Merge Patch): neuvedená pole zůstanou beze změny.\n\nOprávnění klíče: `contacts:write`.","x-required-scope":"contacts:write","responses":{"200":{"description":"Upravený záznam.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Contact"}}},"example":{"data":{"id":123,"name":"Jan Novák","company_no":"","vat_no":"","street":"","city":"Praha","zip":"","country":"CZ","email":"fakturace.novak@example.com","phone":"","web":"","created_at":"2026-11-18T10:15:00+01:00","updated_at":"2026-11-18T10:15:00+01:00","deleted_at":null}}}}},"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"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactInput"},"example":{"email":"fakturace.novak@example.com"}}}},"parameters":[{"$ref":"#/components/parameters/IfMatch"}]},"delete":{"operationId":"deleteContact","tags":["Contacts"],"summary":"Smazat kontakt","description":"Smaže záznam. Vystavené doklady zůstávají archivované v revizích.\n\nOprávnění klíče: `contacts:write`.","x-required-scope":"contacts:write","responses":{"204":{"description":"Smazáno.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}},"parameters":[{"$ref":"#/components/parameters/IfMatch"}]}},"/expenses":{"get":{"operationId":"listExpenses","tags":["Expenses"],"summary":"Seznam výdajů","description":"Přijaté doklady (výdaje) bez položek.\n\nOprávnění klíče: `expenses:read`.","x-required-scope":"expenses:read","responses":{"200":{"description":"Stránka záznamů od nejnovějšího.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Link":{"$ref":"#/components/headers/Link"}},"content":{"application/json":{"schema":{"type":"object","required":["data","meta","links"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Expense"}},"meta":{"$ref":"#/components/schemas/PageMeta"},"links":{"$ref":"#/components/schemas/PageLinks"}}},"example":{"data":[{"id":123,"supplier_contact_id":123,"supplier_snapshot":{"name":"Jan Novák","company_no":"","vat_no":"","street":"","city":"Praha","zip":"","email":"jan.novak@example.com","phone":"","web":"","country":"CZ"},"number":"V2026110002","supplier_doc_no":"2026-018","issue_date":"2026-11-10","supply_date":"2026-11-10","vat_claim_date":"2026-11-10","due_date":"2026-11-24","currency":"CZK","exchange_rate":"1","note":"Uhrazeno převodem.","total_net":"5000","total_vat":"0","total_gross":"5000","deductible_vat":"0","status":"unpaid","created_at":"2026-11-18T10:15:00+01:00","paid_at":null,"supplier_check":null,"vat_regime":"domestic","reverse_charge_code":null,"updated_at":"2026-11-18T10:15:00+01:00","deleted_at":null}],"meta":{"page":1,"limit":20,"total":1,"pages":1},"links":{"next":null,"prev":null}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"parameters":[{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/Limit"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Fulltext v čísle, dodavateli a poznámce."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["paid","unpaid"]},"description":"Stav úhrady."},{"name":"from","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Date"},"description":"Datum vystavení od."},{"name":"to","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Date"},"description":"Datum vystavení do."},{"$ref":"#/components/parameters/UpdatedSince"}]},"post":{"operationId":"createExpense","tags":["Expenses"],"summary":"Vytvořit výdaj","description":"Vytvoří záznam. Opakování se stejným `Idempotency-Key` vrátí původní výsledek a nic nezaloží podruhé.\n\nOprávnění klíče: `expenses:write`.","x-required-scope":"expenses:write","responses":{"201":{"description":"Vytvořeno. Hlavička `Location` obsahuje adresu záznamu.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Location":{"$ref":"#/components/headers/Location"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Expense"}}},"example":{"data":{"id":123,"supplier_contact_id":123,"supplier_snapshot":{"name":"Jan Novák","company_no":"","vat_no":"","street":"","city":"Praha","zip":"","email":"jan.novak@example.com","phone":"","web":"","country":"CZ"},"number":"V2026110002","supplier_doc_no":"2026-018","issue_date":"2026-11-10","supply_date":"2026-11-10","vat_claim_date":"2026-11-10","due_date":"2026-11-24","currency":"CZK","exchange_rate":"1","note":null,"total_net":"5000","total_vat":"0","total_gross":"5000","deductible_vat":"0","status":"unpaid","created_at":"2026-11-18T10:15:00+01:00","paid_at":null,"supplier_check":null,"vat_regime":"domestic","reverse_charge_code":null,"items":[{"id":1,"position":0,"quantity":"1","unit":"ks","description":"Grafický návrh","vat_rate":"0","unit_price":"5000","net":"5000","vat":"0","gross":"5000","tax_deductible":false,"deduction_pct":"100","deductible_vat":"0"}],"updated_at":"2026-11-18T10:15:00+01:00","deleted_at":null}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseCreate"},"example":{"supplier":{"name":"Jan Novák","city":"Praha","country":"CZ","email":"jan.novak@example.com"},"supplier_doc_no":"2026-018","issue_date":"2026-11-10","supply_date":"2026-11-10","vat_claim_date":"2026-11-10","due_date":"2026-11-24","items":[{"description":"Grafický návrh","quantity":"1","unit":"ks","unit_price":"5000","vat_rate":"0"}]}}}}}},"/expenses/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"operationId":"getExpense","tags":["Expenses"],"summary":"Detail výdaje","description":"Vrátí záznam včetně položek.\n\nOprávnění klíče: `expenses:read`.","x-required-scope":"expenses:read","responses":{"200":{"description":"Záznam.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Expense"}}},"example":{"data":{"id":123,"supplier_contact_id":123,"supplier_snapshot":{"name":"Jan Novák","company_no":"","vat_no":"","street":"","city":"Praha","zip":"","email":"jan.novak@example.com","phone":"","web":"","country":"CZ"},"number":"V2026110002","supplier_doc_no":"2026-018","issue_date":"2026-11-10","supply_date":"2026-11-10","vat_claim_date":"2026-11-10","due_date":"2026-11-24","currency":"CZK","exchange_rate":"1","note":null,"total_net":"5000","total_vat":"0","total_gross":"5000","deductible_vat":"0","status":"unpaid","created_at":"2026-11-18T10:15:00+01:00","paid_at":null,"supplier_check":null,"vat_regime":"domestic","reverse_charge_code":null,"items":[{"id":1,"position":0,"quantity":"1","unit":"ks","description":"Grafický návrh","vat_rate":"0","unit_price":"5000","net":"5000","vat":"0","gross":"5000","tax_deductible":false,"deduction_pct":"100","deductible_vat":"0"}],"updated_at":"2026-11-18T10:15:00+01:00","deleted_at":null}}}}},"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"},"304":{"$ref":"#/components/responses/NotModified"}},"parameters":[{"$ref":"#/components/parameters/IfNoneMatch"}]},"patch":{"operationId":"updateExpense","tags":["Expenses"],"summary":"Upravit výdaj","description":"Částečná úprava (JSON Merge Patch): neuvedená pole zůstanou beze změny.\n\nOprávnění klíče: `expenses:write`.","x-required-scope":"expenses:write","responses":{"200":{"description":"Upravený záznam.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Expense"}}},"example":{"data":{"id":123,"supplier_contact_id":123,"supplier_snapshot":{"name":"Jan Novák","company_no":"","vat_no":"","street":"","city":"Praha","zip":"","email":"jan.novak@example.com","phone":"","web":"","country":"CZ"},"number":"V2026110002","supplier_doc_no":"2026-018","issue_date":"2026-11-10","supply_date":"2026-11-10","vat_claim_date":"2026-11-10","due_date":"2026-11-24","currency":"CZK","exchange_rate":"1","note":"Uhrazeno převodem.","total_net":"5000","total_vat":"0","total_gross":"5000","deductible_vat":"0","status":"unpaid","created_at":"2026-11-18T10:15:00+01:00","paid_at":null,"supplier_check":null,"vat_regime":"domestic","reverse_charge_code":null,"items":[{"id":1,"position":0,"quantity":"1","unit":"ks","description":"Grafický návrh","vat_rate":"0","unit_price":"5000","net":"5000","vat":"0","gross":"5000","tax_deductible":false,"deduction_pct":"100","deductible_vat":"0"}],"updated_at":"2026-11-18T10:15:00+01:00","deleted_at":null}}}}},"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"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseUpdate"},"example":{"note":"Uhrazeno převodem."}}}},"parameters":[{"$ref":"#/components/parameters/IfMatch"}]},"delete":{"operationId":"deleteExpense","tags":["Expenses"],"summary":"Smazat výdaj","description":"Smaže záznam. Vystavené doklady zůstávají archivované v revizích.\n\nOprávnění klíče: `expenses:write`.","x-required-scope":"expenses:write","responses":{"204":{"description":"Smazáno.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}},"parameters":[{"$ref":"#/components/parameters/IfMatch"}]}},"/invoices/{id}/pdf":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"operationId":"getInvoicePdf","tags":["Invoices"],"summary":"Stáhnout PDF","description":"PDF dokladu ve stejné podobě, jakou dostane odběratel.\n\nOprávnění klíče: `invoices:read`.","x-required-scope":"invoices:read","responses":{"200":{"description":"PDF soubor.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"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"}}}},"/invoices/{id}/issue":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"operationId":"issueInvoice","tags":["Invoices"],"summary":"Vystavit koncept","description":"Přidělí číslo z číselné řady (nebo `number` z těla) a koncept vystaví. Tělo je volitelné.\n\nOprávnění klíče: `invoices:write`.","x-required-scope":"invoices:write","responses":{"200":{"description":"Vystavený doklad.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Invoice"}}},"example":{"data":{"id":123,"contact_id":123,"doc_type":"invoice_vat","number":"FV-2026-0042","reg_number":"","variable_symbol":"20260042","constant_symbol":"","specific_symbol":"","order_number":"","issued_by":"","issue_date":"2026-11-18","supply_date":"2026-11-18","due_date":"2026-12-02","payment_method":"bank_transfer","bank_account_id":1,"language":"cs","currency":"CZK","exchange_rate":"1","vat_treatment":"domestic","rounding":"none","show_qr":true,"template":"modern","color":"#172136","prices_include_vat":false,"discount_pct":"0","note":"","supplier_snapshot":{"name":"Bozkurt Group s.r.o.","company_no":"03662268","vat_no":"CZ03662268","is_vat_payer":true,"street":"Klimentská 1207/10","city":"Praha","zip":"11000","country":"CZ","email":"info@fakturanet.cz","phone":null,"web":"https://fakturanet.cz","register_note":"Zapsaná v obchodním rejstříku vedeném Městským soudem v Praze, oddíl C, vložka 234971."},"customer_snapshot":{"name":"Jan Novák","city":"Praha","country":"CZ","email":"jan.novak@example.com"},"bank_snapshot":{"account_no":"19-2000145399","bank_code":"0800","iban":"CZ6508000000192000145399","swift":"GIBACZPX","currency":"CZK"},"vat_summary":[{"rate":"21","net":"948.00","vat":"199.08","gross":"1147.08"}],"total_net":"948","total_vat":"199.08","total_gross":"1147.08","rounding_amount":"0","paid_amount":"0","status":"issued","paid_at":null,"revision":1,"related_invoice_id":null,"recurring_id":null,"scheduled_date":null,"created_at":"2026-11-18T10:15:00+01:00","updated_at":"2026-11-18T10:15:00+01:00","correction_reason":null,"vies_check":null,"reverse_charge_code":null,"payment_status":"unpaid","pdf_url":"https://api.fakturanet.cz/v1/invoices/123/pdf","items":[{"id":1,"position":0,"quantity":"1","unit":"ks","description":"Fakturanet Professional – roční předplatné","vat_rate":"21","unit_price":"948","net":"948","vat":"199.08","gross":"1147.08","discount_pct":"0"}],"deleted_at":null}}}}},"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"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"number":{"type":"string","description":"Vlastní číslo dokladu při vystavení. Bez něj se použije číselná řada.","pattern":"^[\\p{L}\\p{N}/._-]{1,60}$"}}},"example":{"number":"FV-2026-0042"}}}}}},"/invoices/{id}/paid":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"operationId":"recordInvoicePayment","tags":["Invoices"],"summary":"Zaznamenat úhradu","description":"Zaznamená úhradu vystaveného dokladu. Bez `amount` se uhradí celý zbytek; částečné úhrady se sčítají. Bez `paid_at` platí okamžik požadavku, bez `method` způsob úhrady dokladu. Je-li zapnuta EET 2.0 a jde o kontaktní platbu (hotovost, karta, dobírka), tržba se zaeviduje s časem z `paid_at`.\n\nOprávnění klíče: `invoices:write`.","x-required-scope":"invoices:write","responses":{"200":{"description":"Doklad po úhradě.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Invoice"}}},"example":{"data":{"id":123,"contact_id":123,"doc_type":"invoice_vat","number":"2026110003","reg_number":"","variable_symbol":"2026110003","constant_symbol":"","specific_symbol":"","order_number":"","issued_by":"","issue_date":"2026-11-18","supply_date":"2026-11-18","due_date":"2026-12-16","payment_method":"bank_transfer","bank_account_id":1,"language":"cs","currency":"CZK","exchange_rate":"1","vat_treatment":"domestic","rounding":"none","show_qr":true,"template":"modern","color":"#172136","prices_include_vat":false,"discount_pct":"0","note":"Splatnost prodloužena na žádost odběratele.","supplier_snapshot":{"name":"Bozkurt Group s.r.o.","company_no":"03662268","vat_no":"CZ03662268","is_vat_payer":true,"street":"Klimentská 1207/10","city":"Praha","zip":"11000","country":"CZ","email":"info@fakturanet.cz","phone":null,"web":"https://fakturanet.cz","register_note":"Zapsaná v obchodním rejstříku vedeném Městským soudem v Praze, oddíl C, vložka 234971."},"customer_snapshot":{"name":"Jan Novák","city":"Praha","country":"CZ","email":"jan.novak@example.com"},"bank_snapshot":{"account_no":"19-2000145399","bank_code":"0800","iban":"CZ6508000000192000145399","swift":"GIBACZPX","currency":"CZK"},"vat_summary":[{"rate":"21","net":"948.00","vat":"199.08","gross":"1147.08"}],"total_net":"948","total_vat":"199.08","total_gross":"1147.08","rounding_amount":"0","paid_amount":"1147.08","status":"issued","paid_at":"2026-11-18T00:00:00+01:00","revision":2,"related_invoice_id":null,"recurring_id":null,"scheduled_date":null,"created_at":"2026-11-18T10:15:00+01:00","updated_at":"2026-11-18T10:15:00+01:00","correction_reason":null,"vies_check":null,"reverse_charge_code":null,"payment_status":"paid","pdf_url":"https://api.fakturanet.cz/v1/invoices/123/pdf","items":[{"id":1,"position":0,"quantity":"1","unit":"ks","description":"Fakturanet Professional – roční předplatné","vat_rate":"21","unit_price":"948","net":"948","vat":"199.08","gross":"1147.08","discount_pct":"0"}],"deleted_at":null}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"amount":{"$ref":"#/components/schemas/Decimal","description":"Uhrazená částka. Nesmí přesáhnout zbývající částku."},"paid_at":{"anyOf":[{"$ref":"#/components/schemas/Date"},{"$ref":"#/components/schemas/DateTime"}],"description":"Kdy byla platba přijata: datum, nebo čas s časovou zónou (pro EET). Nesmí být v budoucnosti."},"method":{"type":"string","enum":["bank_transfer","cash","cash_on_delivery","card","paypal","mutual_offset"],"description":"Způsob této úhrady, pokud se liší od dokladu. Hodnoty jako u `payment_method`."}},"example":{"amount":"1147.08","paid_at":"2026-11-18T09:30:00+01:00","method":"bank_transfer"}},"example":{"amount":"1147.08","paid_at":"2026-11-18T09:30:00+01:00","method":"bank_transfer"}}}}}},"/invoices/{id}/send":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"operationId":"sendInvoice","tags":["Invoices"],"summary":"Odeslat e-mailem","description":"Zařadí vystavený doklad k odeslání e-mailem s PDF v příloze. Bez těla se použije e-mail odběratele a šablona z Nastavení → E-mailové šablony.\n\nOprávnění klíče: `invoices:send`.","x-required-scope":"invoices:send","responses":{"202":{"description":"E-mail je ve frontě.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/EmailQueued"}}},"example":{"data":{"email_id":1,"status":"queued","recipient":"jan.novak@example.com"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"recipient":{"type":"string","description":"Příjemce. Výchozí e-mail odběratele.","format":"email"},"template":{"type":"string","enum":["invoice","reminder","thank_you"],"description":"Šablona e-mailu. Hodnoty: `invoice` – faktura; `reminder` – upomínka; `thank_you` – poděkování za úhradu.","default":"invoice"},"subject":{"type":"string","description":"Předmět místo šablony.","maxLength":255},"body":{"type":"string","description":"Text místo šablony."}},"example":{"template":"thank_you"}},"example":{"template":"thank_you"}}}}}},"/exports":{"get":{"operationId":"listExports","tags":["Exports"],"summary":"Seznam exportů","description":"Exporty firmy od nejnovějšího.\n\nOprávnění klíče: `exports:read`.","x-required-scope":"exports:read","responses":{"200":{"description":"Stránka exportů.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Link":{"$ref":"#/components/headers/Link"}},"content":{"application/json":{"schema":{"type":"object","required":["data","meta","links"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Export"}},"meta":{"$ref":"#/components/schemas/PageMeta"},"links":{"$ref":"#/components/schemas/PageLinks"}}},"example":{"data":[{"id":123,"kind":"invoices","format":"pohoda","filters":{"from":"2026-11-01","to":"2026-11-30"},"status":"pending","error":null,"expires_at":null,"created_at":"2026-11-18T10:15:00+01:00","processed":0,"total":0,"download_url":null}],"meta":{"page":1,"limit":20,"total":1,"pages":1},"links":{"next":null,"prev":null}}}}},"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"}},"parameters":[{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/Limit"}]},"post":{"operationId":"createExport","tags":["Exports"],"summary":"Vytvořit export","description":"Zařadí export do fronty a hned vrátí 202. Stav sledujte přes `GET /exports/{id}`; jakmile je `ready`, stáhněte soubor z `download_url`.\n\nOprávnění klíče: `exports:write`.","x-required-scope":"exports:write","responses":{"202":{"description":"Export čeká ve frontě.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Location":{"$ref":"#/components/headers/Location"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Export"}}},"example":{"data":{"id":123,"kind":"invoices","format":"pohoda","filters":{"from":"2026-11-01","to":"2026-11-30"},"status":"pending","error":null,"expires_at":null,"created_at":"2026-11-18T10:15:00+01:00","processed":0,"total":0,"download_url":null}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportInput"},"example":{"kind":"invoices","format":"pohoda","filters":{"from":"2026-11-01","to":"2026-11-30"}}}}}}},"/exports/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"operationId":"getExport","tags":["Exports"],"summary":"Stav exportu","description":"Stav a průběh exportu.\n\nOprávnění klíče: `exports:read`.","x-required-scope":"exports:read","responses":{"200":{"description":"Export.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Export"}}},"example":{"data":{"id":123,"kind":"invoices","format":"pohoda","filters":{"from":"2026-11-01","to":"2026-11-30"},"status":"pending","error":null,"expires_at":null,"created_at":"2026-11-18T10:15:00+01:00","processed":0,"total":0,"download_url":null}}}}},"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"},"304":{"$ref":"#/components/responses/NotModified"}},"parameters":[{"$ref":"#/components/parameters/IfNoneMatch"}]}},"/exports/{id}/download":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"operationId":"downloadExport","tags":["Exports"],"summary":"Stáhnout export","description":"Soubor hotového exportu (ZIP, XLSX nebo XML). Odkaz platí 7 dní.\n\nOprávnění klíče: `exports:read`.","x-required-scope":"exports:read","responses":{"200":{"description":"Soubor.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"410":{"$ref":"#/components/responses/Gone"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"fk_live_…","description":"API klíč z Nastavení → API klíče: `Authorization: Bearer fk_live_…`. Klíč se zobrazí jen jednou."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Stejný API klíč v hlavičce `X-Api-Key`."}},"parameters":{"Id":{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"ID záznamu."},"Page":{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1},"description":"Stránka."},"Limit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"Záznamů na stránku (nejvýše 100)."},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Jedinečný klíč operace, například UUID. Opakovaný požadavek se stejným klíčem a daty vrátí původní výsledek."},"IfMatch":{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"},"description":"`ETag` záznamu, jak jste ho naposledy přečetli. Když se záznam mezitím změnil, API změnu odmítne s 412 a nic neprovede. Bez hlavičky se změna provede vždy."},"IfNoneMatch":{"name":"If-None-Match","in":"header","required":false,"schema":{"type":"string"},"description":"`ETag` z předchozího čtení. Když se záznam nezměnil, API vrátí 304 bez těla."},"UpdatedSince":{"name":"updated_since","in":"query","required":false,"schema":{"$ref":"#/components/schemas/DateTime"},"description":"Jen záznamy změněné od tohoto času včetně, seřazené od nejstarší změny. Vrací i smazané záznamy s vyplněným `deleted_at`."}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"ID požadavku pro podporu. Vlastní hodnotu z 8–64 písmen, číslic a `.` `_` `-` API vrátí beze změny, jinak vytvoří novou."},"RateLimit":{"schema":{"type":"string"},"description":"Zbývající požadavky a sekundy do obnovení, např. `\"default\";r=118;t=42`."},"RateLimit-Policy":{"schema":{"type":"string"},"description":"Pravidlo limitu: `\"default\";q=120;w=60`."},"Retry-After":{"schema":{"type":"integer"},"description":"Sekundy do dalšího pokusu."},"Location":{"schema":{"type":"string","format":"uri"},"description":"Adresa vytvořeného záznamu."},"Link":{"schema":{"type":"string"},"description":"Odkazy na další a předchozí stránku (RFC 8288)."},"ETag":{"schema":{"type":"string"},"description":"Verze vrácené podoby záznamu. Pošlete ji v `If-Match` při změně, nebo v `If-None-Match` při dalším čtení."}},"responses":{"BadRequest":{"description":"Chybný požadavek.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"example":{"type":"https://api.fakturanet.cz/#problem-invalid-parameter","title":"Invalid parameter","status":400,"detail":"page must be at least 1 and limit between 1 and 100.","request_id":"9f2c41d0a7b3e815"}}}},"Unauthorized":{"description":"Chybí nebo neplatí API klíč.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"WWW-Authenticate":{"schema":{"type":"string"},"description":"`Bearer realm=\"Fakturanet API\"`"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"example":{"type":"https://api.fakturanet.cz/#problem-unauthorized","title":"Unauthorized","status":401,"detail":"Send an API key as \"Authorization: Bearer <key>\" or in the X-Api-Key header.","request_id":"9f2c41d0a7b3e815"}}}},"Forbidden":{"description":"Chybí oprávnění, role nebo funkce tarifu.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"example":{"type":"https://api.fakturanet.cz/#problem-insufficient-scope","title":"Insufficient scope","status":403,"detail":"This API key does not have the invoices:write scope.","request_id":"9f2c41d0a7b3e815"}}}},"NotFound":{"description":"Záznam nenalezen.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"example":{"type":"https://api.fakturanet.cz/#problem-not-found","title":"Not found","status":404,"detail":"The requested record does not exist.","request_id":"9f2c41d0a7b3e815"}}}},"Conflict":{"description":"Konflikt se stavem záznamu.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"example":{"type":"https://api.fakturanet.cz/#problem-already-issued","title":"Already issued","status":409,"detail":"Only a draft can be issued.","request_id":"9f2c41d0a7b3e815"}}}},"Gone":{"description":"Soubor už není k dispozici.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"example":{"type":"https://api.fakturanet.cz/#problem-export-expired","title":"Export expired","status":410,"detail":"Download links last 7 days. Create a new export.","request_id":"9f2c41d0a7b3e815"}}}},"PayloadTooLarge":{"description":"Tělo je příliš velké.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"example":{"type":"https://api.fakturanet.cz/#problem-payload-too-large","title":"Payload too large","status":413,"detail":"The request body is limited to 1 MB.","request_id":"9f2c41d0a7b3e815"}}}},"UnsupportedMediaType":{"description":"Tělo není JSON.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"example":{"type":"https://api.fakturanet.cz/#problem-unsupported-media-type","title":"Unsupported media type","status":415,"detail":"Send the request body as application/json.","request_id":"9f2c41d0a7b3e815"}}}},"ValidationFailed":{"description":"Data neprošla kontrolou.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"example":{"type":"https://api.fakturanet.cz/#problem-validation-failed","title":"Validation failed","status":422,"detail":"2 fields are invalid. See errors.","request_id":"9f2c41d0a7b3e815","errors":[{"pointer":"/due_date","detail":"Must be a date in YYYY-MM-DD format."},{"pointer":"/items/0/price","detail":"Unknown field."}]}}}},"TooManyRequests":{"description":"Překročen limit požadavků.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"example":{"type":"https://api.fakturanet.cz/#problem-rate-limited","title":"Too many requests","status":429,"detail":"The limit is 120 requests per 60 seconds per key. Retry in 42 s.","request_id":"9f2c41d0a7b3e815"}}}},"ServerError":{"description":"Neočekávaná chyba.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"example":{"type":"https://api.fakturanet.cz/#problem-server-error","title":"Server error","status":500,"detail":"The request could not be completed. Quote request ID 9f2c41d0a7b3e815 when contacting support.","request_id":"9f2c41d0a7b3e815"}}}},"NotModified":{"description":"Záznam se od čtení s daným `ETag` nezměnil. Odpověď nemá tělo.","headers":{"ETag":{"$ref":"#/components/headers/ETag"}}},"PreconditionFailed":{"description":"Záznam se změnil od čtení s `If-Match`; nic se neprovedlo. Hlavička `ETag` nese aktuální verzi.","headers":{"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"example":{"type":"https://api.fakturanet.cz/#problem-precondition-failed","title":"Precondition failed","status":412,"detail":"The record has changed since you read it. Fetch it again and repeat the change with its new ETag.","request_id":"9f2c41d0a7b3e815"}}}}},"schemas":{"Decimal":{"type":"string","pattern":"^-?\\d{1,12}(\\.\\d{1,8})?$","description":"Desetinné číslo jako řetězec s tečkou: nejvýše 12 číslic před tečkou a 8 za ní. V požadavku můžete poslat `\"1210.50\"`, odpověď vrací číslo bez koncových nul, například `\"1210.5\"`.","examples":["1147.08"]},"Date":{"type":"string","format":"date","description":"Datum RRRR-MM-DD.","examples":["2026-11-08"]},"DateTime":{"type":"string","format":"date-time","description":"Čas ISO 8601 s časovou zónou.","examples":["2026-11-08T14:05:00+01:00"]},"Problem":{"type":"object","required":["type","title","status","detail","request_id"],"description":"Chyba podle RFC 9457.","properties":{"type":{"type":"string","description":"Odkaz na popis typu chyby v dokumentaci.","format":"uri"},"title":{"type":"string","description":"Krátký název typu chyby."},"status":{"type":"integer","description":"HTTP status."},"detail":{"type":"string","description":"Konkrétní důvod."},"request_id":{"type":"string","description":"ID požadavku pro podporu."},"errors":{"type":"array","description":"Jen u `validation-failed` z kontroly požadavku: všechna chybná pole najednou.","items":{"type":"object","additionalProperties":false,"required":["pointer","detail"],"properties":{"pointer":{"type":"string","description":"Pole v těle požadavku jako JSON Pointer (RFC 6901), například `/items/0/unit_price`."},"detail":{"type":"string","description":"Co je s polem špatně."}}}}}},"PageMeta":{"type":"object","required":["page","limit","total","pages"],"properties":{"page":{"type":"integer","description":"Aktuální stránka."},"limit":{"type":"integer","description":"Záznamů na stránku."},"total":{"type":"integer","description":"Záznamů celkem."},"pages":{"type":"integer","description":"Stránek celkem."}}},"PageLinks":{"type":"object","required":["next","prev"],"properties":{"next":{"type":["string","null"],"description":"Další stránka.","format":"uri"},"prev":{"type":["string","null"],"description":"Předchozí stránka.","format":"uri"}}},"Party":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"Název firmy nebo jméno osoby.","maxLength":190,"examples":["Bozkurt Group s.r.o."]},"company_no":{"type":["string","null"],"description":"IČO. Mezery se odstraní.","maxLength":20,"examples":["03662268"]},"vat_no":{"type":["string","null"],"description":"DIČ.","maxLength":30,"examples":["CZ03662268"]},"street":{"type":["string","null"],"description":"Ulice a číslo.","maxLength":190},"city":{"type":["string","null"],"description":"Obec.","maxLength":120},"zip":{"type":["string","null"],"description":"PSČ.","maxLength":20},"country":{"type":["string","null"],"description":"Kód země ISO 3166-1 alpha-2. Výchozí `CZ`.","pattern":"^[A-Za-z]{2}$","default":"CZ"},"email":{"type":["string","null"],"description":"E-mail; použije se jako výchozí příjemce faktury.","format":"email","maxLength":190},"phone":{"type":["string","null"],"description":"Telefon.","maxLength":40},"web":{"type":["string","null"],"description":"Web.","maxLength":190}}},"InvoiceItemInput":{"type":"object","required":["description","unit_price"],"properties":{"description":{"type":"string","description":"Popis položky.","maxLength":500,"examples":["Fakturanet Professional – roční předplatné"]},"quantity":{"$ref":"#/components/schemas/Decimal","description":"Množství, nejvýše 4 desetinná místa. Nesmí být 0; záporné jen u opravného dokladu. Výchozí 1."},"unit":{"type":"string","description":"Jednotka, například `ks`, `hod`. Výchozí `ks`.","maxLength":20},"unit_price":{"$ref":"#/components/schemas/Decimal","description":"Jednotková cena, nejvýše 4 desetinná místa. Podle `prices_include_vat` bez DPH, nebo s DPH."},"vat_rate":{"$ref":"#/components/schemas/Decimal","description":"Sazba DPH v procentech (0–100). U dokladů neplátce a přenesené daňové povinnosti se použije 0."},"discount_pct":{"$ref":"#/components/schemas/Decimal","description":"Sleva na položku v procentech (0–100, nejvýše 2 desetinná místa). Uplatní se před slevou na celý doklad. Výchozí 0."}}},"InvoiceItem":{"type":"object","properties":{"id":{"type":"integer","description":"ID položky."},"position":{"type":"integer","description":"Pořadí."},"description":{"type":"string","description":"Popis položky.","maxLength":500,"examples":["Fakturanet Professional – roční předplatné"]},"quantity":{"$ref":"#/components/schemas/Decimal","description":"Množství, nejvýše 4 desetinná místa. Nesmí být 0; záporné jen u opravného dokladu. Výchozí 1."},"unit":{"type":"string","description":"Jednotka, například `ks`, `hod`. Výchozí `ks`.","maxLength":20},"unit_price":{"$ref":"#/components/schemas/Decimal","description":"Jednotková cena, nejvýše 4 desetinná místa. Podle `prices_include_vat` bez DPH, nebo s DPH."},"discount_pct":{"$ref":"#/components/schemas/Decimal","description":"Sleva na položku v procentech."},"vat_rate":{"$ref":"#/components/schemas/Decimal","description":"Sazba DPH v procentech (0–100). U dokladů neplátce a přenesené daňové povinnosti se použije 0."},"net":{"$ref":"#/components/schemas/Decimal","description":"Základ."},"vat":{"$ref":"#/components/schemas/Decimal","description":"DPH."},"gross":{"$ref":"#/components/schemas/Decimal","description":"Celkem s DPH."}}},"InvoiceCreate":{"type":"object","required":["items"],"properties":{"doc_type":{"type":"string","enum":["invoice_vat","invoice_non_vat","credit_note","reverse_charge","proforma","advance","quote_vat","quote_non_vat"],"description":"Typ dokladu. Doklady s DPH vyžadují, aby firma byla plátce DPH. Hodnoty: `invoice_vat` – faktura – daňový doklad; `invoice_non_vat` – faktura neplátce DPH; `credit_note` – opravný daňový doklad (dobropis); `reverse_charge` – faktura s přenesenou daňovou povinností; `proforma` – zálohová faktura; `advance` – daňový doklad k přijaté platbě; `quote_vat` – nabídka s DPH; `quote_non_vat` – nabídka bez DPH.","default":"invoice_non_vat"},"issue_date":{"$ref":"#/components/schemas/Date","description":"Datum vystavení. Výchozí dnešní den."},"supply_date":{"$ref":"#/components/schemas/Date","description":"Datum uskutečnění zdanitelného plnění (DUZP). Výchozí datum vystavení."},"due_date":{"$ref":"#/components/schemas/Date","description":"Datum splatnosti. Výchozí 14 dní od vystavení."},"contact_id":{"type":"integer","description":"ID kontaktu odběratele. Pokud chybí `customer`, odběratel se převezme z kontaktu."},"customer":{"$ref":"#/components/schemas/Party","description":"Odběratel. Bez `contact_id` se existující kontakt najde podle IČO, bez IČO podle názvu; jinak se založí nový."},"bank_account_id":{"type":["integer","null"],"description":"ID bankovního účtu firmy, který se vytiskne na doklad. Když ho při vytvoření dokladu placeného převodem neuvedete, použije se výchozí účet firmy jako v aplikaci; `null` doklad vytvoří bez účtu."},"payment_method":{"type":"string","enum":["bank_transfer","cash","cash_on_delivery","card","paypal","mutual_offset"],"description":"Způsob úhrady. Hodnoty: `bank_transfer` – bankovní převod; `cash` – hotovost; `cash_on_delivery` – dobírka; `card` – platební karta; `paypal` – PayPal; `mutual_offset` – vzájemný zápočet.","default":"bank_transfer"},"currency":{"type":"string","description":"Měna ISO 4217.","pattern":"^[A-Z]{3}$","default":"CZK"},"exchange_rate":{"$ref":"#/components/schemas/Decimal","description":"Kurz k CZK. U CZK musí být 1, u jiné měny kurz ČNB ke dni zdanitelného plnění (1 se odmítne)."},"language":{"type":"string","enum":["cs","sk","en","de","de-AT","pl","fr","nl","es","uk","sr"],"description":"Jazyk dokladu. Hodnoty: `cs` – cs; `sk` – sk; `en` – en; `de` – de; `de-AT` – de-AT; `pl` – pl; `fr` – fr; `nl` – nl; `es` – es; `uk` – uk; `sr` – sr.","default":"cs"},"vat_treatment":{"type":"string","enum":["domestic","non_payer","eu_goods","eu_services","domestic_reverse_charge","export","oss"],"description":"Režim DPH. Výchozí podle toho, zda je firma plátce DPH. Hodnoty: `domestic` – tuzemské plnění; `non_payer` – neplátce DPH; `eu_goods` – dodání zboží do EU; `eu_services` – služby do EU; `domestic_reverse_charge` – tuzemské přenesení daňové povinnosti; `export` – vývoz mimo EU; `oss` – prodej spotřebiteli v jiném státě EU v režimu OSS (sazba státu spotřeby, vyžaduje registraci k OSS)."},"rounding":{"type":"string","enum":["none","0.10","0.50","1.00"],"description":"Zaokrouhlení celkové částky. Hodnoty: `none` – bez zaokrouhlení; `0.10` – na desetníky; `0.50` – na padesátníky; `1.00` – na celé koruny.","default":"none"},"template":{"type":"string","enum":["modern","simple","custom"],"description":"Vzhled PDF. Hodnoty: `modern` – moderní; `simple` – jednoduchý; `custom` – vlastní.","default":"modern"},"color":{"type":"string","description":"Barva dokladu `#RRGGBB`. Výchozí barva firmy.","pattern":"^#[0-9A-Fa-f]{6}$"},"show_qr":{"type":"boolean","description":"Tisknout QR platbu.","default":true},"prices_include_vat":{"type":"boolean","description":"Jednotkové ceny jsou včetně DPH.","default":false},"discount_pct":{"$ref":"#/components/schemas/Decimal","description":"Sleva na celý doklad v procentech (0–100, nejvýše 2 desetinná místa)."},"issued_by":{"type":"string","description":"Kdo doklad vystavil.","maxLength":120},"note":{"type":"string","description":"Poznámka na dokladu.","maxLength":10000},"reg_number":{"type":"string","description":"Evidenční číslo.","maxLength":40},"order_number":{"type":"string","description":"Číslo objednávky odběratele.","maxLength":60},"variable_symbol":{"type":"string","description":"Variabilní symbol, nejvýše 10 číslic. Při vystavení se jinak odvodí z čísla dokladu.","pattern":"^\\d{0,10}$"},"constant_symbol":{"type":"string","description":"Konstantní symbol.","maxLength":10},"specific_symbol":{"type":"string","description":"Specifický symbol.","maxLength":20},"items":{"type":"array","minItems":1,"maxItems":500,"items":{"$ref":"#/components/schemas/InvoiceItemInput"},"description":"Položky dokladu (1–500)."},"number":{"type":"string","description":"Vlastní číslo dokladu při vystavení. Bez něj se použije číselná řada.","pattern":"^[\\p{L}\\p{N}/._-]{1,60}$"},"issue":{"type":"boolean","description":"Doklad rovnou vystavit (přidělí číslo). Jinak vznikne koncept.","default":false},"related_invoice_id":{"type":"integer","description":"U opravného dokladu ID opravovaného dokladu."},"correction_reason":{"type":["string","null"],"maxLength":255,"description":"Důvod opravy u opravného daňového dokladu (`credit_note`). Při vystavení je povinný."},"reverse_charge_code":{"type":["string","null"],"enum":["1","1a","3","3a","4","4a","5","6","7","11","12","13","14","15","16","17","18","19","20","21",null],"description":"Předmět plnění při tuzemském přenesení daňové povinnosti (`vat_treatment` = `domestic_reverse_charge`), kód podle § 92a ZDPH pro kontrolní hlášení A.1, např. `4` – stavební a montážní práce."}},"additionalProperties":false,"example":{"doc_type":"invoice_vat","issue":true,"customer":{"name":"Jan Novák","city":"Praha","country":"CZ","email":"jan.novak@example.com"},"due_date":"2026-12-02","items":[{"description":"Fakturanet Professional – roční předplatné","quantity":"1","unit":"ks","unit_price":"948","vat_rate":"21"}]}},"InvoiceUpdate":{"type":"object","properties":{"doc_type":{"type":"string","enum":["invoice_vat","invoice_non_vat","credit_note","reverse_charge","proforma","advance","quote_vat","quote_non_vat"],"description":"Typ dokladu. Doklady s DPH vyžadují, aby firma byla plátce DPH. Hodnoty: `invoice_vat` – faktura – daňový doklad; `invoice_non_vat` – faktura neplátce DPH; `credit_note` – opravný daňový doklad (dobropis); `reverse_charge` – faktura s přenesenou daňovou povinností; `proforma` – zálohová faktura; `advance` – daňový doklad k přijaté platbě; `quote_vat` – nabídka s DPH; `quote_non_vat` – nabídka bez DPH.","default":"invoice_non_vat"},"issue_date":{"$ref":"#/components/schemas/Date","description":"Datum vystavení. Výchozí dnešní den."},"supply_date":{"$ref":"#/components/schemas/Date","description":"Datum uskutečnění zdanitelného plnění (DUZP). Výchozí datum vystavení."},"due_date":{"$ref":"#/components/schemas/Date","description":"Datum splatnosti. Výchozí 14 dní od vystavení."},"contact_id":{"type":"integer","description":"ID kontaktu odběratele. Pokud chybí `customer`, odběratel se převezme z kontaktu."},"customer":{"$ref":"#/components/schemas/Party","description":"Odběratel. Bez `contact_id` se existující kontakt najde podle IČO, bez IČO podle názvu; jinak se založí nový."},"bank_account_id":{"type":["integer","null"],"description":"ID bankovního účtu firmy, který se vytiskne na doklad. Když ho při vytvoření dokladu placeného převodem neuvedete, použije se výchozí účet firmy jako v aplikaci; `null` doklad vytvoří bez účtu."},"payment_method":{"type":"string","enum":["bank_transfer","cash","cash_on_delivery","card","paypal","mutual_offset"],"description":"Způsob úhrady. Hodnoty: `bank_transfer` – bankovní převod; `cash` – hotovost; `cash_on_delivery` – dobírka; `card` – platební karta; `paypal` – PayPal; `mutual_offset` – vzájemný zápočet.","default":"bank_transfer"},"currency":{"type":"string","description":"Měna ISO 4217.","pattern":"^[A-Z]{3}$","default":"CZK"},"exchange_rate":{"$ref":"#/components/schemas/Decimal","description":"Kurz k CZK. U CZK musí být 1, u jiné měny kurz ČNB ke dni zdanitelného plnění (1 se odmítne)."},"language":{"type":"string","enum":["cs","sk","en","de","de-AT","pl","fr","nl","es","uk","sr"],"description":"Jazyk dokladu. Hodnoty: `cs` – cs; `sk` – sk; `en` – en; `de` – de; `de-AT` – de-AT; `pl` – pl; `fr` – fr; `nl` – nl; `es` – es; `uk` – uk; `sr` – sr.","default":"cs"},"vat_treatment":{"type":"string","enum":["domestic","non_payer","eu_goods","eu_services","domestic_reverse_charge","export","oss"],"description":"Režim DPH. Výchozí podle toho, zda je firma plátce DPH. Hodnoty: `domestic` – tuzemské plnění; `non_payer` – neplátce DPH; `eu_goods` – dodání zboží do EU; `eu_services` – služby do EU; `domestic_reverse_charge` – tuzemské přenesení daňové povinnosti; `export` – vývoz mimo EU; `oss` – prodej spotřebiteli v jiném státě EU v režimu OSS (sazba státu spotřeby, vyžaduje registraci k OSS)."},"rounding":{"type":"string","enum":["none","0.10","0.50","1.00"],"description":"Zaokrouhlení celkové částky. Hodnoty: `none` – bez zaokrouhlení; `0.10` – na desetníky; `0.50` – na padesátníky; `1.00` – na celé koruny.","default":"none"},"template":{"type":"string","enum":["modern","simple","custom"],"description":"Vzhled PDF. Hodnoty: `modern` – moderní; `simple` – jednoduchý; `custom` – vlastní.","default":"modern"},"color":{"type":"string","description":"Barva dokladu `#RRGGBB`. Výchozí barva firmy.","pattern":"^#[0-9A-Fa-f]{6}$"},"show_qr":{"type":"boolean","description":"Tisknout QR platbu.","default":true},"prices_include_vat":{"type":"boolean","description":"Jednotkové ceny jsou včetně DPH.","default":false},"discount_pct":{"$ref":"#/components/schemas/Decimal","description":"Sleva na celý doklad v procentech (0–100, nejvýše 2 desetinná místa)."},"issued_by":{"type":"string","description":"Kdo doklad vystavil.","maxLength":120},"note":{"type":"string","description":"Poznámka na dokladu.","maxLength":10000},"reg_number":{"type":"string","description":"Evidenční číslo.","maxLength":40},"order_number":{"type":"string","description":"Číslo objednávky odběratele.","maxLength":60},"variable_symbol":{"type":"string","description":"Variabilní symbol, nejvýše 10 číslic. Při vystavení se jinak odvodí z čísla dokladu.","pattern":"^\\d{0,10}$"},"constant_symbol":{"type":"string","description":"Konstantní symbol.","maxLength":10},"specific_symbol":{"type":"string","description":"Specifický symbol.","maxLength":20},"items":{"type":"array","minItems":1,"maxItems":500,"items":{"$ref":"#/components/schemas/InvoiceItemInput"},"description":"Položky dokladu (1–500)."},"correction_reason":{"type":["string","null"],"maxLength":255,"description":"Důvod opravy u opravného daňového dokladu (`credit_note`). Při vystavení je povinný."},"reverse_charge_code":{"type":["string","null"],"enum":["1","1a","3","3a","4","4a","5","6","7","11","12","13","14","15","16","17","18","19","20","21",null],"description":"Předmět plnění při tuzemském přenesení daňové povinnosti (`vat_treatment` = `domestic_reverse_charge`), kód podle § 92a ZDPH pro kontrolní hlášení A.1, např. `4` – stavební a montážní práce."}},"additionalProperties":false,"description":"Částečná úprava: pošlete jen pole, která se mění. Pole `items` nahrazuje všechny položky. Vystavený doklad lze upravit jen s funkcí tarifu „úprava vystavených dokladů“.","example":{"due_date":"2026-12-16","note":"Splatnost prodloužena na žádost odběratele."}},"Invoice":{"type":"object","properties":{"id":{"type":"integer","description":"ID dokladu."},"number":{"type":["string","null"],"description":"Číslo dokladu; `null` u konceptu."},"status":{"type":"string","enum":["draft","issued","cancelled"],"description":"Stav dokladu. Hodnoty: `draft` – koncept; `issued` – vystaveno; `cancelled` – stornováno. API doklad nestornuje, vystavený doklad se opravuje dobropisem."},"payment_status":{"type":"string","enum":["draft","unpaid","paid","overdue","future","issued","cancelled"],"description":"Stav úhrady vypočtený k dnešnímu dni. Hodnoty: `draft` – koncept; `unpaid` – nezaplaceno; `paid` – zaplaceno; `overdue` – po splatnosti; `future` – datum vystavení je v budoucnu; `issued` – vystavená nabídka, ta se nehradí; `cancelled` – stornováno."},"doc_type":{"type":"string","enum":["invoice_vat","invoice_non_vat","credit_note","reverse_charge","proforma","advance","quote_vat","quote_non_vat"],"description":"Typ dokladu. Doklady s DPH vyžadují, aby firma byla plátce DPH. Hodnoty: `invoice_vat` – faktura – daňový doklad; `invoice_non_vat` – faktura neplátce DPH; `credit_note` – opravný daňový doklad (dobropis); `reverse_charge` – faktura s přenesenou daňovou povinností; `proforma` – zálohová faktura; `advance` – daňový doklad k přijaté platbě; `quote_vat` – nabídka s DPH; `quote_non_vat` – nabídka bez DPH.","default":"invoice_non_vat"},"issue_date":{"$ref":"#/components/schemas/Date","description":"Datum vystavení. Výchozí dnešní den."},"supply_date":{"$ref":"#/components/schemas/Date","description":"Datum uskutečnění zdanitelného plnění (DUZP). Výchozí datum vystavení."},"due_date":{"$ref":"#/components/schemas/Date","description":"Datum splatnosti. Výchozí 14 dní od vystavení."},"contact_id":{"type":["integer","null"],"description":"ID kontaktu odběratele. Pokud chybí `customer`, odběratel se převezme z kontaktu."},"bank_account_id":{"type":["integer","null"],"description":"ID bankovního účtu firmy, který se vytiskne na doklad."},"payment_method":{"type":"string","enum":["bank_transfer","cash","cash_on_delivery","card","paypal","mutual_offset"],"description":"Způsob úhrady. Hodnoty: `bank_transfer` – bankovní převod; `cash` – hotovost; `cash_on_delivery` – dobírka; `card` – platební karta; `paypal` – PayPal; `mutual_offset` – vzájemný zápočet.","default":"bank_transfer"},"currency":{"type":"string","description":"Měna ISO 4217.","pattern":"^[A-Z]{3}$","default":"CZK"},"exchange_rate":{"$ref":"#/components/schemas/Decimal","description":"Kurz k CZK. U CZK musí být 1, u jiné měny kurz ČNB ke dni zdanitelného plnění (1 se odmítne)."},"language":{"type":"string","enum":["cs","sk","en","de","de-AT","pl","fr","nl","es","uk","sr"],"description":"Jazyk dokladu. Hodnoty: `cs` – cs; `sk` – sk; `en` – en; `de` – de; `de-AT` – de-AT; `pl` – pl; `fr` – fr; `nl` – nl; `es` – es; `uk` – uk; `sr` – sr.","default":"cs"},"vat_treatment":{"type":"string","enum":["domestic","non_payer","eu_goods","eu_services","domestic_reverse_charge","export","oss"],"description":"Režim DPH. Výchozí podle toho, zda je firma plátce DPH. Hodnoty: `domestic` – tuzemské plnění; `non_payer` – neplátce DPH; `eu_goods` – dodání zboží do EU; `eu_services` – služby do EU; `domestic_reverse_charge` – tuzemské přenesení daňové povinnosti; `export` – vývoz mimo EU; `oss` – prodej spotřebiteli v jiném státě EU v režimu OSS (sazba státu spotřeby, vyžaduje registraci k OSS)."},"rounding":{"type":"string","enum":["none","0.10","0.50","1.00"],"description":"Zaokrouhlení celkové částky. Hodnoty: `none` – bez zaokrouhlení; `0.10` – na desetníky; `0.50` – na padesátníky; `1.00` – na celé koruny.","default":"none"},"template":{"type":"string","enum":["modern","simple","custom"],"description":"Vzhled PDF. Hodnoty: `modern` – moderní; `simple` – jednoduchý; `custom` – vlastní.","default":"modern"},"color":{"type":"string","description":"Barva dokladu `#RRGGBB`. Výchozí barva firmy.","pattern":"^#[0-9A-Fa-f]{6}$"},"show_qr":{"type":"boolean","description":"Tisknout QR platbu.","default":true},"prices_include_vat":{"type":"boolean","description":"Jednotkové ceny jsou včetně DPH.","default":false},"discount_pct":{"$ref":"#/components/schemas/Decimal","description":"Sleva na celý doklad v procentech (0–100, nejvýše 2 desetinná místa)."},"issued_by":{"type":"string","description":"Kdo doklad vystavil.","maxLength":120},"note":{"type":["string","null"],"description":"Poznámka na dokladu.","maxLength":10000},"reg_number":{"type":["string","null"],"description":"Evidenční číslo.","maxLength":40},"order_number":{"type":["string","null"],"description":"Číslo objednávky odběratele.","maxLength":60},"variable_symbol":{"type":["string","null"],"description":"Variabilní symbol, nejvýše 10 číslic. Při vystavení se jinak odvodí z čísla dokladu.","pattern":"^\\d{0,10}$"},"constant_symbol":{"type":["string","null"],"description":"Konstantní symbol.","maxLength":10},"specific_symbol":{"type":["string","null"],"description":"Specifický symbol.","maxLength":20},"customer_snapshot":{"$ref":"#/components/schemas/Party","description":"Odběratel tak, jak je uložen na dokladu."},"supplier_snapshot":{"type":["object","null"],"additionalProperties":false,"description":"Dodavatel (vaše firma) tak, jak je uložen na dokladu.","properties":{"name":{"type":["string","null"],"description":"Název firmy."},"company_no":{"type":["string","null"],"description":"IČO."},"vat_no":{"type":["string","null"],"description":"DIČ."},"is_vat_payer":{"type":"boolean","description":"Plátce DPH."},"street":{"type":["string","null"],"description":"Ulice a číslo."},"city":{"type":["string","null"],"description":"Obec."},"zip":{"type":["string","null"],"description":"PSČ."},"country":{"type":["string","null"],"description":"Kód státu podle ISO 3166-1."},"email":{"type":["string","null"],"description":"E-mail."},"phone":{"type":["string","null"],"description":"Telefon."},"web":{"type":["string","null"],"description":"Web."},"register_note":{"type":["string","null"],"description":"Zápis v obchodním rejstříku, jak je vytištěn na dokladu."}}},"bank_snapshot":{"type":["object","null"],"additionalProperties":false,"description":"Bankovní účet vytištěný na dokladu.","properties":{"account_no":{"type":["string","null"],"description":"Číslo účtu s předčíslím."},"bank_code":{"type":["string","null"],"description":"Kód banky."},"iban":{"type":["string","null"],"description":"IBAN."},"swift":{"type":["string","null"],"description":"BIC (SWIFT)."},"currency":{"type":["string","null"],"description":"Měna účtu."}}},"vat_summary":{"type":"array","description":"Rekapitulace DPH podle sazeb.","items":{"type":"object","properties":{"rate":{"$ref":"#/components/schemas/Decimal","description":"Sazba DPH v %."},"net":{"$ref":"#/components/schemas/Decimal","description":"Základ."},"vat":{"$ref":"#/components/schemas/Decimal","description":"DPH."},"gross":{"$ref":"#/components/schemas/Decimal","description":"Celkem."}}}},"total_net":{"$ref":"#/components/schemas/Decimal","description":"Základ celkem."},"total_vat":{"$ref":"#/components/schemas/Decimal","description":"DPH celkem."},"total_gross":{"$ref":"#/components/schemas/Decimal","description":"Celkem k úhradě."},"rounding_amount":{"$ref":"#/components/schemas/Decimal","description":"Haléřové vyrovnání."},"paid_amount":{"$ref":"#/components/schemas/Decimal","description":"Uhrazeno."},"paid_at":{"anyOf":[{"$ref":"#/components/schemas/Date","description":"Datum úplné úhrady."},{"type":"null"}],"description":"Datum úplné úhrady."},"revision":{"type":"integer","description":"Revize; zvyšuje se při úpravě vystaveného dokladu."},"related_invoice_id":{"type":["integer","null"],"description":"Opravovaný doklad."},"recurring_id":{"type":["integer","null"],"description":"Pravidelná fakturace, která doklad vytvořila."},"scheduled_date":{"anyOf":[{"$ref":"#/components/schemas/Date","description":"Plánované datum u pravidelné fakturace."},{"type":"null"}],"description":"Plánované datum u pravidelné fakturace."},"created_at":{"$ref":"#/components/schemas/DateTime"},"updated_at":{"$ref":"#/components/schemas/DateTime","description":"Poslední změna dokladu, včetně úhrady a smazání."},"pdf_url":{"type":"string","description":"Odkaz na PDF přes API.","format":"uri"},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"},"description":"Položky. Jen v detailu, ne v seznamu."},"correction_reason":{"type":["string","null"],"maxLength":255,"description":"Důvod opravy u opravného daňového dokladu (`credit_note`). Při vystavení je povinný."},"reverse_charge_code":{"type":["string","null"],"enum":["1","1a","3","3a","4","4a","5","6","7","11","12","13","14","15","16","17","18","19","20","21",null],"description":"Předmět plnění při tuzemském přenesení daňové povinnosti (`vat_treatment` = `domestic_reverse_charge`), kód podle § 92a ZDPH pro kontrolní hlášení A.1, např. `4` – stavební a montážní práce."},"vies_check":{"type":["object","null"],"readOnly":true,"description":"Ověření DIČ odběratele v systému VIES při vystavení dokladu s režimem `eu_goods` nebo `eu_services` (§ 64 ZDPH). `valid` je `null`, když registr členského státu neodpověděl; neplatné DIČ vystavení zastaví.","properties":{"valid":{"type":["boolean","null"]},"name":{"type":["string","null"]},"address":{"type":["string","null"]},"request_id":{"type":["string","null"],"description":"Číslo konzultace VIES."},"checked_at":{"$ref":"#/components/schemas/DateTime"}}},"deleted_at":{"anyOf":[{"$ref":"#/components/schemas/DateTime"},{"type":"null"}],"description":"Kdy byl záznam smazán. Smazané záznamy vrací jen seznam s `updated_since`, jinak `null`."}}},"Contact":{"type":"object","properties":{"id":{"type":"integer","description":"ID kontaktu."},"name":{"type":"string","description":"Název firmy nebo jméno osoby.","maxLength":190,"examples":["Bozkurt Group s.r.o."]},"company_no":{"type":["string","null"],"description":"IČO. Mezery se odstraní.","maxLength":20,"examples":["03662268"]},"vat_no":{"type":["string","null"],"description":"DIČ.","maxLength":30,"examples":["CZ03662268"]},"street":{"type":["string","null"],"description":"Ulice a číslo.","maxLength":190},"city":{"type":["string","null"],"description":"Obec.","maxLength":120},"zip":{"type":["string","null"],"description":"PSČ.","maxLength":20},"country":{"type":["string","null"],"description":"Kód země ISO 3166-1 alpha-2. Výchozí `CZ`.","pattern":"^[A-Za-z]{2}$","default":"CZ"},"email":{"type":["string","null"],"description":"E-mail; použije se jako výchozí příjemce faktury.","format":"email","maxLength":190},"phone":{"type":["string","null"],"description":"Telefon.","maxLength":40},"web":{"type":["string","null"],"description":"Web.","maxLength":190},"created_at":{"$ref":"#/components/schemas/DateTime"},"deleted_at":{"anyOf":[{"$ref":"#/components/schemas/DateTime"},{"type":"null"}],"description":"Kdy byl záznam smazán. Smazané záznamy vrací jen seznam s `updated_since`, jinak `null`."},"updated_at":{"$ref":"#/components/schemas/DateTime","description":"Poslední změna záznamu."}}},"ContactInput":{"type":"object","properties":{"name":{"type":"string","description":"Název firmy nebo jméno osoby.","maxLength":190,"examples":["Bozkurt Group s.r.o."]},"company_no":{"type":["string","null"],"description":"IČO. Mezery se odstraní.","maxLength":20,"examples":["03662268"]},"vat_no":{"type":["string","null"],"description":"DIČ.","maxLength":30,"examples":["CZ03662268"]},"street":{"type":["string","null"],"description":"Ulice a číslo.","maxLength":190},"city":{"type":["string","null"],"description":"Obec.","maxLength":120},"zip":{"type":["string","null"],"description":"PSČ.","maxLength":20},"country":{"type":["string","null"],"description":"Kód země ISO 3166-1 alpha-2. Výchozí `CZ`.","pattern":"^[A-Za-z]{2}$","default":"CZ"},"email":{"type":["string","null"],"description":"E-mail; použije se jako výchozí příjemce faktury.","format":"email","maxLength":190},"phone":{"type":["string","null"],"description":"Telefon.","maxLength":40},"web":{"type":["string","null"],"description":"Web.","maxLength":190}},"additionalProperties":false,"description":"Při vytvoření je povinné `name`. U úpravy pošlete jen měněná pole.","example":{"name":"Jan Novák","city":"Praha","country":"CZ","email":"jan.novak@example.com"}},"ExpenseItemInput":{"type":"object","required":["description","unit_price"],"properties":{"description":{"type":"string","description":"Popis položky.","maxLength":500,"examples":["Grafický návrh"]},"quantity":{"$ref":"#/components/schemas/Decimal","description":"Množství, nejvýše 4 desetinná místa. Nesmí být 0; záporné jen u opravného dokladu. Výchozí 1."},"unit":{"type":"string","description":"Jednotka, například `ks`, `hod`. Výchozí `ks`.","maxLength":20},"unit_price":{"$ref":"#/components/schemas/Decimal","description":"Jednotková cena, nejvýše 4 desetinná místa. Podle `prices_include_vat` bez DPH, nebo s DPH."},"vat_rate":{"$ref":"#/components/schemas/Decimal","description":"Sazba DPH v procentech (0–100). U dokladů neplátce a přenesené daňové povinnosti se použije 0."},"tax_deductible":{"type":"boolean","description":"DPH lze uplatnit.","default":true},"deduction_pct":{"$ref":"#/components/schemas/Decimal","description":"Podíl uplatnitelné DPH v procentech (0–100). Výchozí 100."}}},"ExpenseItem":{"type":"object","properties":{"id":{"type":"integer","description":"ID položky."},"position":{"type":"integer","description":"Pořadí."},"description":{"type":"string","description":"Popis položky.","maxLength":500,"examples":["Grafický návrh"]},"quantity":{"$ref":"#/components/schemas/Decimal","description":"Množství, nejvýše 4 desetinná místa. Nesmí být 0; záporné jen u opravného dokladu. Výchozí 1."},"unit":{"type":"string","description":"Jednotka, například `ks`, `hod`. Výchozí `ks`.","maxLength":20},"unit_price":{"$ref":"#/components/schemas/Decimal","description":"Jednotková cena, nejvýše 4 desetinná místa. Podle `prices_include_vat` bez DPH, nebo s DPH."},"vat_rate":{"$ref":"#/components/schemas/Decimal","description":"Sazba DPH v procentech (0–100). U dokladů neplátce a přenesené daňové povinnosti se použije 0."},"tax_deductible":{"type":"boolean","description":"DPH lze uplatnit.","default":true},"deduction_pct":{"$ref":"#/components/schemas/Decimal","description":"Podíl uplatnitelné DPH v procentech (0–100). Výchozí 100."},"net":{"$ref":"#/components/schemas/Decimal"},"vat":{"$ref":"#/components/schemas/Decimal"},"gross":{"$ref":"#/components/schemas/Decimal"},"deductible_vat":{"$ref":"#/components/schemas/Decimal"}}},"ExpenseCreate":{"type":"object","required":["issue_date","supply_date","vat_claim_date","due_date","items"],"properties":{"supplier_doc_no":{"type":"string","description":"Číslo dokladu dodavatele.","maxLength":60},"issue_date":{"$ref":"#/components/schemas/Date","description":"Datum vystavení."},"supply_date":{"$ref":"#/components/schemas/Date","description":"DUZP."},"vat_claim_date":{"$ref":"#/components/schemas/Date","description":"Datum uplatnění DPH."},"due_date":{"$ref":"#/components/schemas/Date","description":"Datum splatnosti."},"supplier_contact_id":{"type":"integer","description":"ID kontaktu dodavatele. Pokud chybí `supplier`, dodavatel se převezme z kontaktu."},"supplier":{"$ref":"#/components/schemas/Party","description":"Dodavatel. Bez `supplier_contact_id` se existující kontakt najde podle IČO, bez IČO podle názvu; jinak se založí nový."},"currency":{"type":"string","description":"Měna ISO 4217.","pattern":"^[A-Z]{3}$","default":"CZK"},"exchange_rate":{"$ref":"#/components/schemas/Decimal","description":"Kurz k CZK. U CZK musí být 1."},"note":{"type":"string","description":"Poznámka.","maxLength":10000},"items":{"type":"array","minItems":1,"maxItems":500,"items":{"$ref":"#/components/schemas/ExpenseItemInput"},"description":"Položky výdaje (1–500)."},"vat_regime":{"type":"string","enum":["domestic","eu_acquisition","eu_service","foreign_service","reverse_charge_received","import"],"default":"domestic","description":"Režim DPH nákupu. Hodnoty: `domestic` – tuzemský nákup; `eu_acquisition` – zboží z jiného státu EU; `eu_service` – služba z jiného státu EU; `foreign_service` – služba ze třetí země; `reverse_charge_received` – tuzemské přenesení daňové povinnosti (§ 92a); `import` – dovoz zboží, DPH zaplacená celnímu úřadu (řádek 42, do kontrolního hlášení se neuvádí). U samovyměření se daň přizná i odečte v období plnění."},"reverse_charge_code":{"type":["string","null"],"enum":["1","1a","3","3a","4","4a","5","6","7","11","12","13","14","15","16","17","18","19","20","21",null],"description":"Předmět plnění pro `reverse_charge_received` (kód podle § 92a ZDPH)."}},"additionalProperties":false,"example":{"supplier":{"name":"Jan Novák","city":"Praha","country":"CZ","email":"jan.novak@example.com"},"supplier_doc_no":"2026-018","issue_date":"2026-11-10","supply_date":"2026-11-10","vat_claim_date":"2026-11-10","due_date":"2026-11-24","items":[{"description":"Grafický návrh","quantity":"1","unit":"ks","unit_price":"5000","vat_rate":"0"}]}},"ExpenseUpdate":{"type":"object","properties":{"supplier_doc_no":{"type":"string","description":"Číslo dokladu dodavatele.","maxLength":60},"issue_date":{"$ref":"#/components/schemas/Date","description":"Datum vystavení."},"supply_date":{"$ref":"#/components/schemas/Date","description":"DUZP."},"vat_claim_date":{"$ref":"#/components/schemas/Date","description":"Datum uplatnění DPH."},"due_date":{"$ref":"#/components/schemas/Date","description":"Datum splatnosti."},"supplier_contact_id":{"type":"integer","description":"ID kontaktu dodavatele. Pokud chybí `supplier`, dodavatel se převezme z kontaktu."},"supplier":{"$ref":"#/components/schemas/Party","description":"Dodavatel. Bez `supplier_contact_id` se existující kontakt najde podle IČO, bez IČO podle názvu; jinak se založí nový."},"currency":{"type":"string","description":"Měna ISO 4217.","pattern":"^[A-Z]{3}$","default":"CZK"},"exchange_rate":{"$ref":"#/components/schemas/Decimal","description":"Kurz k CZK. U CZK musí být 1."},"note":{"type":"string","description":"Poznámka.","maxLength":10000},"items":{"type":"array","minItems":1,"maxItems":500,"items":{"$ref":"#/components/schemas/ExpenseItemInput"},"description":"Položky výdaje (1–500)."},"vat_regime":{"type":"string","enum":["domestic","eu_acquisition","eu_service","foreign_service","reverse_charge_received","import"],"default":"domestic","description":"Režim DPH nákupu. Hodnoty: `domestic` – tuzemský nákup; `eu_acquisition` – zboží z jiného státu EU; `eu_service` – služba z jiného státu EU; `foreign_service` – služba ze třetí země; `reverse_charge_received` – tuzemské přenesení daňové povinnosti (§ 92a); `import` – dovoz zboží, DPH zaplacená celnímu úřadu (řádek 42, do kontrolního hlášení se neuvádí). U samovyměření se daň přizná i odečte v období plnění."},"reverse_charge_code":{"type":["string","null"],"enum":["1","1a","3","3a","4","4a","5","6","7","11","12","13","14","15","16","17","18","19","20","21",null],"description":"Předmět plnění pro `reverse_charge_received` (kód podle § 92a ZDPH)."}},"additionalProperties":false,"description":"Částečná úprava: pošlete jen měněná pole. Pole `items` nahrazuje všechny položky. Výdaj zahrnutý v uloženém přiznání DPH upravit nelze.","example":{"note":"Uhrazeno převodem."}},"Expense":{"type":"object","properties":{"id":{"type":"integer","description":"ID výdaje."},"number":{"type":"string","description":"Interní číslo z číselné řady výdajů."},"supplier_doc_no":{"type":["string","null"],"description":"Číslo dokladu dodavatele.","maxLength":60},"issue_date":{"$ref":"#/components/schemas/Date","description":"Datum vystavení."},"supply_date":{"$ref":"#/components/schemas/Date","description":"DUZP."},"vat_claim_date":{"$ref":"#/components/schemas/Date","description":"Datum uplatnění DPH."},"due_date":{"$ref":"#/components/schemas/Date","description":"Datum splatnosti."},"supplier_contact_id":{"type":["integer","null"],"description":"ID kontaktu dodavatele. Pokud chybí `supplier`, dodavatel se převezme z kontaktu."},"currency":{"type":"string","description":"Měna ISO 4217.","pattern":"^[A-Z]{3}$","default":"CZK"},"exchange_rate":{"$ref":"#/components/schemas/Decimal","description":"Kurz k CZK. U CZK musí být 1."},"note":{"type":["string","null"],"description":"Poznámka.","maxLength":10000},"supplier_snapshot":{"$ref":"#/components/schemas/Party","description":"Dodavatel uložený na výdaji."},"total_net":{"$ref":"#/components/schemas/Decimal"},"total_vat":{"$ref":"#/components/schemas/Decimal"},"total_gross":{"$ref":"#/components/schemas/Decimal"},"deductible_vat":{"$ref":"#/components/schemas/Decimal","description":"Uplatnitelná DPH."},"status":{"type":"string","enum":["unpaid","paid"],"description":"Stav úhrady. Hodnoty: `unpaid` – nezaplaceno; `paid` – zaplaceno."},"paid_at":{"anyOf":[{"$ref":"#/components/schemas/Date"},{"type":"null"}],"description":""},"created_at":{"$ref":"#/components/schemas/DateTime"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseItem"},"description":"Položky. Jen v detailu, ne v seznamu."},"vat_regime":{"type":"string","enum":["domestic","eu_acquisition","eu_service","foreign_service","reverse_charge_received","import"],"default":"domestic","description":"Režim DPH nákupu. Hodnoty: `domestic` – tuzemský nákup; `eu_acquisition` – zboží z jiného státu EU; `eu_service` – služba z jiného státu EU; `foreign_service` – služba ze třetí země; `reverse_charge_received` – tuzemské přenesení daňové povinnosti (§ 92a); `import` – dovoz zboží, DPH zaplacená celnímu úřadu (řádek 42, do kontrolního hlášení se neuvádí). U samovyměření se daň přizná i odečte v období plnění."},"reverse_charge_code":{"type":["string","null"],"enum":["1","1a","3","3a","4","4a","5","6","7","11","12","13","14","15","16","17","18","19","20","21",null],"description":"Předmět plnění pro `reverse_charge_received` (kód podle § 92a ZDPH)."},"supplier_check":{"type":["object","null"],"readOnly":true,"description":"Stav dodavatele s českým DIČ v registru plátců DPH Ministerstva financí při uložení výdaje (§ 109 ZDPH): `reliable`, `unreliable` nebo `not_found`, se zveřejněnými bankovními účty.","properties":{"status":{"type":"string","enum":["reliable","unreliable","not_found"]},"accounts":{"type":"array","items":{"type":"string"}},"checked_at":{"$ref":"#/components/schemas/DateTime"}}},"deleted_at":{"anyOf":[{"$ref":"#/components/schemas/DateTime"},{"type":"null"}],"description":"Kdy byl záznam smazán. Smazané záznamy vrací jen seznam s `updated_since`, jinak `null`."},"updated_at":{"$ref":"#/components/schemas/DateTime","description":"Poslední změna záznamu."}}},"ExportFilters":{"type":"object","additionalProperties":false,"properties":{"from":{"anyOf":[{"$ref":"#/components/schemas/Date","description":"Datum vystavení od."},{"type":"null"}],"description":"Datum vystavení od."},"to":{"anyOf":[{"$ref":"#/components/schemas/Date","description":"Datum vystavení do."},{"type":"null"}],"description":"Datum vystavení do."},"status":{"type":["string","null"],"description":"Stav dokladu (`paid`, `unpaid`, `overdue`, `draft`, `future`) nebo výdaje (`paid`, `unpaid`)."},"contact_id":{"type":["integer","null"],"description":"Jen doklady tohoto kontaktu."},"q":{"type":["string","null"],"description":"Fulltext."},"doc_type":{"type":["string","null"],"description":"Typ dokladu."},"payment_method":{"type":["string","null"],"description":"Způsob úhrady."},"min":{"anyOf":[{"$ref":"#/components/schemas/Decimal","description":"Částka od."},{"type":"null"}],"description":"Částka od."},"max":{"anyOf":[{"$ref":"#/components/schemas/Decimal","description":"Částka do."},{"type":"null"}],"description":"Částka do."}}},"ExportInput":{"type":"object","required":["kind","format"],"additionalProperties":false,"properties":{"kind":{"type":"string","enum":["invoices","expenses","contacts","archive"],"description":"Co exportovat. Hodnoty: `invoices` – doklady; `expenses` – výdaje; `contacts` – kontakty; `archive` – kompletní záloha dat firmy (ZIP: doklady v PDF a ISDOC, přehledy XLSX, přílohy výdajů, uložená přiznání k DPH, záznam EET). Vyžaduje `format` = `zip` a nepoužívá filtry."},"format":{"type":"string","enum":["pdf","isdoc","xlsx","pohoda","money_s3","zip"],"description":"Formát. Kontakty jen `xlsx`. Hodnoty: `pdf` – PDF v ZIPu – jen doklady; `isdoc` – ISDOC v ZIPu – jen doklady; `xlsx` – Excel; `pohoda` – Pohoda XML – doklady a výdaje; `money_s3` – Money S3 XML – doklady a výdaje."},"filters":{"$ref":"#/components/schemas/ExportFilters"}},"example":{"kind":"invoices","format":"pohoda","filters":{"from":"2026-11-01","to":"2026-11-30"}}},"Export":{"type":"object","properties":{"id":{"type":"integer","description":"ID exportu."},"kind":{"type":"string","description":"Co se exportuje."},"format":{"type":"string","description":"Formát."},"filters":{"$ref":"#/components/schemas/ExportFilters"},"status":{"type":"string","enum":["pending","running","ready","failed"],"description":"Stav exportu. Hodnoty: `pending` – čeká ve frontě; `running` – zpracovává se; `ready` – připraveno ke stažení; `failed` – selhalo."},"error":{"type":["string","null"],"description":"Důvod selhání."},"processed":{"type":"integer","description":"Zpracováno dokladů."},"total":{"type":"integer","description":"Dokladů celkem."},"expires_at":{"anyOf":[{"$ref":"#/components/schemas/DateTime","description":"Do kdy lze soubor stáhnout (7 dní)."},{"type":"null"}],"description":"Do kdy lze soubor stáhnout (7 dní)."},"created_at":{"$ref":"#/components/schemas/DateTime"},"download_url":{"type":["string","null"],"description":"Odkaz ke stažení, když je `status` `ready`.","format":"uri"}}},"EmailQueued":{"type":"object","properties":{"email_id":{"type":"integer","description":"ID e-mailu ve frontě."},"status":{"type":"string","description":"Vždy `queued`."},"recipient":{"type":"string","description":"Příjemce.","format":"email"}}},"WebhookEvent":{"type":"object","additionalProperties":false,"required":["id","type","created_at","data"],"description":"Tělo webhooku. Nese jen typ události a odkaz na záznam; aktuální stav načtěte z `data.url`.","properties":{"id":{"type":"string","description":"ID události. Stejná událost může přijít víckrát; zpracujte ji podle `id` jen jednou.","examples":["evt_6f1c2a9b0d3e4f5a6b7c8d9e"]},"type":{"type":"string","enum":["invoice.created","invoice.updated","invoice.issued","invoice.deleted","payment.recorded","payment.reversed","contact.saved","contact.deleted","expense.saved","expense.paid","expense.deleted","export.ready","export.failed"],"description":"Typ události."},"created_at":{"$ref":"#/components/schemas/DateTime","description":"Kdy událost nastala."},"data":{"type":"object","additionalProperties":false,"required":["object","id","url"],"description":"Záznam, kterého se událost týká.","properties":{"object":{"type":"string","enum":["invoice","contact","expense","export"],"description":"Typ záznamu."},"id":{"type":"integer","description":"ID záznamu."},"url":{"type":"string","format":"uri","description":"Adresa záznamu v API."}}}},"example":{"id":"evt_6f1c2a9b0d3e4f5a6b7c8d9e","type":"invoice.issued","created_at":"2026-11-18T10:15:00+01:00","data":{"object":"invoice","id":123,"url":"https://api.fakturanet.cz/v1/invoices/123"}}}}},"webhooks":{"event":{"post":{"summary":"Událost","description":"Fakturanet pošle požadavek POST na adresu webhooku, když nastane vybraná událost. Odpovězte stavem 2xx do 10 sekund; jinak se doručení opakuje.","parameters":[{"name":"Fakturanet-Event","in":"header","required":true,"schema":{"type":"string"},"description":"Typ události, stejný jako `type` v těle."},{"name":"Fakturanet-Delivery","in":"header","required":true,"schema":{"type":"string"},"description":"ID události, stejné jako `id` v těle."},{"name":"Fakturanet-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"`t=<čas>,v1=<HMAC-SHA256 řetězce „čas.tělo“ s podpisovým klíčem>`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"2XX":{"description":"Událost přijata."}}}}}}