1. Prepare the client and bank account
You need an API token withwrite permission and a company with a configured primary invoice numbering series. You can use a sandbox for testing.
Select a client through GET /clients and a bank account through GET /bank-accounts. Both must belong to the company assigned to the token. Replace clientId: 101 and bankAccountId: 201 in the example with their actual IDs.
If the client does not exist yet, create it through POST /clients. The API reference documents the parameters for these endpoints.
2. Create the invoice
unitPrice is the unit price excluding VAT, and vatRate is the VAT percentage. currencyId: 1 and unitId: 1 identify the euro and piece unit; see reference tables for other values.
The invoice number is generated from the primary numbering series. Both the issue and delivery dates default to today, with payment due 14 days after issue.
When retrying the same request, keep Idempotency-Key and the body unchanged. Use a new key for another invoice; see the idempotency rules.
The 201 Created response contains the invoice directly, without a data wrapper. Abbreviated illustrative example:
id alongside your local record. Fetch the current details through GET /invoices/{id}.
3. Download the PDF
Replace301 in the following request with the ID from the response:
invoice.pdf in the current directory. You can also use the response’s pdfDownloadUrl to access the same endpoint; it requires the same API token.
