Public Delivery API

Deliver legal texts via API — HTML, JSON and PDF from one source.

The Public Delivery API serves published legal texts over a fast, read-only interface. One approved version, three artifact forms — consistent across websites, apps, shops and transactional emails.

What is the Public Delivery API?

Public Delivery API
The Public Delivery API is TermShelf's read-only delivery interface for already-published legal texts. It returns an approved document version as a sanitized HTML fragment, as structured JSON or as a PDF artifact. Write operations and unpublished drafts are not reachable through this interface.

Typical use cases

Embed legal texts in a website

Insert privacy, legal notice or terms as an HTML fragment server-side into CMS pages, footers or landing pages — without copied full texts.

Render in SaaS apps

Fetch JSON with sections and typed blocks and render it with your own components — in a web app, native app or onboarding flow.

Attach PDFs to emails

Fetch the approved version as a PDF artifact and attach it to, for example, order or contract confirmations.

Deliver as of a point in time

Use effective_at to fetch the version that was live at a specific moment — available depending on plan.

Integrate cache-friendly

Use ETag and Cache-Control to cache responses and reload only on changes via If-None-Match.

Integrate into shop systems

Shopware, Shopify or WooCommerce consume the same source via the API instead of scattered maintenance in the shop backend.

How TermShelf helps

The API serves only what was previously structured, versioned and approved — the contract is stable and equally readable for AI crawlers and your own systems.

  • Three artifact forms, one version

    HTML fragment, JSON and PDF derive from the exact same published version. This prevents format drift between website, app and email.

  • Version pinning

    With ?version=N you can request and stably reference a specific approved version. If it differs from the live version, the API responds with 409 and names the currently live version.

  • effective_at delivery

    Via ?effective_at=<ISO-8601> you can fetch, depending on plan, the version that applied at a point in time — relevant for proof and as-of dates.

  • ETag, Cache-Control and explicit headers

    Responses carry ETag, Cache-Control, Last-Modified as well as X-Termshelf-Document-Version and X-Termshelf-Published-At for traceable integrations.

  • Read-only and separated

    Public delivery is separated from app and admin functions; no write operations, no unpublished drafts.

What the Public Delivery API does not do

  • It does not produce legal texts and is not a substitute for legal advice.
  • It does not expose unpublished drafts or write endpoints.
  • It is not a ready-made, certified shop plugin — integration is API-based and open.
  • It does not guarantee any endpoint shape beyond what the API reference documents.

Frequently asked questions

In which formats does the Public Delivery API deliver legal texts?
As a sanitized HTML fragment for direct embedding, as structured JSON for your own templates and as a PDF artifact for attachments — all three from the exact same published version.
Can I deliver a specific version or an as-of date?
Yes. With ?version=N you can pin a specific approved version; if it differs from the live version, the API responds with 409. Depending on plan, ?effective_at=<ISO-8601> returns the version that applied at a point in time.
Are drafts reachable through the API?
No. The Public Delivery API is read-only and serves only already-published content; write operations and unpublished drafts are not reachable.

Shop, middleware and email integrations

The Public Delivery API can also be consumed from shop systems, middleware and email logic — as an HTML fragment, JSON or PDF artifact from the exact approved version. These guides show what that looks like per shop system:

Publish once — deliver everywhere.

Bring your legal texts into TermShelf and deliver them consistently as HTML, JSON or PDF.

Public Delivery API — Deliver legal texts as HTML, JSON and PDF