BlogUrlMode

TypeAlias

How this site builds blog URLs, as reported by every endpoint that returns a path. Exactly two values exist on the wire:

  • 'flat': URLs use the slug only, e.g. /blog/my-article

  • 'nested': URLs include the category chain, e.g. /blog/tech/my-article

Configured in the site's SEO settings; 'flat' when unset.

TypeScript
type BlogUrlMode = "flat" | "nested"

CategoriesListResponse

Interface

Response from categories.list(). Returns all categories (flat list, not paginated) with their content counts.

Property

Type

Optional

Description

blogUrlMode

BlogUrlMode

No

How blog content URLs are constructed for this site:<br>- 'flat': URLs use slug only, e.g. /blog/my-article<br>- 'nested': URLs include the category path, e.g. /blog/tech/my-article<br><br>This affects how you should build links to content articles.<br>Configured in the site's SEO settings.

categories

CategoryWithCount[]

No

Flat array of all categories with their published content count.<br>Not paginated: all categories come in one response.

locale

string | null

No

The locale the read aims at, such as 'fr': the site default locale without a request<br>locale. Always null on a single-language site.


CategoryDetailResponse

Interface

Response from categories.getBySlug(). Contains the full category details along with its paginated content list.

Property

Type

Optional

Description

category

CategoryDetail

No

Full category details: path, description, image, displayOrder, and the<br>schema fields for structured categories. Carries no contentCount:<br>only the list and tree endpoints compute one.

contents

{ data: ContentSummary[]; meta: PaginationMeta }

No

One page of the category's published articles, set by the page and<br>limit options of categories.getBySlug().

locale

string | null

No

The locale the read aims at, such as 'fr': the site default locale without a request<br>locale. Always null on a single-language site.


CategoryResolveResponse

Interface

Path resolution response when the resolved path matches a category. Returned by paths.resolve() when the given URL corresponds to a category listing.

Property

Type

Optional

Description

blogUrlMode

BlogUrlMode

No

The site's blog URL mode, 'flat' or 'nested'.

category

ResolvedCategory

No

The category, without the contentMode, schema and schemaSource of<br>CategoryDetail. With a request locale it carries requestedLocale and isFallback.

contents

{ data: ContentSummary[]; meta: PaginationMeta }

No

The category's published articles. paths.resolve() returns the first 500.

locale

string

No

Locale of the path, such as 'fr': its prefix, else the site default.

type

"category"

No

Discriminator field. Always 'category' for this response type.<br>Use this to narrow the ResolveResponse union.


CategoryTreeResponse

Interface

Response from categories.tree(). Returns categories organized in a parent-child hierarchy.

Property

Type

Optional

Description

blogUrlMode

BlogUrlMode

No

How blog content URLs are constructed for this site:<br>- 'flat': URLs use slug only, e.g. /blog/my-article<br>- 'nested': URLs include the category path, e.g. /blog/tech/my-article<br><br>Use this to determine whether category slugs should appear in content URLs.

locale

string | null

No

The locale the read aims at, such as 'fr': the site default locale without a request<br>locale. Always null on a single-language site.

tree

CategoryTreeNode[]

No

Root-level category nodes, each containing nested children arrays.<br>Categories with a parentId appear as children of their parent node.


ConsentLogResponse

Interface

Response from cookies.logConsent(). Records the user's cookie consent preferences for GDPR compliance.

Property

Type

Optional

Description

message

string

No

Confirmation message, 'Consent logged successfully'. The response carries no record id.


ContentResolveResponse

Interface

Path resolution response when the resolved path matches a content article. Returned by paths.resolve() when the given URL corresponds to a published article.

Property

Type

Optional

Description

blogUrlMode

BlogUrlMode

No

The site's blog URL mode, 'flat' or 'nested'.

content

Content

No

Full content object for the matched article, including body, SEO fields,<br>categories, tags, author, and customData. When the request carries a<br>locale, it also carries the LocaleResolution signals<br>(requestedLocale, isFallback); they are never at the top level of<br>the response.

locale

string

No

Locale of the path, such as 'fr': its prefix, else the site default. On a fallback,<br>content.locale is the locale actually served.

type

"content"

No

Discriminator field. Always 'content' for this response type.<br>Use this to narrow the ResolveResponse union.


ContentsListResponse

Interface

Response from contents.list(). Returns content summaries (without body) for performance. Use contents.getBySlug() to fetch the full content with body and relations.

Property

Type

Optional

Description

data

ContentSummary[]

No

