Attaching terms as a PDF to order confirmations
How to attach the approved terms version as a PDF artifact from the Public Delivery API to transactional order confirmations — versioned and traceable.
Attaching terms as a PDF to order confirmations
A common request in shop and booking systems: the order confirmation should include a PDF of the terms containing exactly the version approved at the time of the order. Hand-maintained PDF files in the mail template routinely fail at this — they age and lose the link to the version actually live.
TermShelf serves the PDF as an artifact from exactly the approved version. The shop or mail system fetches it at send time and attaches it — no local copy, no manual refresh.
Technical implementation
The operational flow is identical in most systems:
- When generating the order confirmation, fetch the terms PDF artifact via the Public Delivery API.
- Optionally reference a specific version via
?version=Nor?effective_at=<ISO-8601>. - Attach the PDF to the transactional email.
- Store the version number used with the order so it can be retrieved again later.
Endpoints and headers are in the API reference. HTML and JSON paths as alternatives are covered in the overview legal texts in order and contract confirmations and on the feature page transactional delivery. The implementation per shop system is described in Shopware, terms and withdrawal as a PDF in Shopify order confirmations, WooCommerce and the shop-system overview.
Versioning and provability
The real value is not the PDF itself but the version reference. Because every approved version is an immutable, dated snapshot, it can later be determined unambiguously which terms version accompanied a specific order. Which version applied when is covered in which terms version applied at contract conclusion.
Common mistakes
- A static PDF in the mail template that is never updated — a classic case of footer/email drift.
- The PDF is generated at order time, but the version number is stored nowhere.
- Language or market variants are ignored, so every order receives the same PDF.
Boundary
TermShelf does not produce legally binding content and is not a substitute for legal advice. A PDF attachment is a technical delivery path and does not automatically satisfy every requirement of a specific use case. The assessment remains with the user in coordination with qualified counsel.
Frequently asked questions
- How do I attach the terms as a PDF to an order confirmation?
- When generating the confirmation, the shop or mail system fetches the PDF artifact of the approved terms via the Public Delivery API and attaches it. A specific version can be referenced via ?version=N or ?effective_at=<ISO-8601>.
- Does it stay traceable which terms version was attached?
- Yes, provided the version number used is stored with the order. Since every publication is a dated, immutable snapshot, the same version can be retrieved again later.
Related guides
Embedding the withdrawal notice in order confirmations
HTML in the email footer or PDF as attachment: how the approved withdrawal notice reaches transactional confirmations in a versioned way.
Which terms version applied at contract conclusion?
Version pinning, effective_at delivery and audit trail: how to establish the link between a transaction and the published version that applied at that time.
Embedding legal texts in Shopware order confirmations
How Shopware storefronts and order-confirmation emails pull terms, the withdrawal notice and privacy information as a versioned HTML, JSON or PDF artifact from TermShelf — instead of maintaining full texts across sales channels and Twig mail templates.