Related services: PathsService: lynkow.paths.list(), lynkow.paths.matchRedirect(), lynkow.paths.resolve()

Path

Interface

One public URL returned by paths.list(): a published article, a blog category archive or, with include: 'commerce', a product, product category or product collection page. It carries requestedLocale and isFallback when the request carries a locale (see LocaleResolution). Split path yourself when a catch-all route needs its segments. All the commerce entries of one read are built in one locale: call paths.list() once per locale to list them all.

Extends: LocaleResolution

Property

Type

Optional

Description

id

string

Yes

Id of the record: a UUID for an article or a category, the prefixed id ('prod_...',<br>'pcat_...', 'col_...') for a commerce entry. Usable as a stable React key.

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

Locale of the text served at this path, such as 'fr': set the page's lang from it.<br>Differs from requestedLocale on a fallback. Always present on a commerce entry.

path

string

No

Full URL path including leading slash and locale prefix.<br>Ready to use as a route path. Includes category segments in nested mode.

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.

type

"content" | "category" | "product" | "product_category" | "product_collection"

No

What the path serves: 'content' (an article), 'category' (a blog category archive),<br>or, with include: 'commerce', 'product', 'product_category' or 'product_collection'.

updatedAt

string

Yes

ISO 8601 datetime of the record's last change, for a sitemap lastmod. Absent when unknown.


Redirect

Interface

The redirect paths.matchRedirect(path) found for one path: a rule set in the admin or an automatic locale redirect. The SDK lists no redirects in bulk, so check them at request time.

Property

Type

Optional

Description

preserveQueryString

boolean

No

Whether to append the original request's query string to the redirect target.<br>When true, a request to /old?page=2 redirects to /new?page=2.<br>When false, the query string is discarded.

source

string

No

Source path pattern to match incoming requests against.<br>Always starts with /. May contain path segments but not query strings.

statusCode

301 | 302 | 307 | 308

No

HTTP status to answer with: 301 or 308 for a permanent move, 302 or 307 for a<br>temporary one. 307 and 308 keep the request method.

target

string

No

Destination path or full URL to redirect to.<br>Can be a relative path (starts with /) or an absolute URL.