Draft Journal Entries (v2)
Create draft journal entries in batch (v2)
Atomically creates 1–100 draft journal entries in a single transaction. Each entry follows the same restrictions as POST /api/v2/draft-journal-entries: auto-append of the AR/AP leg for locked types, tenant-scoped customerId / vendorId / journalCategoryId / line accountId validation.
If any entry fails validation or persistence the entire batch is rolled back — no draft rows are created. journalCategoryId / customerId / vendorId / accountId from another tenant rejects the whole batch with the matching error code.
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 draft journal entries in batch (v2) › Request Body
Array of 1–100 draft journal entries. Wrapped in a single transaction; one bad entry rolls back the whole batch.
Create draft journal entries in batch (v2) › Responses
Batch created — every draft persisted
totalCreatedNumber of drafts created (= entries.length on success).
Created draft journal entries, ordered to match the request entries[].
List draft journal entries (v2)
Returns a paginated list of draft journal entries owned by the API key's app company. Tenant-scoped: drafts created by other companies are never visible here. Identical response shape to GET /api/v1/draft-journal-entries.
query Parameters
pagePage number (1-indexed)
limitMaximum items per page
fromDateOnly include drafts on or after this date (YYYY-MM-DD)
toDateOnly include drafts on or before this date (YYYY-MM-DD)
accountIdFilter by account ID (matches any draft line on this account)
customerIdFilter by customer ID
vendorIdFilter by vendor ID
journalTypeFilter by journal type
minAmountOnly include drafts with an amount greater than or equal to this value (inclusive).
maxAmountOnly include drafts with an amount less than or equal to this value (inclusive).
externalSystemIdExact-match filter on your own system's id. Not unique — several drafts may share one id, so expect zero or more results.
searchFree-text search in description and reference fields
List draft journal entries (v2) › Responses
Drafts retrieved
List of draft journal entries
totalTotal number of matching drafts
pageCurrent page number
limitItems per page
totalPagesTotal number of pages
Create a draft journal entry (v2)
Creates a draft journal entry with the V2 restriction matrix enforced at create-time (unlike v1, which only validates on book). For CUSTOMER_INVOICE / CUSTOMER_PAYMENT / SUPPLIER_INVOICE / SUPPLIER_PAYMENT submit only the counter-side lines — the server auto-appends the AR/AP leg on the partner group default account.
Tenant scoping: every customerId / vendorId / journalCategoryId / line accountId is validated against the API key's app company. Cross-tenant or unknown ids reject with 400 (JOURNAL_CATEGORY_NOT_FOUND, ACCOUNT_NOT_FOUND, CUSTOMER_HAS_NO_GROUP, VENDOR_HAS_NO_GROUP, INVOICE_AR_LEG_NOT_ON_GROUP_DEFAULT, PAYMENT_AR_LEG_NOT_ON_GROUP_DEFAULT, INVOICE_AP_LEG_NOT_ON_GROUP_DEFAULT, PAYMENT_AP_LEG_NOT_ON_GROUP_DEFAULT).
Attachments: include up to 10 base64-encoded files in the optional attachments[] field —
same shape and limits as POST /api/v2/journal-entries. Each becomes a Document linked to the
draft; when the draft is booked, the documents migrate to the posted JE and surface via
GET /api/v1/journal-entries/:id/attachments. Rejection paths: an invalid MIME type rejects at
DTO validation with 400 SHARED_VALIDATION_FAILED; malformed base64 reaches the service and
rejects with 400 INVALID_ATTACHMENT_TYPE.
Create a draft 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.
externalSystemIdYour own system's id for this draft. Carried onto the booked journal entry. Not unique — several drafts/entries may share one id. Filter the list endpoint by externalSystemId.
Create a draft journal entry (v2) › Responses
Draft created
idDraft journal entry ID
dateDate in YYYY-MM-DD format
amountDenormalized amount in base/functional currency (e.g. DKK). Computed as MAX(debitTotal, creditTotal) from lines, converted via exchangeRate.
currencyCurrency code
journalTypeJournal type
statusAlways "DRAFT" for draft journal entries
createdAtCreation timestamp
updatedAtLast update timestamp
documentDateDocument date (date on the invoice/voucher). Null when not set.
descriptionDescription
referenceReference number
externalSystemIdYour own system's id for this draft, when set. Not unique. null when unset or cleared.
typeTransaction type (debit or credit)
accountIdPrimary account ID
contraAccountIdContra account ID
customerIdCustomer ID
vendorIdVendor ID
vatCodeIdVAT/Tax code ID
tagIdsTag/Dimension IDs
documentRefsDocument IDs attached to the draft
Split entry lines
Get a single draft journal entry (v2)
Returns the draft if it belongs to the API key's app company; 404 otherwise. Identical response shape to GET /api/v1/draft-journal-entries/:id.
path Parameters
idDraft journal entry ID (UUID)
Get a single draft journal entry (v2) › Responses
Draft retrieved
idDraft journal entry ID
dateDate in YYYY-MM-DD format
amountDenormalized amount in base/functional currency (e.g. DKK). Computed as MAX(debitTotal, creditTotal) from lines, converted via exchangeRate.
currencyCurrency code
journalTypeJournal type
statusAlways "DRAFT" for draft journal entries
createdAtCreation timestamp
updatedAtLast update timestamp
documentDateDocument date (date on the invoice/voucher). Null when not set.
descriptionDescription
referenceReference number
externalSystemIdYour own system's id for this draft, when set. Not unique. null when unset or cleared.
typeTransaction type (debit or credit)
accountIdPrimary account ID
contraAccountIdContra account ID
customerIdCustomer ID
vendorIdVendor ID
vatCodeIdVAT/Tax code ID
tagIdsTag/Dimension IDs
documentRefsDocument IDs attached to the draft
Split entry lines
Delete a draft journal entry (v2)
Deletes a draft journal entry. Any attached documents are released back to the inbox (status reset to NEW). Returns 404 if the draft id does not belong to the API key's app company.
path Parameters
idDraft journal entry ID (UUID)
Delete a draft journal entry (v2) › Responses
Draft deleted successfully
Update a draft journal entry (v2)
Partial update: every create-time field is accepted except entryType (the journal type pins
constraints decided at creation and is immutable) and attachments (own lifecycle). Omitted fields
keep their current values; splitEntries, when provided, replaces the full line set.
externalSystemId is carried onto the booked journal entry when the draft is booked, and is not
unique: several drafts or entries may share one id. Filter
GET /draft-journal-entries?externalSystemId=... to list carriers.
Reviewed (locked) drafts reject updates with 400 DRAFT_REVIEWED_LOCKED — unmark the review first. Concurrent updates are last-write-wins.
path Parameters
idDraft journal entry ID (UUID)
Update a draft journal entry (v2) › Request Body
datePosting date (YYYY-MM-DD).
originalAmountOriginal amount of the invoice / payment. Sign carries direction: positive = invoice / payment, negative = credit-note / refund.
customerIdCustomer reference. null clears it; omitting keeps it. Changing it reshapes the entry — requires lines and re-runs the per-entryType validation (CUSTOMER_* types cannot clear their counterparty).
vendorIdVendor reference. null clears it; omitting keeps it. Changing it reshapes the entry — requires lines and re-runs the per-entryType validation (SUPPLIER_* types cannot clear their counterparty).
descriptionOptional human-readable description.
referenceInvoice number / external reference.
currencyISO 4217 currency code. Defaults to company currency.
Counter-side lines (revenue / expense / bank / outlay). For locked types do NOT include the AR/AP leg.
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.
externalSystemIdYour own system's id. null clears the value; omitting the field keeps it.
Update a draft journal entry (v2) › Responses
Draft updated
idDraft journal entry ID
dateDate in YYYY-MM-DD format
amountDenormalized amount in base/functional currency (e.g. DKK). Computed as MAX(debitTotal, creditTotal) from lines, converted via exchangeRate.
currencyCurrency code
journalTypeJournal type
statusAlways "DRAFT" for draft journal entries
createdAtCreation timestamp
updatedAtLast update timestamp
documentDateDocument date (date on the invoice/voucher). Null when not set.
descriptionDescription
referenceReference number
externalSystemIdYour own system's id for this draft, when set. Not unique. null when unset or cleared.
typeTransaction type (debit or credit)
accountIdPrimary account ID
contraAccountIdContra account ID
customerIdCustomer ID
vendorIdVendor ID
vatCodeIdVAT/Tax code ID
tagIdsTag/Dimension IDs
documentRefsDocument IDs attached to the draft
Split entry lines
Book a draft journal entry (v2)
Converts a draft journal entry into a posted journal entry. Validates the posting period and balance, then permanently deletes the draft. V2 drafts already carry the auto-appended AR/AP leg, so booking is a clean handoff to the posted-JE pipeline — no duplicate anchor leg is created. Returns 404 if the draft id does not belong to the API key's app company.
path Parameters
idDraft journal entry ID (UUID)
Book a draft journal entry (v2) › Responses
Draft booked successfully — returns the created journal entry
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