Related services: CategoriesService: lynkow.categories.getBySlug(), lynkow.categories.list(), lynkow.categories.tree()

Category

Interface

A category as embedded in an article. Only id, name and slug are present on every endpoint. Its contentMode decides how articles are authored: 'standard' with a rich text body, 'structured' with customData. See CategoryDetail, CategoryWithCount and ResolvedCategory for the standalone responses.

Extends: LocaleResolution

Property

Type

Optional

Description

contentMode

"standard" | "structured"

Yes

How articles are authored: a rich text body or customData fields. Absent from paths.resolve() on a category path.

displayOrder

number

Yes

Sort position set in the admin, 0 by default, lower first. Present wherever path is.

id

string

No

Category ID (UUID), stable across renames and slug changes.

isFallback

boolean

Yes

true when the record is served in another locale because requestedLocale has no translation.<br>Absent when the request carried no locale. Never true with fallback: false.

locale

string

Yes

BCP 47 locale of the category. Absent on categories embedded in contents.getBySlug().

name

string

No

Display name in the served locale, max 255 characters.

parent

Category | null

Yes

Parent as { id, name, slug }, one level only, for breadcrumbs. null for a root category.<br>Sent only on categories embedded in contents.getBySlug().

parentId

string | null

Yes

Parent category ID, or null for a root category. Sent only on categories embedded in contents.getBySlug(): use categories.tree() for the hierarchy.

path

string

Yes

Site-relative URL path of the category page. Absent from categories embedded in contents.getBySlug().

requestedLocale

string

Yes

BCP 47 locale code the request asked for (e.g. 'de'), as sent in the<br>locale request option or the client's configured locale.<br>Absent when the request carried no locale.

slug

string

No

URL slug, unique per site and locale, max 255 characters. Pass it to categories.getBySlug().


CategoryDetail

Interface

A category as returned by categories.getBySlug(). It has no contentCount (only the list and tree carry it) and no parentId.

Extends: Category

Property

Type

Optional

Description

contentMode

"standard" | "structured"

No

How articles in this category are authored: a rich text body or customData fields.

description

string | null

No

Plain-text description, for example for a meta description. null when none is set.

displayOrder

number

No

Sort position set in the admin, 0 by default, lower first. Lists and trees come sorted by name:<br>sort by this value to follow the admin order.

id

string

No

Category ID (UUID), stable across renames and slug changes.

image

string | null

No

Absolute URL of the category image. null when none is set. Prefer imageVariants.

imageVariants

ImageVariants

Yes

Resized versions of the image (thumbnail, card, og). Absent when no image is set.

isFallback

boolean

Yes

true when the record is served in another locale because requestedLocale has no translation.<br>Absent when the request carried no locale. Never true with fallback: false.

locale

string

No

BCP 47 locale of the category.

name

string

No

Display name in the served locale, max 255 characters.

parent

Category | null

Yes

Parent as { id, name, slug }, one level only, for breadcrumbs. null for a root category.<br>Sent only on categories embedded in contents.getBySlug().

parentId

string | null

Yes

Parent category ID, or null for a root category. Sent only on categories embedded in contents.getBySlug(): use categories.tree() for the hierarchy.

path

string

No

Site-relative URL path of the category page, such as '/blog/parent/child'. Prepend your base URL.

requestedLocale

string

Yes

BCP 47 locale code the request asked for (e.g. 'de'), as sent in the<br>locale request option or the client's configured locale.<br>Absent when the request carried no locale.

resolvedSchema

ContentSchema

Yes

Field schema a structured category inherits from its ancestors. Sent only by categories.getBySlug(),<br>when contentMode is 'structured' and schemaSource is 'inherit'.

schema

ContentSchema | null

No

Field schema stored on the category, { fields: [] } when none is set. When schemaSource is 'inherit', use resolvedSchema.

schemaSource

"own" | "inherit" | null

No

'own' when the category defines schema (the default), 'inherit' when it comes from an ancestor.

slug

string

No

URL slug, unique per site and locale, max 255 characters. Pass it to categories.getBySlug().


CategoryTreeNode

Interface

A node of the tree returned by categories.tree(): a CategoryWithCount plus its children.

Extends: CategoryWithCount

Property

Type

Optional

Description

children

CategoryTreeNode[]

No

Direct child categories, an empty array for a leaf.

contentCount

number

No

Published articles in this category for the served locale. Child categories are not included.

contentMode

"standard" | "structured"

No

How articles in this category are authored: a rich text body or customData fields.

description

string | null

No

Plain-text description, for example for a meta description. null when none is set.

displayOrder

number

No

Sort position set in the admin, 0 by default, lower first. Lists and trees come sorted by name:<br>sort by this value to follow the admin order.

id

string

No

Category ID (UUID), stable across renames and slug changes.

image

string | null

No

Absolute URL of the category image. null when none is set. Prefer imageVariants.

imageVariants

ImageVariants

Yes

Resized versions of the image (thumbnail, card, og). Absent when no image is set.

isFallback

boolean

Yes

true when the record is served in another locale because requestedLocale has no translation.<br>Absent when the request carried no locale. Never true with fallback: false.

locale

string

No

BCP 47 locale of the category.

name

string

No

Display name in the served locale, max 255 characters.

parent

Category | null

Yes

Parent as { id, name, slug }, one level only, for breadcrumbs. null for a root category.<br>Sent only on categories embedded in contents.getBySlug().

parentId