Array of content summaries for the current page.<br>Each row omits the full body, customData and structuredData. It does<br>carry the SEO and robots fields and the author, categories and tags<br>relations, which ContentSummary does not declare: see its<br>description for the list.<br>Sorted by publishedAt descending by default.

meta

PaginationMeta

No

Pagination metadata for navigating through the result set.


FormSubmitResponse

Interface

Response from forms.submit(), unwrapped from the API's { data } envelope.

The API answers a stored submission with 201 and this body, and nothing else: there is no pending or double opt-in state for a form submission, and no submission id on the wire. A rejected submission (validation, spam protection, rate limit) throws a LynkowError instead of resolving.

Property

Type

Optional

Description

message

string

No

Human-readable confirmation suitable for display to the user: the form's<br>configured schema.settings.successMessage, or a default message in the<br>form's language when none is set.

redirectUrl

string

Yes

The form's configured schema.settings.redirectUrl, an absolute http or<br>https URL, when one is set. Absent otherwise, including when the stored<br>value is not such a URL. When present, send the visitor there instead of<br>showing message, after parsing it and checking that its protocol is<br>http: or https: (see the forms.submit() example).

success

true

No

Always true. A submission that is not accepted throws rather than<br>resolving with false.


GlobalBlockResponse

Interface

Response from globals.getBySlug(): one global block with its data resolved.

Property

Type

Optional

Description

data

GlobalBlock

No

The global block. Its _warnings list the data that could not be resolved.


PagesListResponse

Interface

Response from pages.list(). Returns page summaries (without resolved data) in a single non-paginated response.

Property

Type

Optional

Description

data

PageSummary[]

No

Array of page summaries. Does not include the resolved data or seo fields.<br>Use pages.getBySlug() to fetch the full page with resolved data.


PaginatedResponse

Interface

Generic paginated response wrapping any item type. Used internally by the SDK; most endpoints return a concrete typed response instead.

Property

Type

Optional

Description

data

T[]

No

Array of items for the current page. Empty array when no results match.

meta

PaginationMeta

No

Pagination metadata describing total count, page position, and navigation flags.


PaginationMeta

Interface

Pagination metadata of a paginated list. Pages are counted from 1. To know whether more pages exist, compare currentPage with lastPage.

Property

Type

Optional

Description

currentPage

number

No

Current page number, counted from 1. A page past lastPage returns an empty data array.

firstPage

number

No

Number of the first page. Always 1.

hasMorePages

boolean

Yes

Never sent by the API, so always undefined. Use currentPage < lastPage instead.

hasPreviousPages

boolean

Yes

Never sent by the API, so always undefined. Use currentPage > 1 instead.

lastPage

number

No

Number of the last page: Math.ceil(total / perPage), and 1 when total is 0.

perPage

number

No

Page size applied: the request's limit, else the list's default (20 on most storefront lists).

total

number

No

Number of items matching the query across all pages. 0 when nothing matches.


PathsListResponse

Interface

Response from paths.list(): the site's public URLs, for static generation and sitemaps.

Property

Type

Optional

Description

blogUrlMode

BlogUrlMode

No

'flat' when article URLs use the slug only, 'nested' when they include the category path.

locale

string | null

No

The locale the paths were built for (e.g. 'en', 'fr'). Without a<br>request locale, a multi-language site sends its default locale. With one,<br>it sends the locale the read aims at: the requested locale when the site<br>enables it, else its enabled base language, else the default. Always<br>null on a single-language site.

paths

Path[]

No

The paths of published articles and blog categories (root categories only in flat<br>mode), then the commerce pages with include: 'commerce'. Without a request locale, a<br>multi-language site lists its default-locale paths. With one, each translation group<br>appears once, at its fallback URL when untranslated.


ProductCategoryResolveRecordResponse

Interface

paths.resolve() result for a visible product category page, record variant, returned to a client with a valid publishable key.

Property

Type

Optional

Description

locale

string

No

Locale the page is served in, such as 'fr': the URL's locale (its prefix, else the site<br>default), or on a fallback the locale of the text served.

productCategory

Omit<ProductCategory, "structuredData" | "path"> & { path: string }

No

The product category record: the same projection the category single read<br>(GET /product-categories/{slug}) serves, a superset of the pointer (id, slug<br>and path are unchanged), without structuredData, which sits beside it. It<br>carries no children. path is always a string here: it is the path resolved.

structuredData

CommerceStructuredData

No

The category page's structured data: its JSON-LD graph. Never a stock quantity.

