Factuarea APIDevelopers
Added

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:read to read, sales_orders:write to assign and revise) — GET|PATCH /v1/companies/{company}/sales-orders/{sales_order}/presentation, GET /v1/companies/{company}/sales-orders/{sales_order}/presentation-history and POST /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_select and can_revise), with a strong ETag. It never creates a capture and never renders a PDF.
  • Assigning takes template_id (null inherits) together with expected_version or the ETag in If-Match.
  • The history is paginated with page and per_page, newest capture first, and revising appends a derived capture to a retained one.
  • With render_activation at legacy, reading returns the inherited state without writing anything, and assigning or revising answers 422 with pdf_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.

ToolScopeWhat it does
get_sales_order_presentationsales_orders:readReads the selection and the retained capture of a sales order.
assign_sales_order_presentationsales_orders:writeAssigns a template to a sales order, or inherits.
list_sales_order_presentationssales_orders:readLists the retained captures of a sales order.
revise_sales_order_presentationsales_orders:writeAppends a revision to a retained capture of a sales order.
get_purchase_order_presentationpurchase_orders:readReads the selection and the retained capture of a purchase order.
assign_purchase_order_presentationpurchase_orders:writeAssigns a template to a purchase order, or inherits.
list_purchase_order_presentationspurchase_orders:readLists the retained captures of a purchase order.
revise_purchase_order_presentationpurchase_orders:writeAppends 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_defaults of PATCH /v1/companies/{company}/pdf-templates/defaults and of set_pdf_template_defaults admits them, and GET /v1/companies/{company}/pdf-templates/defaults returns them.
  • Templates. A template serves an order when supported_types lists its type and supported_purposes gives it ["complete"]. Create and publish a revision accept both fields, and GET /v1/companies/{company}/pdf-templates filters by document_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 for sales-order and a supplier for purchase-order. Any other contact answers 422 business_rule_violation with param role and the reason in subcode: customer_missing or supplier_missing without the role, customer_inactive or supplier_inactive with the role inactive, and contact_role_required for an archived contact.
  • Series. Of the two orders, only sales-order is assigned to a series template. Purchase orders take no series, and the series types purchase_order and return carry no template.
  • Impact. GET /v1/companies/{company}/pdf-templates/{template}/impact and GET /v1/companies/{company}/pdf-commercial-identities/{identity}/impact list associations with the two orders and with logistic-sheet. A contact association carries contact_id and contact_role (customer or supplier). In the impact of a template, retained_counts reports figures (presentations, prepared and pinned) and orders, with the confirmed sales orders and the sent purchase orders that retain their PDF with it; each figure is null when it could not be read.
  • Previews and artifacts. POST /v1/companies/{company}/pdf-template-previews and POST /v1/companies/{company}/pdf-artifacts accept both types as document_type.
  • Configuration. titles accepts the keys sales-order and purchase-order; columns[].id accepts supplier_sku, a column that only purchase orders print; and colors.ink takes brand or black, where only a logistic-sheet template stores black.
  • Selection in other responses. DocumentPresentationSelection.document_type accepts 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 accept sales-order and purchase-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_id when you set the template in PATCH /v1/companies/{company}/pdf-templates/defaults;
  • supported_purposes when you publish a revision of the main template;
  • replacements when 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}/send or POST /v1/companies/{company}/purchase-orders/{purchase_order}/mark-as-sent. Sending it again from sent keeps 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 200 with the PDF in the response itself, never 202. 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_sku column 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}/pdf and GET /v1/companies/{company}/invoices/{invoice}/pdf-link: invalid_param_value when format is not a4, ticket_80 or ticket_58, pdf_presentation_not_ready, and pdf_presentation_invalid with the same two subcodes.
  • GET /v1/companies/{company}/delivery-notes/{delivery_note}/pdf, GET /v1/companies/{company}/quotes/{quote}/pdf and GET /v1/companies/{company}/proformas/{proforma}/pdf: pdf_presentation_not_ready and pdf_presentation_invalid.
  • GET /v1/companies/{company}/invoices/{invoice}/payment-receipt: invalid_param_value when payment_id is not the identifier of a payment, and business_rule_violation with subcode no_active_payments (the invoice has no active payment) or payment_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_kind logistic-sheet, created and duplicated with POST /v1/companies/{company}/pdf-templates and its /duplicate, and listed with the document_kind filter of GET /v1/companies/{company}/pdf-templates. It accepts only branding, typography and colors. It is assigned as the default logistic-sheet of type_defaults, with the purpose complete; a commercial template cannot occupy that default, and logistic-sheet is never a supported type of a commercial template.
  • Ink. With colors.ink at black, the rules, the labels and the location plates print in black. With brand and 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_activation at revisioned, 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 200 with 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_instructions is an optional plain text of up to 300 characters on the shipment of a delivery note. Set it with PATCH /v1/companies/{company}/delivery-notes/{delivery_note}/shipment, where null clears it, and read it with GET /v1/companies/{company}/delivery-notes/{delivery_note}/shipment.
  • fragile is a boolean on each package, false when omitted. POST /v1/companies/{company}/delivery-notes/{delivery_note}/packages and PATCH /v1/companies/{company}/delivery-notes/{delivery_note}/packages/{package} accept it, and GET /v1/companies/{company}/delivery-notes/{delivery_note}/packages and the packages of the shipment return it.
  • A text of more than 300 characters, a text with HTML markup or a fragile that is not a boolean answers 422 naming 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 webhook event.

