Get an item by slug

Read one published document of a CMS collection by its slug, with a fallback to Ovok's shared content.

Returns one published document of a collection, found by its slug. If your tenant has no such document, Ovok's shared tenant is tried.

MethodPath
GET/v1/public/cms/collections/:collection/items/:slug

Who can call it

The same as listing a collection: an open collection needs only a tenant; any other needs a CMS API key or a signed-in user of the tenant.

Request

curl --get 'https://api.sandbox.ovok.com/v1/public/cms/collections/legal-pages/items/terms-and-conditions' \
  --data-urlencode 'tenant=big-health-company' \
  --data-urlencode 'locale=de'
PartDescription
:collectionThe collection's slug, case-sensitive.
:slugThe document's slug. Lower-case letters, digits, -, _ and .; it starts with a letter or digit; up to 128 characters.
tenant, projectId, locale, apiKeyAs for listing a collection. There is no page, limit or sort.

Response

The answer is the document itself, not a list:

{
  "id": 3,
  "slug": "terms-and-conditions",
  "title": "Allgemeine Geschäftsbedingungen",
  "body": { "root": { "type": "root", "children": [] } },
  "effectiveAt": "2026-09-01T00:00:00.000Z",
  "status": "published"
}

The fields are those of the collection; see the list of fields.

How the document is found

  1. Your tenant is asked for a published document with that slug.
  2. If it has none, the shared tenant is asked. The shared document is returned without its tenant field.
  3. If neither has it, the answer is 404.

There is no lookup by id.

What can go wrong

The errors in the overview apply, with these specifics:

StatusCause
404 Not foundThe slug does not exist, is a draft, or is malformed. All three look the same. Also a collection that is not served.
The CMS's own statusYour own read failed. A failure on your side never falls back to the shared document.

The checks run in this order: authentication, the collection, the slug, locale, the tenant, then the read. A malformed slug is therefore 404 before any tenant is looked up.

Gotchas

  • A bad slug is 404, not 400. Terms, -terms and a slug of 129 characters all answer 404.
  • A draft and a missing document are indistinguishable, by design.
  • A failing read of the shared tenant is an error, not a 404. When your tenant has no such document and the shared read fails, you see the failure.
  • Publishing terms-and-conditions has a side effect. When the legal-pages document with that slug is published, the users of your project are asked to accept the terms again at their next sign-in. Drafts do not.
  • The slug is part of the cache key. An edit shows up within about a minute; see caching.

Last updated on

On this page