Create invoice
Creates a new invoice.
Recommended flow
The recommended happy path is to send clientId and items. This is the simplest flow when the client already exists in Fintoro.
If the client does not exist yet or you do not want to perform a separate client create step, send the client object without clientId. The backend attempts to match an existing client and creates a new one only when no match is found.
If you send both clientId and client, the client object acts as a sparse snapshot override for this specific document. This lets you adjust, for example, the delivery address or contact details only for this invoice without changing the stored client record.
How defaults are resolved
Most document fields are optional. The backend resolves them in this order:
- explicit value from the payload,
- client default values,
- company document settings,
- system resolver.
In practice, this means for example:
deliveryMethodId,paymentMethodId,currencyId, andlanguageIdmay be resolved from the client or company settings,numberandnumericalSeriesIdare resolved from the primary numbering series when omitted,variableSymbolis derived from the final document number when omitted,bankAccountIdfalls back to the primary company bank account when omitted,currencyRateis resolved from the currency and delivery date,- if the final document currency is
EUR, the backend always stores and returnscurrencyRate = 1.0, even when you send a different value, issueDateanddeliveryDatedefault to today.
How client resolution works
Client resolution is strictly deterministic:
- when you send
clientId, the backend loads that client by ID within the token scope, - when
clientIdis omitted, theclientobject is used to match or create the client, - when you send both
clientIdandclient,clientis applied only as a snapshot override for this document.
Matching is deterministic and follows this order:
- for companies:
vatId, thencountryId + subjectId, thenname + email, thenname + street, - for people:
name + email, thenname + street.
If no match is found, a new client is created. If more than one client matches, the backend uses the first record in a stable order.
If you send an explicit clientId that does not exist or is outside the token scope, the endpoint returns a 422 validation error on clientId.
If you send an explicit bankAccountId and that record does not exist or is outside the token scope, the endpoint returns a 422 validation error on bankAccountId.
If you omit bankAccountId and the company has no primary bank account configured, the endpoint returns 422.
How line items work
A line item can be created in three ways:
- as a manual item with its own name, unit, price, and VAT rate,
- through
priceListItemIdandquantity, - through
priceListItemIdand sparse overrides for selected fields such as the price or name.
If you send a discount without discountName, the backend fills in a localized default discount label based on the document language.
Request examples
Existing client with a manual item:
Inline client without clientId:
Price list item with the minimum payload:
If you send an Idempotency-Key, the same key with the same payload returns the original response without creating the invoice again.
Authorizations
Headers
Body
- Option 1
- Option 2
Payload used to create an invoice. The usual happy path is clientId plus items; the backend can resolve many other values automatically. You must send either clientId or client.
Invoice line items. This field stays required even when the backend resolves most other values automatically.
1 - 100 elementsPayload for a single invoice line item. Three modes are supported: a manual item, priceListItemId + quantity, or priceListItemId with sparse override fields. quantity is always required. If you omit priceListItemId, you must also send name, unitPrice, and vatRate. unitId is optional; when you omit it for a manual item, the backend defaults to unit 1 (piece / Unit::Piece). If you send priceListItemId, the backend can hydrate the name, unit, unit price, and VAT rate from the price list item, and the payload acts only as a sparse override.
- Option 1
- Option 2
Delivery method ID from the delivery method reference table. Precedence is payload → client default → company document settings.
1
Payment method ID from the payment method reference table. Precedence is payload → client default → company document settings.
1
Currency ID from the currency reference table. Precedence is payload → client default → company document settings.
1
Language ID from the language reference table. Precedence is payload → client default → company document settings.
1
QR type ID from the QR type reference table. If omitted, the company document settings value is used.
1
Response
Invoice created.
Invoice.
Delivery method ID from the delivery method reference table.
1
Payment method ID from the payment method reference table.
1
Currency ID from the currency reference table.
1
Language ID from the language reference table.
1
QR type ID from the QR type reference table.
1

