gl-references

Attach Gl Journal Entry Document

Attach an accounting document to a journal entry — the evidence retrofit.

A journal entry booked by hand used to be permanently unsupported: nothing attached a document to one, and only the ingest path stamps source_ref_type='item'. This is the door back. Create the document first with POST …/gl/documents (it can point at an already-uploaded file_id), then name it here; the entry read returns it in documents afterwards, and the VAT close counts the entry as documented.

It works on a posted entry, and inside a closed period. The link changes no amount, account, date or VAT figure and does not bump version_no — it is an append-only annotation, not a ledger edit, so the immutability guards do not apply to it. Attaching is not re-opening.

Idempotent: re-attaching the same document in the same role returns the existing link rather than a second one. 404 for an entry or a document that is not this company's. Returns the entry's full document list.

This is a retrofit, not a substitute for the pipeline. Do not transcribe a document into an entry and then attach the file — ingest it (POST …/uploads/) and accept what the coder proposes, so the booking is derived from the document rather than merely filed beside it.

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

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/{entry_id}/documents
  • Auth: none declared

Path parameters

company_idstring required
entry_idstring required

Headers

authorizationstring nullable

Cookies

access_tokenstring nullable

Request body

document_idstring required
role'source' | 'attachment' | 'evidence' | 'generated_pdf'

Response

Successful Response

Changes

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