Journal Entries (v2)
Create a journal entry (v2)
Create a journal entry. For CUSTOMER_INVOICE / CUSTOMER_PAYMENT / SUPPLIER_INVOICE / SUPPLIER_PAYMENT,
submit only the counter-side lines (revenue, expense, bank, etc.). The server appends the AR/AP leg
on the customer's or vendor's group default account, with side derived from the sign of originalAmount
(positive = invoice/payment, negative = credit-note/refund). Including a line on the group default
account explicitly will be rejected.
For all other journal types this endpoint behaves identically to v1: pass through whatever lines you supply.
Attachments: include up to 10 base64-encoded files in the optional attachments[] field — same shape and
limits as v1. Each becomes a Document linked to the created entry and surfaces via
GET /api/v1/journal-entries/:id/attachments. Invalid MIME type or malformed base64 rejects the request
with 400 INVALID_ATTACHMENT_TYPE. Total request body must stay under 15MB.
Create a journal entry (v2) › Request Body
entryTypeJournal type. For CUSTOMER_INVOICE / CUSTOMER_PAYMENT / SUPPLIER_INVOICE / SUPPLIER_PAYMENT the AR/AP leg is appended automatically; do not include it in lines.
datePosting date (YYYY-MM-DD).
originalAmountOriginal amount of the invoice / payment. Sign carries direction: positive = invoice / payment, negative = credit-note / refund.
Counter-side lines (revenue / expense / bank / outlay). For locked types do NOT include the AR/AP leg.
customerIdCustomer reference. Required for CUSTOMER_* types.
vendorIdVendor reference. Required for SUPPLIER_* types.
descriptionOptional human-readable description.
referenceInvoice number / external reference.
currencyISO 4217 currency code. Defaults to company currency.
tagIdsTag IDs applied at the entry level.
journalCategoryIdJournal category ID (UUID). Must belong to the API key's app company; cross-tenant or unknown IDs are rejected with 400 JOURNAL_CATEGORY_NOT_FOUND. When omitted the entry uses the company's default category.
Inline file attachments (base64-encoded). Same shape and limits as v1: maximum 10 attachments per entry, individual files should not exceed 10MB before encoding, and the total request body (JSON + base64 payload) must stay under 15MB. Each attachment becomes a Document linked to the created journal entry — equivalent to what GET /api/v1/journal-entries/:id/attachments returns. Invalid MIME types or malformed base64 reject the whole entry with 400 INVALID_ATTACHMENT_TYPE; in a batch the whole batch rolls back.
Create a journal entry (v2) › Responses
Journal entry created successfully
idUnique identifier of the created journal entry
entryNumberEntry number assigned to the journal entry
dateDate of the journal entry
amountAmount of the transaction
currencyCurrency code
journalTypeJournal type
typeTransaction type
statusStatus of the journal entry
accountIdPrimary account ID
createdAtTimestamp when the entry was created
documentDateDocument date (date on the invoice/voucher). Null for legacy entries.
descriptionDescription of the journal entry
referenceReference number
externalSystemIdYour own system's id for this entry, when set. Not unique — several entries may share one id.
contraAccountIdContra account ID
customerIdCustomer ID if applicable
vendorIdVendor ID if applicable
vatCodeIdVAT/Tax code ID if applicable
tagIdsTag IDs attached to the entry
documentRefsDocument IDs attached to the entry
Create journal entries in batch (v2)
Atomically creates 1–100 journal entries in a single transaction. Each entry follows the same restrictions as POST /api/v2/journal-entries: for CUSTOMER_/SUPPLIER_ types submit only the counter-side lines and the server auto-appends the AR/AP leg on the partner group default account.
If any entry fails validation or persistence the entire batch is rolled back. journalCategoryId is validated per entry against the API key's app company — cross-tenant or unknown IDs reject the whole batch with 400 JOURNAL_CATEGORY_NOT_FOUND.
Attachments: each entry may include up to 10 base64-encoded attachments[]. A failure on any entry
rolls back the whole batch and deletes every already-uploaded blob — no orphan documents survive.
Create journal entries in batch (v2) › Request Body
Array of 1–100 journal entries. Wrapped in a single transaction; one bad entry rolls back the whole batch.
Create journal entries in batch (v2) › Responses
Batch created successfully
totalCreatedNumber of journal entries created (= entries.length on success).
Created journal entries, ordered to match the request entries[].