Factuarea APIDevelopers
Improved

Control document templates have their own kind

PDF templates and their revisions report document_kind (commercial or transport-document). Create and duplicate accept it, the list filters by it, and the control documents default in PATCH /v1/companies/{company}/pdf-templates/defaults only accepts templates of the transport-document kind.

19 October 2026 (provisional: the final date is the day this release is published) — Every PDF template now has a kind: commercial for invoices, quotes, pro forma invoices and delivery notes, or transport-document for the transport control document (DeCA). The kind is fixed when the template is created and never changes. Everything is additive: the templates you already have report commercial.

document_kind in the template and in the revision

TenantPdfTemplate and PdfTemplateRevision carry document_kind, with the values commercial and transport-document. It appears in every response that returns a template or a revision, in the library operations and in the MCP tools of the resource.

A template of the transport-document kind accepts only branding, typography and colors in configuration, and no supported_* field. Any other key is rejected with 422 invalid_pdf_template_configuration and the offending param.

Create, duplicate and convert

POST /v1/companies/{company}/pdf-templates and the MCP tool create_pdf_template accept an optional document_kind in the body:

{
  "name": "Control document",
  "document_kind": "transport-document"
}
  • Omitted, it is commercial. An unknown value returns 422 invalid_pdf_template_configuration with param document_kind.
  • Creating a transport-document template without the transport documents module in the plan returns 403 feature_not_available_in_plan.

POST /v1/companies/{company}/pdf-templates/{template}/duplicate and duplicate_pdf_template accept the same field:

  • Duplicating a commercial template with document_kind: "transport-document" converts it: the copy is a new control document template that starts at version 1 and keeps only the design, font (limited to 8 to 11 pt), colors and brand of the source and drops its contents, tables, texts, page and custom fields. Duplicating a control template with document_kind: "commercial" returns 422 invalid_pdf_template_configuration with param document_kind, and so does an unknown value.
  • Omitted, the copy keeps the kind of the source.
  • It also returns 403 feature_not_available_in_plan when the plan has no transport documents module.

POST /v1/companies/{company}/pdf-templates/{template}/revisions and publish_pdf_template_revision reject document_kind: the kind of a template never changes, so sending it returns 422 invalid_pdf_template_configuration with param document_kind.

Filter the list

GET /v1/companies/{company}/pdf-templates and list_pdf_templates accept the query parameter document_kind. With commercial or transport-document the list contains only that kind. Omitted, it lists every kind, as before. Any other value returns 422 invalid_pdf_template_configuration with param document_kind.

The «control documents» default accepts only control templates

In PATCH /v1/companies/{company}/pdf-templates/defaults and set_pdf_template_defaults, the entry transport-document of type_defaults now admits only active templates of the transport-document kind in A4. A template of the commercial kind is rejected with 422 invalid_pdf_template_configuration and param type_defaults.N.template_id. This replaces the earlier rule that accepted any template whose current revision supported the a4 format, see Control documents use the PDF template library.

MCP tools

ToolChange
create_pdf_templateAccepts document_kind.
duplicate_pdf_templateAccepts document_kind, so it can convert a commercial template into a control one.
list_pdf_templatesAccepts document_kind as a filter.
publish_pdf_template_revisionRejects document_kind.
set_pdf_template_defaultsThe transport-document default only admits control templates.

The tables below list the operations of this release.

On this page

Need a hand?Contact support