string | null

Yes

Parent category ID, or null for a root category. Sent only on categories embedded in contents.getBySlug(): use categories.tree() for the hierarchy.

path

string

No

Site-relative URL path of the category page, such as '/blog/parent/child'. Prepend your base URL.

requestedLocale

string

Yes

BCP 47 locale code the request asked for (e.g. 'de'), as sent in the<br>locale request option or the client's configured locale.<br>Absent when the request carried no locale.

resolvedSchema

ContentSchema

Yes

Field schema a structured category inherits from its ancestors. Sent only by categories.getBySlug(),<br>when contentMode is 'structured' and schemaSource is 'inherit'.

schema

ContentSchema | null

No

Field schema stored on the category, { fields: [] } when none is set. When schemaSource is 'inherit', use resolvedSchema.

schemaSource

"own" | "inherit" | null

No

'own' when the category defines schema (the default), 'inherit' when it comes from an ancestor.

slug

string

No

URL slug, unique per site and locale, max 255 characters. Pass it to categories.getBySlug().


CategoryWithCount

Interface

A CategoryDetail plus its published article count, returned by categories.list() and, with children, by categories.tree().

Extends: CategoryDetail

Property

Type

Optional

Description

contentCount

number

No

Published articles in this category for the served locale. Child categories are not included.

contentMode

"standard" | "structured"

No

How articles in this category are authored: a rich text body or customData fields.

description

string | null

No

Plain-text description, for example for a meta description. null when none is set.

displayOrder

number

No

Sort position set in the admin, 0 by default, lower first. Lists and trees come sorted by name:<br>sort by this value to follow the admin order.

id

string

No

Category ID (UUID), stable across renames and slug changes.

image

string | null

No

Absolute URL of the category image. null when none is set. Prefer imageVariants.

imageVariants

ImageVariants

Yes

Resized versions of the image (thumbnail, card, og). Absent when no image is set.

isFallback

boolean

Yes

true when the record is served in another locale because requestedLocale has no translation.<br>Absent when the request carried no locale. Never true with fallback: false.

locale

string

No

BCP 47 locale of the category.

name

string

No

Display name in the served locale, max 255 characters.

parent

Category | null

Yes

Parent as { id, name, slug }, one level only, for breadcrumbs. null for a root category.<br>Sent only on categories embedded in contents.getBySlug().

parentId

string | null

Yes

Parent category ID, or null for a root category. Sent only on categories embedded in contents.getBySlug(): use categories.tree() for the hierarchy.

path

string

No

Site-relative URL path of the category page, such as '/blog/parent/child'. Prepend your base URL.

requestedLocale

string

Yes

BCP 47 locale code the request asked for (e.g. 'de'), as sent in the<br>locale request option or the client's configured locale.<br>Absent when the request carried no locale.

resolvedSchema

ContentSchema

Yes

Field schema a structured category inherits from its ancestors. Sent only by categories.getBySlug(),<br>when contentMode is 'structured' and schemaSource is 'inherit'.

schema

ContentSchema | null

No

Field schema stored on the category, { fields: [] } when none is set. When schemaSource is 'inherit', use resolvedSchema.

schemaSource

"own" | "inherit" | null

No

'own' when the category defines schema (the default), 'inherit' when it comes from an ancestor.

slug

string

No

URL slug, unique per site and locale, max 255 characters. Pass it to categories.getBySlug().


ResolvedCategory

Interface

The category returned by paths.resolve() for a category path. Leaner than CategoryDetail: it has no contentMode, schema or schemaSource.

Extends: Category

Property

Type

Optional

Description

alternates

ContentAlternate[]

Yes

Language versions of the category, for hreflang tags. Present only when the request carried a locale,<br>and empty on a fallback.

canonicalPath

string

Yes

Site-relative path search engines should index, such as '/blog/tech'. Present only when the request<br>carried a locale. Equals path, except on a fallback, where it is the default-locale version.

canonicalUrl

string

Yes

Absolute form of canonicalPath. Present only on a fallback when the site has a domain.

contentMode

"standard" | "structured"

Yes

How articles are authored: a rich text body or customData fields. Absent from paths.resolve() on a category path.

description

string | null

No

Plain-text description, or null when none is set.

displayOrder

number

No

Sort position set in the admin, 0 by default, lower first.

id

string

No

Category ID (UUID), stable across renames and slug changes.

image

string | null

No

Absolute URL of the category image, or null when none is set.

imageVariants

ImageVariants

Yes

Resized versions of the image. Absent when no image is set.

isFallback

boolean

Yes

true when the record is served in another locale because requestedLocale has no translation.<br>Absent when the request carried no locale. Never true with fallback: false.

locale

string

No

BCP 47 locale of the category.

name

string

No

Display name in the served locale, max 255 characters.

parent

Category | null

Yes

Parent as { id, name, slug }, one level only, for breadcrumbs. null for a root category.<br>Sent only on categories embedded in contents.getBySlug().

parentId

string | null

Yes

Parent category ID, or null for a root category. Sent only on categories embedded in contents.getBySlug(): use categories.tree() for the hierarchy.

path

string

No

Site-relative URL path of the category page.

requestedLocale

string

Yes

BCP 47 locale code the request asked for (e.g. 'de'), as sent in the<br>locale request option or the client's configured locale.<br>Absent when the request carried no locale.

slug

string

No

URL slug, unique per site and locale, max 255 characters. Pass it to categories.getBySlug().