gl

Create Gl Journal Entry

Create a draft journal entry by hand — accountant. It carries NO source document unless you name one.

Only the pipeline paths stamp source_ref_type/source_ref_id (an ingested document is 'item'), so by default a booking made here cannot be traced back to what justified it. document_id is the retrofit: name an existing gl_document (create one with POST …/gl/documents) and it is attached as the entry's source document, so the entry is not evidence-less. The same attach is available afterwards at POST …/gl/journal-entries/{id}/documents — including on a posted entry.

Use it for bookings with genuinely no document behind them — reclassifications, provisions, accruals, year-end adjustments. Do not transcribe a document into it and then attach the file — that files the evidence beside a booking nobody derived from it. Each of these has a door that keeps the evidence attached:

  • an invoice, receipt or statement → ingest the file (POST …/uploads/ or …/intake), then accept what the coder proposes (…/autopost-decisions);
  • an already-ingested item → POST …/gl/items/{item_id}/coding;
  • a bank movement with no document → POST /bank-entries/{entry_id}/manual-coding;
  • opening balances → POST …/opening-entries and post the proposal.

auto_reverse_date arms the entry as a one-shot accrual (ZCT-527): once posted, the auto-reversal executor reverses it in full on/after that date. It must be after posting_date (422 otherwise), and it can only be set while the entry is a draft — on the create here or on the PUT replace.

Drafts do not touch the books until …/post. See doc/pipeline.md §"Accounting".

post/companies/{company_id}/gl/journal-entries

Request

  • Base URL: https://app.zeno-works.ch (the document declares no server; this is the origin it was published from)
  • URL: https://app.zeno-works.ch/companies/{company_id}/gl/journal-entries
  • Auth: none declared

Path parameters

company_idstring required

Headers

authorizationstring nullable

Cookies

access_tokenstring nullable

Request body

period_idstring required
posting_datestring date required
currencystring nullable
entry_type'manual' | 'invoice' | 'payment' | 'bank' | 'vat' | 'payroll' | 'accrual' | 'deferral' | 'depreciation' | 'inventory' | 'closing' | 'adjustment' | 'reversal'
descriptionstring nullable
auto_reverse_datestring date nullable
document_idstring nullable

Response

Successful Response

idstring required
company_idstring required
entry_nointeger nullable
period_idstring required
posting_datestring date required
statusstring required
entry_typestring required
originstring required
descriptionstring nullable
debit_total_basestring required
credit_total_basestring required
line_countinteger required
version_nointeger required
reversal_of_entry_idstring nullable
reversed_by_entry_idstring nullable
auto_reverse_datestring date nullable
coding_guessedboolean
untagged_subledger_controlboolean
source_ref_typestring nullable
source_ref_idstring nullable
source_actionstring nullable
created_atstring date-time required
posted_bystring nullable
created_bystring nullable
posted_atstring date-time nullable

Changes

No recorded changes to this operation across all 1 revision of this API.