Get an item by slug
Returns one published document of a collection, found by its slug. If your tenant has no such document, Ovok's shared tenant is tried.
| Method | Path |
|---|---|
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'
| Part | Description |
|---|---|
:collection | The collection's slug, case-sensitive. |
:slug | The document's slug. Lower-case letters, digits, -, _ and .; it starts with a letter or digit; up to 128 characters. |
tenant, projectId, environment, locale, apiKey | As 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
- Your tenant is asked for a published document with that slug.
- If it has none, the shared tenant is asked. The shared document is returned without its
tenantfield. - 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:
| Status | Cause |
|---|---|
404 Not found | The 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 status | Your 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, not400.Terms,-termsand a slug of 129 characters all answer404. - 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-conditionshas a side effect. When thelegal-pagesdocument 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.