201Successful Response
Schema: SuccessEnvelope_JournalEntryResponse_
successbooleanmessagestringcodestringdataJournalEntryResponse
/api/v1/journal-entriesCreate a new double-entry journal entry with balanced line entries.
Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.
Schema: JournalEntryCreateRequest
descriptionstringHuman-readable description of the journal entry. Should describe the transaction being recorded.
currencystringCurrency for the journal entry (USD, CAD, AUD, EUR, or GBP). Defaults to business default.
datestring · dateThe date when this transaction occurred. Use ISO 8601 date format (YYYY-MM-DD).
line_entriesarray · JournalLineEntryCreateArray 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_idstringOptional UUID of an invoice to link this journal entry to. Useful for tracking revenue recognition.
inventory_order_idstringOptional UUID of an inventory order (PO) to link this journal entry to. Useful for the PO audit trail.
combine_duplicate_linesbooleanWhen true, lines sharing the same ledger_id, debit_credit and counterparty_name are summed into one line (descriptions joined with '; ') before validation. When false, duplicate lines are refused with VALIDATION_206.
Schema: SuccessEnvelope_JournalEntryResponse_
successbooleanmessagestringcodestringdataJournalEntryResponseSchema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.