iDoklad Integration
Integration with the iDoklad accounting system (idoklad.cz). Automatic invoice synchronization including contact creation, VAT rate, currency, and country mapping. Supports OAuth2 authentication and PDF attachment upload.
Screenshots and a more detailed guide are coming soon.
OAuth2 access configuration
In the 'iDoklad API Integration' feature settings, enter the Client ID and Client Secret from your idoklad.cz account. The system automatically obtains an access token using OAuth2 client_credentials flow (token endpoint: identity.idoklad.cz). Tokens are automatically refreshed 60 seconds before expiry.
Sending invoice to iDoklad
In the invoice detail, click 'Dispatch to iDoklad'. The system: 1) Searches for the contact in iDoklad (by saved ID, ID number, or VAT ID), or creates a new one, 2) Transforms the invoice — maps currency (CZK→1, EUR→2, USD→3, GBP→4...), VAT rates (21%→basic, 12/15%→reduced, 0%→zero), payment methods and country, 3) Sends issued invoices to /v3/IssuedInvoices or received to /v3/ReceivedInvoices, 4) Uploads the PDF attachment to the invoice. The system detects existing invoices by variable symbol and updates them instead of creating duplicates.
VAT and currency mapping
The system automatically maps Czech VAT rates to iDoklad internal codes: 21% → basic rate (code 1), 12% and 15% → reduced rate (code 0), 10% → second reduced (code 3), 0% → zero rate (code 2). Currencies are mapped from ISO codes to iDoklad codes: CZK (1), EUR (2), USD (3), GBP (4), HUF (8), PLN (6), CHF (11), and more. Countries are mapped similarly: CZ (2), SK (3), DE (4), AT (14), PL (23).