New endpoints8

EndpointDescription
PATCH/v1/companies/{company}/purchase-orders/{purchase_order}/presentationAssign the purchase-order visual template
GET/v1/companies/{company}/purchase-orders/{purchase_order}/presentationGet the purchase-order presentation
GET/v1/companies/{company}/purchase-orders/{purchase_order}/presentation-historyList retained purchase-order presentations
POST/v1/companies/{company}/purchase-orders/{purchase_order}/presentation-revisionsCreate a purchase-order presentation revision
PATCH/v1/companies/{company}/sales-orders/{sales_order}/presentationAssign the sales-order visual template
GET/v1/companies/{company}/sales-orders/{sales_order}/presentationGet the sales-order presentation
GET/v1/companies/{company}/sales-orders/{sales_order}/presentation-historyList retained sales-order presentations
POST/v1/companies/{company}/sales-orders/{sales_order}/presentation-revisionsCreate a sales-order presentation revision

Updated endpoints105

EndpointDescription
PATCH/v1/companies/{company}/delivery-notes/{delivery_note}/presentationAssign the delivery-note visual template
POST/v1/companies/{company}/delivery-notes/{delivery_note}/cancelCancel a delivery note
POST/v1/companies/{company}/delivery-notes/{delivery_note}/convertConvert delivery note to invoice
POST/v1/companies/{company}/delivery-notesCreate a delivery note
POST/v1/companies/{company}/delivery-notes/{delivery_note}/duplicateDuplicate a delivery note
POST/v1/companies/{company}/delivery-notes/find-by-external-idFind a delivery note by external ID
POST/v1/companies/{company}/delivery-notes/{delivery_note}/fulfilment-statusTransition the fulfilment status of a delivery note
GET/v1/companies/{company}/delivery-notes/{delivery_note}/presentationGet the delivery-note presentation
GET/v1/companies/{company}/delivery-notesList all delivery notes
POST/v1/companies/{company}/delivery-notes/{delivery_note}/mark-deliveredMark delivery note as delivered
POST/v1/companies/{company}/delivery-notes/{delivery_note}/packagesAdd a package to a delivery note
GET/v1/companies/{company}/delivery-notes/{delivery_note}/packagesList the packages of a delivery note
PATCH/v1/companies/{company}/delivery-notes/{delivery_note}/packages/{package}Update a package of a delivery note
GET/v1/companies/{company}/delivery-notes/{delivery_note}/pdfDownload delivery note PDF
POST/v1/companies/{company}/delivery-notes/{delivery_note}/presentation-revisionsCreate a delivery-note presentation revision
GET/v1/companies/{company}/delivery-notes/{delivery_note}/shipmentRetrieve the shipment of a delivery note
PATCH/v1/companies/{company}/delivery-notes/{delivery_note}/shipmentUpdate the shipment of a delivery note
GET/v1/companies/{company}/delivery-notes/{delivery_note}Retrieve a delivery note
POST/v1/companies/{company}/delivery-notes/{delivery_note}/signSign a delivery note
PATCH/v1/companies/{company}/delivery-notes/{delivery_note}Update a delivery note
GET/v1/companies/{company}/eventsList all events
GET/v1/companies/{company}/events/{event}Retrieve an event
POST/v1/companies/{company}/invoices/{invoice}/annulAnnul an invoice
PATCH/v1/companies/{company}/invoices/{invoice}/presentationAssign the invoice visual template
POST/v1/companies/{company}/invoices/{invoice}/assign-real-numberAssign a real invoice number
POST/v1/companies/{company}/invoices/{invoice}/correctiveGenerate corrective invoice
GET/v1/companies/{company}/invoices/{invoice}/correctivesList corrective invoices
POST/v1/companies/{company}/invoicesCreate an invoice
POST/v1/companies/{company}/invoices/{invoice}/duplicateDuplicate an invoice
POST/v1/companies/{company}/invoices/find-by-external-idFind an invoice by external ID
POST/v1/companies/{company}/invoices/find-by-numberFind an invoice by number
GET/v1/companies/{company}/invoices/{invoice}/presentationGet the invoice presentation
POST/v1/companies/{company}/invoices/{invoice}/issueIssue an invoice
GET/v1/companies/{company}/invoicesList all invoices
POST/v1/companies/{company}/invoices/{invoice}/mark-paidMark invoice as paid
POST/v1/companies/{company}/invoices/{invoice}/mark-sentMark an invoice as sent
GET/v1/companies/{company}/invoices/{invoice}/payment-receiptDownload the receipt PDF of a payment
GET/v1/companies/{company}/invoices/{invoice}/pdfDownload invoice PDF
GET/v1/companies/{company}/invoices/{invoice}/pdf-linkGenerate temporary PDF link
PATCH/v1/companies/{company}/invoices/{invoice}/rescheduleReschedule an invoice
POST/v1/companies/{company}/invoices/{invoice}/presentation-revisionsCreate an invoice presentation revision
POST/v1/companies/{company}/invoices/{invoice}/scheduleSchedule an invoice
POST/v1/companies/{company}/invoices/{invoice}/sendSend invoice by email
GET/v1/companies/{company}/invoices/{invoice}Retrieve an invoice
POST/v1/companies/{company}/invoices/substitute-simplifiedSubstitute simplified invoices with full invoice
POST/v1/companies/{company}/invoices/{invoice}/unscheduleUnschedule an invoice
POST/v1/companies/{company}/invoices/{invoice}/unsendUnsend an invoice
PATCH/v1/companies/{company}/invoices/{invoice}Update an invoice
POST/v1/companies/{company}/invoices/{invoice}/voidVoid an invoice
POST/v1/companies/{company}/pdf-artifactsPrepare an exact presentation PDF
GET/v1/companies/{company}/pdf-commercial-identities/{identity}/impactInspect the impact of a PDF commercial identity change
POST/v1/companies/{company}/pdf-template-previewsCreate a PDF template preview
POST/v1/companies/{company}/pdf-templates/{template}/archiveArchive a PDF template
GET/v1/companies/{company}/pdf-templates/contact-defaults/{contact}/{document_type}/{purpose}Retrieve a contact PDF template preference
PATCH/v1/companies/{company}/pdf-templates/contact-defaults/{contact}/{document_type}/{purpose}Set a contact PDF template preference
POST/v1/companies/{company}/pdf-templatesCreate a PDF template
GET/v1/companies/{company}/pdf-templates/defaultsRetrieve the PDF template defaults
PATCH/v1/companies/{company}/pdf-templates/defaultsUpdate the PDF template defaults
POST/v1/companies/{company}/pdf-templates/{template}/duplicateDuplicate a PDF template
GET/v1/companies/{company}/pdf-templates/{template}Retrieve a PDF template
GET/v1/companies/{company}/pdf-templates/{template}/impactInspect the impact of a PDF template change
GET/v1/companies/{company}/pdf-templatesList PDF templates
POST/v1/companies/{company}/pdf-templates/{template}/revisionsPublish a PDF template revision
POST/v1/companies/{company}/pdf-templates/{template}/restoreRestore a PDF template
GET/v1/companies/{company}/pdf-templates/{template}/revisions/{revision}Retrieve a PDF template revision
PATCH/v1/companies/{company}/pdf-templates/{template}Update PDF template metadata
POST/v1/companies/{company}/proformas/{proforma}/acceptAccept a proforma
PATCH/v1/companies/{company}/proformas/{proforma}/presentationAssign the proforma visual template
POST/v1/companies/{company}/proformas/{proforma}/convertConvert proforma to invoice
POST/v1/companies/{company}/proformasCreate a proforma
POST/v1/companies/{company}/proformas/{proforma}/duplicateDuplicate a proforma
POST/v1/companies/{company}/proformas/find-by-external-idFind a proforma by external ID
GET/v1/companies/{company}/proformas/{proforma}/presentationGet the proforma presentation
GET/v1/companies/{company}/proformasList all proformas
GET/v1/companies/{company}/proformas/{proforma}/pdfDownload proforma PDF
POST/v1/companies/{company}/proformas/{proforma}/rejectReject a proforma
POST/v1/companies/{company}/proformas/{proforma}/presentation-revisionsCreate a proforma presentation revision
POST/v1/companies/{company}/proformas/{proforma}/sendSend proforma by email
GET/v1/companies/{company}/proformas/{proforma}Retrieve a proforma
PATCH/v1/companies/{company}/proformas/{proforma}Update a proforma
POST/v1/companies/{company}/purchase-orders/{purchase_order}/mark-as-sentMark a purchase order as sent
GET/v1/companies/{company}/purchase-orders/{purchase_order}/pdfDownload purchase order PDF
POST/v1/companies/{company}/purchase-orders/{purchase_order}/sendSend a purchase order to its supplier
POST/v1/companies/{company}/quotes/{quote}/acceptAccept a quote
PATCH/v1/companies/{company}/quotes/{quote}/presentationAssign the quote visual template
POST/v1/companies/{company}/quotes/{quote}/convertConvert quote to invoice
POST/v1/companies/{company}/quotesCreate a quote
POST/v1/companies/{company}/quotes/{quote}/duplicateDuplicate a quote
POST/v1/companies/{company}/quotes/find-by-external-idFind a quote by external ID
GET/v1/companies/{company}/quotes/{quote}/presentationGet the quote presentation
GET/v1/companies/{company}/quotesList all quotes
GET/v1/companies/{company}/quotes/{quote}/pdfDownload quote PDF
POST/v1/companies/{company}/quotes/{quote}/rejectReject a quote
POST/v1/companies/{company}/quotes/{quote}/presentation-revisionsCreate a quote presentation revision
POST/v1/companies/{company}/quotes/{quote}/sendSend quote by email
GET/v1/companies/{company}/quotes/{quote}Retrieve a quote
PATCH/v1/companies/{company}/quotes/{quote}Update a quote
POST/v1/companies/{company}/sales-orders/{sales_order}/confirmConfirm a sales order
POST/v1/companies/{company}/sales-orders/{sales_order}/convert-to-delivery-noteConvert a sales order to a delivery note
POST/v1/companies/{company}/sales-orders/{sales_order}/convert-to-invoiceConvert a sales order to an invoice
GET/v1/companies/{company}/sales-orders/{sales_order}/pdfDownload sales order PDF
PATCH/v1/companies/{company}/series/{series}/pdf-templateAssign the PDF template of a series
GET/v1/companies/{company}/series/{series}/pdf-templateRetrieve the PDF template of a series
GET/v1/companies/{company}/webhook-endpoints/{webhook_endpoint}/deliveriesList webhook deliveries
GET/v1/companies/{company}/webhook-endpoints/{webhook_endpoint}/deliveries/{delivery}Retrieve webhook delivery

On this page

Need a hand?Contact support