Metanow Docs
API & IntegrationReference

Legal API

Versioned legal documents per provider, company details, the public pages and footer, and accepting the Terms.

A document belongs to a provider (a platform tenant) and is one of privacy, terms, refunds or cookies. The text is the editor's JSON, keyed by language. Every publication is a new, unchanging version.

Public

No session. Pass tenant_id, or the provider is read from the request's Origin.

MethodPathReturns
GET/legal/public/footerThe company line and which pages exist, or null.
GET/legal/public/signupThe Terms and Privacy versions a sign-up accepts, or null when no Terms are published.
GET/legal/public/pages/:kindOne page in locale, or imprint. 404 when unpublished.

The signed-in person

MethodPathToolNotes
GET/legal/me/pendingnoneWhether I must accept, and which versions. Passes the gate.
POST/legal/me/acceptnone, on purposeBody platform_tenant_id, terms_version, optional privacy_version. 204. Passes the gate.
GET/legal/me/purchase-footernoneseller=provider (default) or platform.
GET/legal/me/acceptanceslist_my_legal_acceptancesPaged with limit and offset.

POST /legal/me/accept answers:

  • 403 for a provider other than the caller's. The provider is read from the session; the body only has to agree with it.
  • 409 LEGAL_TERMS_VERSION_OUTDATED when a newer version needs accepting.
  • 422 LEGAL_TERMS_VERSION_UNKNOWN for a version that does not exist.

The Terms gate

Once a provider has published Terms, any other request by someone who has not accepted answers 403 with code TERMS_ACCEPTANCE_REQUIRED. An API client should send the person to the accept page. Acceptance cannot be done by a tool.

Administration

The tenant's own administrator, or the platform owner. Anyone else gets 403.

MethodPathTool
GET/platform-tenants/:id/legal/documentslist_legal_documents
GET/platform-tenants/:id/legal/documents/:kindget_legal_document
POST/platform-tenants/:id/legal/documentspublish_legal_document (high stakes)
GET/platform-tenants/:id/legal/company-detailsget_legal_company_details
PUT/platform-tenants/:id/legal/company-detailsset_legal_company_details (high stakes)

Publishing takes kind, bodies, requires_acceptance (turn on to ask everyone again) and external_key: a retry with the same key returns the first version instead of publishing twice. Saving company details replaces the whole value, so a retry writes the same thing; its external_key is optional and is not stored.

On this page