Idoklad
Helpers that unwrap the SDK's envelope, returning the payload
on success and translating failures into .
Builds instances from resolved per-request credentials, using the
official iDoklad .NET SDK (IdokladSdk) and an -managed
. This is the iDoklad analogue of microsoft-365-service's graph_client.
Scoped accessor that resolves the credentials for the current request and lazily builds a
single shared by all services handling that request.
Raised when an upstream iDoklad API call does not succeed. Carries the upstream HTTP status
code, message and iDoklad error code so the failure can be surfaced to the caller.
Service configuration resolved from environment variables.
Mirrors the structure used by the sibling microsoft-365-service (config.py): non-secret
configuration and credential defaults live in environment variables. Per-request callers
can override the credential values through request headers (see
).
Default iDoklad OAuth2 client id (client credentials flow).
Default iDoklad OAuth2 client secret (client credentials flow).
Default iDoklad application id from the developer portal (required by client credentials flow).
Optional custom iDoklad API base url (defaults to the SDK production url when empty).
Optional custom Identity Server token url (defaults to the SDK production url when empty).
Default response language for the iDoklad API (Cz, Sk, En). Defaults to Cz.
True when both custom urls are configured (e.g. for a sandbox environment).
True when the default credential triplet is fully configured via environment variables.
Account agenda: the current agenda (company) and current user. Requires iDoklad credentials
(headers or environment defaults).
Get information about the current agenda (company).
Get information about the current user.
Contacts (customers/suppliers) agenda.
All endpoints require iDoklad credentials. Provide them as request headers
(X-ClientId, X-ClientSecret, X-ApplicationId) or rely on the service
environment defaults. See the Swagger description for details.
List contacts (paged).
Get a contact detail by id.
Get a pre-filled default contact model for creating a new contact.
Create a new contact.
Update an existing contact (the model id identifies the contact).
Delete a contact by id.
Issued (outgoing) invoices agenda. Requires iDoklad credentials (headers or environment
defaults).
List issued invoices (paged).
Get an issued invoice detail by id.
Get a pre-filled default model for creating a new issued invoice.
Create a new issued invoice.
Update an existing issued invoice (the model id identifies the invoice).
Create a copy (draft) of an existing issued invoice.
Delete an issued invoice by id.
Service metadata endpoints. These do not require iDoklad credentials.
Liveness probe.
Service name, version and language.
Reports whether the service has default iDoklad credentials configured through
environment variables. Per-request callers can always override them with headers.
Received (incoming) invoices agenda. Requires iDoklad credentials (headers or environment
defaults).
List received invoices (paged).
Get a received invoice detail by id.
Get a pre-filled default model for creating a new received invoice.
Create a new received invoice.
Update an existing received invoice (the model id identifies the invoice).
Delete a received invoice by id.
Supporting registers: bank accounts, VAT rates and numeric sequences. Requires iDoklad
credentials (headers or environment defaults).
List bank accounts (paged).
Get a bank account detail by id.
Create a new bank account.
Update an existing bank account (the model id identifies the account).
Delete a bank account by id.
List VAT rates (paged).
Get a VAT rate detail by id.
List numeric (document) sequences (paged).
Names of the HTTP headers that carry per-request iDoklad credentials.
Secrets are never accepted in the query string or request body: they are required in
request headers (and documented as such in Swagger). Each header carries the credential
value directly and must therefore only be sent over TLS.
Header carrying the response language override (Cz, Sk, En).
Fully resolved set of credentials and request options used to build a DokladApi
instance for a single request.
Raised when the request does not provide a complete set of iDoklad credentials,
neither through request headers nor through the service environment defaults.
Resolves the iDoklad credentials for the current request.
Mirrors get_request_settings from the sibling microsoft-365-service: each credential
value is taken from its request header when present and otherwise falls back to the
environment-configured default. Secrets are only ever read from headers (never query/body).
If, after applying the fallbacks, any required value is still missing, the request is rejected.
Documents the per-request credential headers in Swagger for every operation that talks to
iDoklad. The headers are marked optional because the service can fall back to environment
defaults, but the description makes the requirement and secret handling explicit.
Translates domain exceptions into JSON responses:
missing credentials become 401, and upstream iDoklad failures surface the upstream status.
Account agenda: information about the current agenda and the current user.
Contacts (customers/suppliers) agenda.
Issued (outgoing) invoices agenda.
Received (incoming) invoices agenda.
Supporting registers: bank accounts, VAT rates and numeric (document) sequences.