type

"product_category"

No

Discriminator field. Always 'product_category' for this response type.<br>Use this to narrow the ResolveResponse union.


ProductCategoryResolveResponse

Interface

paths.resolve() result for a visible product category page, /{productCategoryPrefix}/{slug}, pointer variant, returned to a client without a publishable key.

Property

Type

Optional

Description

locale

string

No

Locale the page is served in, such as 'fr': the URL's locale (its prefix, else the site<br>default), or on a fallback the locale of the text served.

productCategory

ResolvedCommercePage

No

Pointer to the product category: its wire id, slug and canonical path.

type

"product_category"

No

Discriminator field. Always 'product_category' for this response type.<br>Use this to narrow the ResolveResponse union.


ProductCollectionResolveRecordResponse

Interface

paths.resolve() result for a product collection page, record variant, returned to a client with a valid publishable key.

Property

Type

Optional

Description

locale

string

No

Locale the page is served in, such as 'fr': the URL's locale (its prefix, else the site<br>default), or on a fallback the locale of the text served.

productCollection

Omit<ProductCollection, "structuredData" | "path"> & { path: string }

No

The product collection record: the same projection the collection single read<br>(GET /product-collections/{slug}) serves, a superset of the pointer (id, slug<br>and path are unchanged), without structuredData, which sits beside it. path<br>is always a string here: it is the path resolved.

structuredData

CommerceStructuredData

No

The collection page's structured data: its JSON-LD graph. Never a stock quantity.

type

"product_collection"

No

Discriminator field. Always 'product_collection' for this response type.<br>Use this to narrow the ResolveResponse union.


ProductCollectionResolveResponse

Interface

paths.resolve() result for a product collection page, /{productCollectionPrefix}/{slug}, pointer variant, returned to a client without a publishable key.

Property

Type

Optional

Description

locale

string

No

Locale the page is served in, such as 'fr': the URL's locale (its prefix, else the site<br>default), or on a fallback the locale of the text served.

productCollection

ResolvedCommercePage

No

Pointer to the product collection: its wire id, slug and canonical path.

type

"product_collection"

No

Discriminator field. Always 'product_collection' for this response type.<br>Use this to narrow the ResolveResponse union.


ProductResolveRecordResponse

Interface

paths.resolve() result for a product page, record variant, returned to a client with a valid publishable key. The path rules are those of ProductResolveResponse.

Property

Type

Optional

Description

locale

string

No

Locale the page is served in, such as 'fr': the URL's locale (its prefix, else the site<br>default), or on a fallback the locale of the text served.

product

Omit<Product, "structuredData">

No

The product record: the same projection products.getBySlug() serves, a superset<br>of the pointer (id, slug and path are unchanged), without structuredData,<br>which sits beside it. Never a stock quantity.

structuredData

CommerceStructuredData

No

The product page's structured data: its JSON-LD graph. Never a stock quantity.

type

"product"

No

Discriminator field. Always 'product' for this response type.<br>Use this to narrow the ResolveResponse union.


ProductResolveResponse

Interface

paths.resolve() result for a product page, pointer variant, returned to a client without a publishable key. The path must be exactly the product's URL: /{productPrefix}/{slug}, or /{productCategoryPrefix}/{categorySlug}/{slug} when products are nested under their category.

Property

Type

Optional

Description

locale

string

No

Locale the page is served in, such as 'fr': the URL's locale (its prefix, else the site<br>default), or on a fallback the locale of the text served.

product

ResolvedCommercePage

No

Pointer to the product: its wire id, slug and canonical path.

type

"product"

No

Discriminator field. Always 'product' for this response type.<br>Use this to narrow the ResolveResponse union.


ResolvedCommercePage

Interface

The pointer to a commerce page that paths.resolve() returns to a client without a publishable key: the page's id, slug and path. Read the record with products.getBySlug() or the product category and collection reads, which need a publishable key. The LocaleResolution fields are present when the request carried a locale or the page is served from a translation or a fallback.

Extends: LocaleResolution

Property

Type

Optional

Description

id

string

No

Prefixed public id: 'prod_...', 'pcat_...' or 'col_...'.

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 code of the record actually served (e.g. 'en', 'fr').<br>Equals requestedLocale unless isFallback is true.

path

string

No

Canonical public URL path of the page, the one the sitemap lists.

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

The entity's slug, as products.getBySlug() and the taxonomy reads accept it.


ResolveRedirectResponse

Interface

