Factuarea APIDevelopers
Improved

Control documents use the PDF template library

The PDF of the transport control document (DeCA) takes its design from the template library. New control documents default in PATCH /v1/companies/{company}/pdf-templates/defaults and in the MCP tool, and every version of the DeCA reports the design it was painted with in versions[].presentation.

19 October 2026 (provisional: the final date is the day this release is published) — The PDF of the transport control document now takes its design from the PDF template library: base design, colors, font and brand. The structure of the document stays the one the regulation fixes, so no template can move or remove a legal block. Everything is additive. With the revisioned presentation inactive the DeCA is rendered exactly as before.

The «control documents» default

PATCH /v1/companies/{company}/pdf-templates/defaults and the MCP tool set_pdf_template_defaults accept a new entry in type_defaults:

{
  "expected_version": 3,
  "type_defaults": [
    { "document_type": "transport-document", "purpose": "complete", "template_id": "0192f6a0-7c1e-7d3a-9f4b-5a2e8c1d3b60" }
  ]
}
  • Only transport-document with purpose: "complete" exists. Any other purpose for that type is rejected like any other invalid entry.
  • Derived compatibility. Any active template whose current revision supports the a4 format is valid, whatever its family. A template that only supports the receipt format is rejected with 422 invalid_pdf_template_configuration and param type_defaults.N.template_id.
  • type_defaults still replaces the whole list: send every entry you want to keep.
  • GET /v1/companies/{company}/pdf-templates/defaults and get_pdf_template_defaults return the entry when it exists.
  • The library impact of a template or of a brand (GET /v1/companies/{company}/pdf-templates/{template}/impact and GET /v1/companies/{company}/pdf-commercial-identities/{identity}/impact) accepts and reports transport-document, publishing a revision checks the same compatibility, and archiving a template that is the control documents default is handled like the other defaults.

Which design a document uses

For each new version of a DeCA the design is chosen in this order: the «control documents» default, then the company main template, then the legacy design. The choice is captured in the version when it is issued or modified, so later changes to the library never repaint a version that already exists. The proof of issuance uses the captured design as well.

versions[].presentation

Every version of a transport document carries presentation, a read-only object without the plan policy:

FieldMeaning
origintransport_document_default, company_default or legacy.
template_id, template_revision_idUUID v7 of the template and of the exact revision, or null.
template_nameName of the template when the version was issued, or null.
base_presetclassic, modern, minimal, corporative, premium or null.
commercial_identity_id, commercial_identity_revision_idUUID v7 of the brand and of its revision, or null.

Versions issued before the template library, or while the revisioned presentation was inactive, report origin: "legacy" and every other field as null. The same object travels in GET /v1/companies/{company}/transport-documents/{id}, in the list, in the response of every write operation, in the MCP tools of the resource and in the data.object of the transport_document.* webhooks, and therefore in GET /v1/companies/{company}/events, GET /v1/companies/{company}/events/{event} and the webhook deliveries (list and show).

The library operations this page mentions are new in PDF template library and structured invoices. The tables below list the control document operations, events and webhook deliveries whose responses change.

On this page

Need a hand?Contact support