Create journal entry

POST /api/v1/journal-entries

Create a new double-entry journal entry with balanced line entries.

Operation ID: create_journal_entry_api_v1_journal_entries_post · View as markdown · OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

description string

Human-readable description of the journal entry. Should describe the transaction being recorded.

currency string

Currency for the journal entry (USD, CAD, AUD, EUR, or GBP). Defaults to business default.

date string · date

The date when this transaction occurred. Use ISO 8601 date format (YYYY-MM-DD).

line_entries array · object

Array of line entries (minimum 2). Total debits must equal total credits. Each entry requires: amount (integer in cents), debit_credit ('debit' or 'credit'), ledger_id (UUID of target ledger account), description (what this line represents).

invoice_id string

Optional UUID of an invoice to link this journal entry to. Useful for tracking revenue recognition.

inventory_order_id string

Optional UUID of an inventory order (PO) to link this journal entry to. Useful for the PO audit trail.

Responses

201 Successful Response

id string required

Unique identifier for this journal entry (UUID7).

description string required

Human-readable description of the transaction.

currency string

Currency for the journal entry (USD, CAD, AUD, EUR, or GBP).

entry_date string · date required

The date this transaction occurred.

invoice_id string

UUID of linked invoice, if this entry relates to an invoice.

inventory_order_id string

UUID of linked inventory order (PO), if this entry relates to a PO.

source string

Backend origin: manual, invoice, bill, credit_memo, transaction, stripe, shopify, plaid, ramp, square, system, teal

creation_method string

User-facing creation method: ai (system-generated) or manual (user-typed)

business_id string required

UUID of the business this entry belongs to.

line_entries array · LineEntryResponse

The debit and credit line entries that make up this journal entry. Will be empty list if not expanded.

thread JournalEntryThreadResponse

Comment thread information if this journal entry has comments. Contains thread_id, comments array, and comment_count.

created_at string · date-time

When this journal entry was created.

updated_at string · date-time

When this journal entry was last modified.

400 Bad Request - Invalid input

401 Unauthorized - Authentication required

403 Forbidden - Insufficient permissions

422 Validation Error

detail array · ValidationError ValidationError
5 fields
loc array · string | integer required
msg string required
type string required
input object
ctx object