Create proforma
Creates a new proforma.
Recommended flow
The recommended happy path is to send clientId and items.
If the client does not exist yet or you do not want 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 proforma.
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:
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,dueDateDaysmay be resolved from client preferences or company document settings,deliveryMethodId,paymentMethodId,currencyId,languageId,qrTypeId,note, andtextAboveItemsmay be resolved from the client or company settings,issueDatedefaults 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.
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.
If you send an Idempotency-Key, the same key with the same payload returns the original response without creating the proforma again.
Authorizations
Headers
Body
- Option 1
- Option 2
Payload used to create a proforma. The usual happy path is clientId plus items; the backend can resolve many other values automatically. You must send either clientId or client.
Proforma line items. This field stays required at all times.
1 - 100 elementsPayload for a single proforma 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 then acts only as a sparse override. Per-item uuid is not part of the request contract; if you send it, the backend ignores it. warehouseAllocations are not supported for proformas.
- 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
Proforma created.
Proforma.
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

