Orders and warehouse sheets in the template library
Sales orders and purchase orders are document types of the PDF template library, with presentation operations of their own, and the six warehouse sheets take their brand from it. Eight new operations, eight MCP tools, the types sales-order, purchase-order and logistic-sheet, and new fields on shipments and packages.
2 December 2026 (provisional: the final date is the day this release is published) — Sales orders and purchase orders are document types of the PDF template library, next to invoices, quotes, pro-formas and delivery notes: they have templates, defaults and a presentation of their own, and their PDF follows the library. The six warehouse sheets take the logo, the typography and the colors of the library as well. Four guides explain each part: Document presentations, PDF previews and artifacts, Sales orders and Purchasing and receiving.
Operations are written as METHOD /path. Every new and updated operation is listed at
the end of this page and links to its API Reference page.
Presentation of each order
Eight new operations give each order the four presentation operations that delivery notes have, with the same state, the same version check and the same response shapes:
- Sales orders (
sales_orders:readto read,sales_orders:writeto assign and revise) —GET|PATCH /v1/companies/{company}/sales-orders/{sales_order}/presentation,GET /v1/companies/{company}/sales-orders/{sales_order}/presentation-historyandPOST /v1/companies/{company}/sales-orders/{sales_order}/presentation-revisions. - Purchase orders (
purchase_orders:read/purchase_orders:write) — the same four operations under/v1/companies/{company}/purchase-orders/{purchase_order}/.
How they behave:
- Reading returns the selection, the retained capture and what the caller can do
(
selection,captured_presentation,selection_candidate,render_activation,can_selectandcan_revise), with a strongETag. It never creates a capture and never renders a PDF. - Assigning takes
template_id(nullinherits) together withexpected_versionor theETaginIf-Match. - The history is paginated with
pageandper_page, newest capture first, and revising appends a derived capture to a retained one. - With
render_activationatlegacy, reading returns the inherited state without writing anything, and assigning or revising answers422withpdf_presentation_not_ready.
MCP tools
The MCP server publishes eight new tools, one for each of these operations. The company
comes from the MCP session, so no tool takes a company argument. See the
tool catalog.
| Tool | Scope | What it does |
|---|---|---|
get_sales_order_presentation | sales_orders:read | Reads the selection and the retained capture of a sales order. |
assign_sales_order_presentation | sales_orders:write | Assigns a template to a sales order, or inherits. |
list_sales_order_presentations | sales_orders:read | Lists the retained captures of a sales order. |
revise_sales_order_presentation | sales_orders:write | Appends a revision to a retained capture of a sales order. |
get_purchase_order_presentation | purchase_orders:read | Reads the selection and the retained capture of a purchase order. |
assign_purchase_order_presentation | purchase_orders:write | Assigns a template to a purchase order, or inherits. |
list_purchase_order_presentations | purchase_orders:read | Lists the retained captures of a purchase order. |
revise_purchase_order_presentation | purchase_orders:write | Appends a revision to a retained capture of a purchase order. |
Fifteen existing tools take the new values and fields with the same contract as their
REST operations: list_pdf_templates, create_pdf_template, duplicate_pdf_template,
publish_pdf_template_revision, set_pdf_template_defaults,
get_pdf_template_contact_default, set_pdf_template_contact_default,
get_pdf_template_impact, preview_pdf_template and prepare_pdf_artifact for the
document types of the library, and get_delivery_note_shipment,
update_delivery_note_shipment, create_delivery_note_package,
update_delivery_note_package and list_delivery_note_packages for the shipment fields.
Document types, templates and defaults
sales-order and purchase-order are new values of document_type, always with the
purpose complete and the a4 format, in the API and in the MCP tools:
- Company defaults.
type_defaultsofPATCH /v1/companies/{company}/pdf-templates/defaultsand ofset_pdf_template_defaultsadmits them, andGET /v1/companies/{company}/pdf-templates/defaultsreturns them. - Templates. A template serves an order when
supported_typeslists its type andsupported_purposesgives it["complete"]. Create and publish a revision accept both fields, andGET /v1/companies/{company}/pdf-templatesfilters bydocument_type. - Contact defaults.
GET|PATCH /v1/companies/{company}/pdf-templates/contact-defaults/{contact}/{document_type}/{purpose}accepts both types: the contact must be a customer forsales-orderand a supplier forpurchase-order. Any other contact answers422business_rule_violationwithparamroleand the reason insubcode:customer_missingorsupplier_missingwithout the role,customer_inactiveorsupplier_inactivewith the role inactive, andcontact_role_requiredfor an archived contact. - Series. Of the two orders, only
sales-orderis assigned to a series template. Purchase orders take no series, and the series typespurchase_orderandreturncarry no template. - Impact.
GET /v1/companies/{company}/pdf-templates/{template}/impactandGET /v1/companies/{company}/pdf-commercial-identities/{identity}/impactlist associations with the two orders and withlogistic-sheet. A contact association carriescontact_idandcontact_role(customerorsupplier). In the impact of a template,retained_countsreports figures (presentations,preparedandpinned) andorders, with the confirmed sales orders and the sent purchase orders that retain their PDF with it; each figure isnullwhen it could not be read. - Previews and artifacts.
POST /v1/companies/{company}/pdf-template-previewsandPOST /v1/companies/{company}/pdf-artifactsaccept both types asdocument_type. - Configuration.
titlesaccepts the keyssales-orderandpurchase-order;columns[].idacceptssupplier_sku, a column that only purchase orders print; andcolors.inktakesbrandorblack, where only alogistic-sheettemplate storesblack. - Selection in other responses.
DocumentPresentationSelection.document_typeaccepts both values. The operations of invoices, quotes, pro-formas and delivery notes that return the selection publish the wider enum, and so do the events and webhook deliveries that embed those documents. A client that validates the enum should acceptsales-orderandpurchase-order.
Main template coverage
A template that serves as the main template of the company must be able to render every
document type of the library, the two orders included. Setting or publishing as main a
template whose supported_types lists only invoices, quotes, pro-formas and delivery
notes answers 422 with code invalid_pdf_template_configuration, and param names
the field:
company_template_idwhen you set the template inPATCH /v1/companies/{company}/pdf-templates/defaults;supported_purposeswhen you publish a revision of the main template;replacementswhen you archive the main template with a replacement that does not cover them.
To keep a narrower template as the main one, publish a revision with sales-order and
purchase-order added to supported_types and ["complete"] for each in
supported_purposes. A template created without supported_types serves all six
document types and can be the main one. A narrower template serves the types it lists,
as the template of a series, a contact or a type. For the templates that serve invoices,
quotes, pro-formas and delivery notes with every purpose, Factuarea publishes a new
revision with the two order types added; templates restricted to fewer types are left as
they are.
When an order retains its presentation
The presentation of an order is retained once, when the order leaves draft:
- A sales order retains it when it is confirmed with
POST /v1/companies/{company}/sales-orders/{sales_order}/confirm. - A purchase order retains it at its first send, with
POST /v1/companies/{company}/purchase-orders/{purchase_order}/sendorPOST /v1/companies/{company}/purchase-orders/{purchase_order}/mark-as-sent. Sending it again fromsentkeeps the retained presentation.
The capture holds the template and its revision, the commercial identity and its revision, the plan policy, the format, the purpose and the language. The content (lines, quantities, addresses, dates and notes) is read from the order every time its PDF is generated: a permitted edit after confirmation appears in the PDF, and the design stays the retained one. A draft has no capture; its PDF uses the presentation that the selection resolves at that moment and carries a draft watermark, and an order cancelled from draft has none either and carries a cancelled watermark.
The operations of the orders take no presentation field and no precondition. Choose the
template with the presentation operations above; confirming or sending retains whatever is
current at that moment. GET /v1/companies/{company}/sales-orders/{sales_order}/pdf,
GET /v1/companies/{company}/purchase-orders/{purchase_order}/pdf, the two purchase
order send operations and the 409 of the sales order confirmation declare the codes
pdf_presentation_conflict and pdf_presentation_context_changed: none of them changes
anything, so read the presentation again and repeat the call.
With render_activation at legacy, nothing is captured, the presentation operations
answer as described above and the PDF of the order is generated with the legacy design.
The PDF of an order
- One response. The PDF routes of both orders answer
200with the PDF in the response itself, never202. The download, the API, the MCP tools, the email attachment and the sales order ZIP produce the same document, with the same template. - Retained PDF. An order with a capture retains its PDF: a download serves the retained PDF of the current content, or generates it, retains it and serves it. Editing a permitted section produces a new retained PDF, and the original of the moment of confirmation or first send is kept. Drafts and orders cancelled from draft are generated without retaining anything.
- References. A sales order prints its own reference, the channel, the payment of the online store, the warehouse it ships from and the carrier of its delivery notes. A purchase order prints the quote of the supplier, the contact and where to deliver, and its expected date reads as the expected reception. A row without a value is not printed.
- Tracking QR. In the slot where an invoice prints its payment block, a confirmed sales order whose public link is active prints a QR code of that link, with its address. A purchase order prints a reception note there, asking the supplier to quote the order number on the delivery note. Neither one prints fiscal or payment data.
- Supplier reference. The
supplier_skucolumn prints the supplier reference of each line of a purchase order and is empty in a sales order. - Watermarks. A draft and a cancelled order carry an automatic watermark, in the language of the document, that no template configures.
The 422 of the PDF downloads
GET /v1/companies/{company}/sales-orders/{sales_order}/pdf and
GET /v1/companies/{company}/purchase-orders/{purchase_order}/pdf answer 422
pdf_presentation_invalid when the PDF cannot be produced with the template that applies
to the order: param names what does not fit, such as configuration.columns, and
subcode is columns_exceed_page_width or required_document_content_hidden.
The other downloads declare their own 422 with the codes they answer:
GET /v1/companies/{company}/invoices/{invoice}/pdfandGET /v1/companies/{company}/invoices/{invoice}/pdf-link:invalid_param_valuewhenformatis nota4,ticket_80orticket_58,pdf_presentation_not_ready, andpdf_presentation_invalidwith the same two subcodes.GET /v1/companies/{company}/delivery-notes/{delivery_note}/pdf,GET /v1/companies/{company}/quotes/{quote}/pdfandGET /v1/companies/{company}/proformas/{proforma}/pdf:pdf_presentation_not_readyandpdf_presentation_invalid.GET /v1/companies/{company}/invoices/{invoice}/payment-receipt:invalid_param_valuewhenpayment_idis not the identifier of a payment, andbusiness_rule_violationwithsubcodeno_active_payments(the invoice has no active payment) orpayment_reversed(the payment was reversed and has no receipt).
Warehouse sheets
The six warehouse sheets (picking sheet, packing list, shipping label, transfer note, return sheet and receipt sheet) take the logo or brand image, the commercial identity, the typography, the colors and the ink from the library. Whatever the template, each sheet has its own geometry, its boxes to fill by hand, its grouping by location and its way of printing batches. The shipping label takes only the typography and always prints in black.
- Which template styles them. The warehouse sheets template of the company when it has one, then the main template, and without either the logo and the settings saved in the company. A sheet is never retained: each print uses the revision published at that moment.
- Warehouse sheets template. It is a template with
document_kindlogistic-sheet, created and duplicated withPOST /v1/companies/{company}/pdf-templatesand its/duplicate, and listed with thedocument_kindfilter ofGET /v1/companies/{company}/pdf-templates. It accepts onlybranding,typographyandcolors. It is assigned as the defaultlogistic-sheetoftype_defaults, with the purposecomplete; a commercial template cannot occupy that default, andlogistic-sheetis never a supported type of a commercial template. - Ink. With
colors.inkatblack, the rules, the labels and the location plates print in black. Withbrandand a color of low contrast, the labels darken and the plates print in black. - Barcodes. The picking sheet, the transfer note, the receipt sheet of a single entry and the numbered return sheet print their number as a Code 128 barcode. Scanning it in the search box of the matching list in the app opens the document when the number matches exactly one result.
- More content. With
render_activationatrevisioned, the sheets also print warehouse additions, such as a picked column and a checked-by box on the picking sheet and a box for the delivery note of the supplier on the receipt sheet. - Routes. The PDF routes of the sheets answer
200with the PDF in the response itself; no operation is added for them.
Delivery instructions and fragile packages
Two new fields of the shipment, described in Fulfilment and returns:
delivery_instructionsis an optional plain text of up to 300 characters on the shipment of a delivery note. Set it withPATCH /v1/companies/{company}/delivery-notes/{delivery_note}/shipment, wherenullclears it, and read it withGET /v1/companies/{company}/delivery-notes/{delivery_note}/shipment.fragileis a boolean on each package,falsewhen omitted.POST /v1/companies/{company}/delivery-notes/{delivery_note}/packagesandPATCH /v1/companies/{company}/delivery-notes/{delivery_note}/packages/{package}accept it, andGET /v1/companies/{company}/delivery-notes/{delivery_note}/packagesand the packages of the shipment return it.- A text of more than 300 characters, a text with HTML markup or a
fragilethat is not a boolean answers422naming the field. - The shipping label prints the instructions and the fragile warning of its package, and the packing list prints the fragile mark of each package.
- Both fields also travel in the events and webhook deliveries that embed shipments and
packages:
GET /v1/companies/{company}/events,GET /v1/companies/{company}/events/{event}, the webhook deliveries and the webhookevent.
New endpoints8
| Endpoint | Description |
|---|---|
PATCH/v1/companies/{company}/purchase-orders/{purchase_order}/presentation | Assign the purchase-order visual template |
GET/v1/companies/{company}/purchase-orders/{purchase_order}/presentation | Get the purchase-order presentation |
GET/v1/companies/{company}/purchase-orders/{purchase_order}/presentation-history | List retained purchase-order presentations |
POST/v1/companies/{company}/purchase-orders/{purchase_order}/presentation-revisions | Create a purchase-order presentation revision |
PATCH/v1/companies/{company}/sales-orders/{sales_order}/presentation | Assign the sales-order visual template |
GET/v1/companies/{company}/sales-orders/{sales_order}/presentation | Get the sales-order presentation |
GET/v1/companies/{company}/sales-orders/{sales_order}/presentation-history | List retained sales-order presentations |
POST/v1/companies/{company}/sales-orders/{sales_order}/presentation-revisions | Create a sales-order presentation revision |