Result of paths.resolve() or pages.getByPath() when nothing lives at the path but a redirect covers it: the same answer paths.matchRedirect() gives for that path. The redirect is a rule set in the admin, or an automatic locale redirect (301, preserveQueryString: true), such as the default locale's prefixed URL to its unprefixed one, always straight to the final URL. Send the visitor to redirect.target with redirect.statusCode. Detect it with isRedirectResponse().

Property

Type

Optional

Description

redirect

Pick<Redirect, "target" | "statusCode" | "preserveQueryString">

No

The redirect to follow: target (a path, or an absolute URL for a rule pointing off-site),<br>statusCode and preserveQueryString, as on a Redirect without its source.

type

"redirect"

No

Always 'redirect'. A Page has no type field, so this also narrows pages.getByPath().


ResolveResponse

TypeAlias

Result of paths.resolve(): narrow it on type. 'content' is an article, 'category' a blog category, 'product', 'product_category' and 'product_collection' a commerce page, 'redirect' a path that a redirect covers. A commerce hit is the record plus a top-level structuredData for a client with a publishable key, else a pointer { id, slug, path }: check 'structuredData' in resolved.

TypeScript
type ResolveResponse = ContentResolveResponse | CategoryResolveResponse | ProductResolveResponse | ProductResolveRecordResponse | ProductCategoryResolveResponse | ProductCategoryResolveRecordResponse | ProductCollectionResolveResponse | ProductCollectionResolveRecordResponse | ResolveRedirectResponse

ReviewsListMeta

Interface

meta block of ReviewsListResponse: the standard pagination cursors plus two aggregates over the site's approved reviews.

The aggregates apply the list's language rule (one review per translation group with a request locale, every language for a product read without one, else the default locale on a multi-language site) and ignore every other filter, the product itself and the rating range included: they describe the reviews a visitor can reach in that language, as a schema.org aggregateRating needs. total is the count that reflects all your filters.

Extends: PaginationMeta

Property

Type

Optional

Description

averageRating

number

No

Mean rating, as a number rounded to two decimals, over the approved reviews the language<br>rule serves. 0 when there are none.

currentPage

number

No

Current page number, counted from 1. A page past lastPage returns an empty data array.

firstPage

number

No

Number of the first page. Always 1.

hasMorePages

boolean

Yes

Never sent by the API, so always undefined. Use currentPage < lastPage instead.

hasPreviousPages

boolean

Yes

Never sent by the API, so always undefined. Use currentPage > 1 instead.

lastPage

number

No

Number of the last page: Math.ceil(total / perPage), and 1 when total is 0.

perPage

number

No

Page size applied: the request's limit, else the list's default (20 on most storefront lists).

total

number

No

Number of items matching the query across all pages. 0 when nothing matches.

totalApproved

number

No

Count of the approved reviews the language rule serves (see above), one<br>per translation group when the request carries a locale.


ReviewsListResponse

Interface

Response from reviews.list(). Only approved reviews are returned through the public API.

Property

Type

Optional

Description

data

Review[]

No

Array of approved reviews for the current page.<br>Reviews with status other than 'approved' are never included.

meta

ReviewsListMeta

No

Pagination metadata, plus the two site-wide review aggregates the endpoint<br>adds alongside it.


ReviewSubmitResponse

Interface

Response from reviews.submit(). The status field depends on the site's review moderation settings.

Property

Type

Optional

Description

id

string

No

UUID of the created review.

message

string

No

Human-readable message suitable for display to the user.<br>Content varies based on whether the review was auto-approved or queued for moderation.

status

"pending" | "approved"

No

'approved' when the site's moderation settings approved the review at once, so it is<br>already visible; 'pending' when it waits for moderation.


SiteConfigResponse

Interface

Response from globals.siteConfig(): the site's identity and every published global block, in one request.

Property

Type

Optional

Description

data

{ globals: Record<string, GlobalBlock>; locale: string; site: { analytics: { consentMode: "opt-in" | "opt-out" }; defaultLocale: string; domain: string; enabledLocales: string[]; favicon: string | null; logo: string | null; name: string; showBranding: boolean } }

No

Top-level data wrapper.


TagsListResponse

Interface

Response from tags.list(): one page of tags, 20 per page unless limit says otherwise (at most 100).

Property

Type

Optional

Description

data

Tag[]

No

Tags for the current page in the current locale.<br>Empty array when no tags match (or when paging past the last page).

meta

PaginationMeta

No

Pagination metadata describing total count, page position, and navigation<br>flags. See PaginationMeta.