> For the complete Lynkow documentation index in agent-friendly format, see [llms.txt](/llms.txt).

# SDK Types: Configuration

**Publié le** : 2026-08-20
**Catégorie** : Types

# SDK Types: Configuration

> **Related services:** **SiteService** — `lynkow.site.getConfig()`

## `Client`

*Interface*

Extended client interface for SDK v3

Extends: `LynkowClient`

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `analytics` | `AnalyticsService` | No | Analytics service (browser-only) |
| `availableLocales` | `string[]` | No | Available locales from site configuration |
| `blocks` | `BlocksService` | No | Alias for blocks (v3 naming) |
| `branding` | `BrandingService` | No | Branding service (badge for free plan) |
| `cart` | `CartService` | No | Storefront cart service (commerce).<br>Provides `retrieve()`, `addLine()`, `updateLine()`, `removeLine()`, and the<br>post-sign-in `claim()`. Requires a `publishableKey` on the client. Handles the<br>guest cart token round-trip automatically, and attaches the shared customer<br>token as `Authorization: Bearer` once the buyer is signed in. |
| `categories` | `CategoriesService` | No | Content categories service.<br>Provides `list()`, `tree()`, `getBySlug()` for fetching categories<br>with content counts and hierarchical tree structures. |
| `checkout` | `CheckoutService` | No | Storefront checkout service (commerce).<br>Completes the current guest or signed-in cart into an offline order. Requires a<br>`publishableKey`; guest calls reuse the token captured by the cart service. |
| `config` | `Readonly<{ baseUrl: string; cache: boolean; debug: boolean; siteId: string }>` | No | Client configuration (readonly) |
| `consent` | `ConsentService` | No | Consent service (cookie consent management) |
| `contents` | `ContentsService` | No | Blog contents (articles) service.<br>Provides `list()`, `getBySlug()` for fetching published articles<br>with support for filtering by category, tag, search, and pagination. |
| `cookies` | `CookiesService` | No | Cookie consent service.<br>Provides `getConfig()` for banner configuration, categories, and third-party<br>scripts, and `logConsent()` to record the user's consent preferences<br>for GDPR compliance. |
| `customers` | `CustomersService` | No | Storefront customers service (commerce).<br>Provides buyer authentication (`register`, `login`, `logout`, `me`), password<br>reset (`passwordReset.request`/`confirm`), and marketing consent<br>(`marketingConsent.list`/`update`). Requires a `publishableKey` on the client;<br>carries the customer session token as `Authorization: Bearer` on authenticated<br>calls and shares it with reservation creation. |
| `enhancements` | `EnhancementsService` | No | Content enhancements service (code copy, etc.) |
| `forms` | `FormsService` | No | Forms service.<br>Provides `getBySlug()` for fetching form schemas and `submit()` for<br>sending form submissions. Supports honeypot and reCAPTCHA spam protection. |
| `globals` | `BlocksService` | No | Global blocks service (v3 naming) |
| `legal` | `LegalService` | No | Legal documents service.<br>Provides `list()` and `getBySlug()` for fetching legal pages<br>(privacy policy, terms of service, etc.).<br>Legal documents are pages tagged with `'legal'`. |
| `locale` | `string` | No | Current locale |
| `media` | `MediaHelperService` | No | Image transformation helpers.<br>Use these to build optimized image URLs for responsive images. |
| `pages` | `PagesService` | No | Pages (site blocks) service.<br>Provides `list()`, `getBySlug()` for fetching standalone pages<br>with schema-driven data and DataSource resolution.<br>Pages are different from contents -- they represent structural site pages<br>(e.g. homepage, about, contact) rather than blog articles. |
| `paths` | `PathsService` | No | Paths service for static site generation (SSG/ISR).<br>Provides `list()` for discovering all renderable paths (contents + categories),<br>`resolve()` for matching a URL path to its content or category,<br>and `getRedirects()` for fetching all redirect rules. |
| `productCategories` | `ProductCategoriesService` | No | Storefront product categories service (commerce).<br>Returns the merchant-visible category tree. Requires a `publishableKey` on the client. |
| `productCollections` | `ProductCollectionsService` | No | Storefront product collections service (commerce).<br>Lists merchant-visible collections. Requires a `publishableKey` on the client. |
| `products` | `ProductsService` | No | Storefront product catalogue service (commerce).<br>Provides `list()` and `getBySlug()` for published products.<br>Requires a `publishableKey` on the client. |
| `reservations` | `ReservationsService` | No | Storefront reservations service (commerce).<br>Provides `availability()` and the nested `bookings.create()` for bookable products.<br>Requires a `publishableKey` on the client. Booking creation also attaches the<br>shared customer token automatically when the buyer is signed in. |
| `reviews` | `ReviewsService` | No | Customer reviews service.<br>Provides `list()` for fetching approved reviews, `submit()` for posting<br>new reviews, and `getSettings()` for the site's review configuration.<br>Only publicly approved reviews are returned. |
| `search` | `SearchService` | No | Lynkow Instant Search service |
| `seo` | `SeoService` | No | SEO files service.<br>Provides `getRobotsTxt()` for the robots.txt content and `getSitemap()`<br>for the XML sitemap. Used for server-side rendering of SEO routes. |
| `site` | `SiteService` | No | Site configuration service.<br>Provides `getConfig()` for fetching site metadata, active locale,<br>and all global blocks in a single request. Also provides `getI18nConfig()`<br>for language switching UI data and `getFullConfig()` for complete site info. |
| `tags` | `TagsService` | No | Content tags service.<br>Provides `list()` for fetching all tags.<br>Tags are used to filter contents and group articles across categories. |


---

## `ClientConfig`

*Interface*

Extended configuration for SDK v3

Extends: `LynkowConfig`

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `baseUrl` | `string` | Yes | Base URL of the Lynkow API.<br>Must not include a trailing slash.<br>Override this for self-hosted deployments or local development. |
| `cache` | `boolean` | Yes | Enable the SDK's in-memory response cache.<br>When disabled (default), every SDK call goes through `fetch()`,<br>letting your framework (Next.js, Nuxt, Astro) control caching<br>and revalidation end-to-end.<br>Set to `true` for browser SPAs that benefit from localStorage<br>caching between navigations. |
| `customerToken` | `string` | Yes | Optional customer session token to restore a signed-in buyer across a page reload<br>or SSR. Seeded into shared client state so customer-authenticated calls, including<br>reservation creation, attach it as `Authorization: Bearer <token>` alongside the<br>publishable key. `customers.activation.confirm()` and `customers.login()` replace this<br>shared value; `customers.logout()` clears it. Persist the returned token in your own<br>storage (for example an HttpOnly cookie). Separate from `publishableKey`: the<br>publishable key identifies the app, this token the buyer. The SDK never persists or<br>logs it. |
| `debug` | `boolean` | Yes | Enable debug logging |
| `fetchOptions` | `RequestInit` | Yes | Default `fetch()` options merged into every request made by this client.<br>Commonly used for Next.js caching directives or custom headers.<br>Per-request `fetchOptions` are shallow-merged on top of these defaults. |
| `locale` | `string` | Yes | Default locale code for all requests made by this client.<br>Must be a locale enabled on the site (e.g. `'en'`, `'fr'`, `'de'`).<br>Can be overridden per-request via `BaseRequestOptions.locale`.<br>When omitted, the site's default locale is used for all requests. |
| `publishableKey` | `string` | Yes | Optional publishable key that identifies this client to the Lynkow<br>storefront API. Copied from the admin dashboard under Site Settings.<br>It has the form `lkw_pk_` followed by 24 characters.<br>When set, it is sent as the `X-Lynkow-Pk` header on every storefront API request the client makes.<br>Optional on CMS content routes; required on future commerce routes. |
| `retry` | `boolean \| RetryConfig` | Yes | Automatic retry policy for transient failures (HTTP 429, HTTP 503, and<br>network errors on read requests). Enabled by default with sensible backoff<br>that honors the server's `Retry-After` header. Pass `false` to disable, or a<br>RetryConfig object to tune it. See RetryConfig for the full<br>behavior and defaults. |
| `siteId` | `string` | No | UUID of the Lynkow site to connect to.<br>Found in the admin dashboard under Site Settings.<br>Must be a valid UUID v4 format (lowercase hex with dashes).<br>Interpolated into the path of every request (`/storefront/:siteId/...`)<br>to identify the tenant. It is not sent as a header. |


---

## `LynkowClient`

*Interface*

Lynkow Client interface -- the main SDK entry point.
Provides access to all public API services through typed service objects.
Created via `createLynkow(config)`.

Each service corresponds to a public API resource and provides
methods for listing, fetching, and (where applicable) submitting data.

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `blocks` | `BlocksService` | No | Global blocks service.<br>Provides `getBySlug()` for fetching reusable site-wide data blocks<br>(e.g. header navigation, footer links, banners).<br>Global blocks are resolved from DataSources server-side.<br>Typically fetched once via `site.getConfig()` which returns all globals. |
| `categories` | `CategoriesService` | No | Content categories service.<br>Provides `list()`, `tree()`, `getBySlug()` for fetching categories<br>with content counts and hierarchical tree structures. |
| `contents` | `ContentsService` | No | Blog contents (articles) service.<br>Provides `list()`, `getBySlug()` for fetching published articles<br>with support for filtering by category, tag, search, and pagination. |
| `cookies` | `CookiesService` | No | Cookie consent service.<br>Provides `getConfig()` for banner configuration, categories, and third-party<br>scripts, and `logConsent()` to record the user's consent preferences<br>for GDPR compliance. |
| `forms` | `FormsService` | No | Forms service.<br>Provides `getBySlug()` for fetching form schemas and `submit()` for<br>sending form submissions. Supports honeypot and reCAPTCHA spam protection. |
| `legal` | `LegalService` | No | Legal documents service.<br>Provides `list()` and `getBySlug()` for fetching legal pages<br>(privacy policy, terms of service, etc.).<br>Legal documents are pages tagged with `'legal'`. |
| `pages` | `PagesService` | No | Pages (site blocks) service.<br>Provides `list()`, `getBySlug()` for fetching standalone pages<br>with schema-driven data and DataSource resolution.<br>Pages are different from contents -- they represent structural site pages<br>(e.g. homepage, about, contact) rather than blog articles. |
| `paths` | `PathsService` | No | Paths service for static site generation (SSG/ISR).<br>Provides `list()` for discovering all renderable paths (contents + categories),<br>`resolve()` for matching a URL path to its content or category,<br>and `getRedirects()` for fetching all redirect rules. |
| `reviews` | `ReviewsService` | No | Customer reviews service.<br>Provides `list()` for fetching approved reviews, `submit()` for posting<br>new reviews, and `getSettings()` for the site's review configuration.<br>Only publicly approved reviews are returned. |
| `search` | `SearchService` | No | Lynkow Instant Search service.<br>Provides `search()` for server-side search and `getConfig()` for<br>client-side direct search with tenant tokens. |
| `seo` | `SeoService` | No | SEO files service.<br>Provides `getRobotsTxt()` for the robots.txt content and `getSitemap()`<br>for the XML sitemap. Used for server-side rendering of SEO routes. |
| `site` | `SiteService` | No | Site configuration service.<br>Provides `getConfig()` for fetching site metadata, active locale,<br>and all global blocks in a single request. Also provides `getI18nConfig()`<br>for language switching UI data and `getFullConfig()` for complete site info. |
| `tags` | `TagsService` | No | Content tags service.<br>Provides `list()` for fetching all tags.<br>Tags are used to filter contents and group articles across categories. |


---

## `LynkowConfig`

*Interface*

Configuration for creating a Lynkow client instance.
Only `siteId` is required; all other options have sensible defaults.

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `baseUrl` | `string` | Yes | Base URL of the Lynkow API.<br>Must not include a trailing slash.<br>Override this for self-hosted deployments or local development. |
| `customerToken` | `string` | Yes | Optional customer session token to restore a signed-in buyer across a page reload<br>or SSR. Seeded into shared client state so customer-authenticated calls, including<br>reservation creation, attach it as `Authorization: Bearer <token>` alongside the<br>publishable key. `customers.activation.confirm()` and `customers.login()` replace this<br>shared value; `customers.logout()` clears it. Persist the returned token in your own<br>storage (for example an HttpOnly cookie). Separate from `publishableKey`: the<br>publishable key identifies the app, this token the buyer. The SDK never persists or<br>logs it. |
| `fetchOptions` | `RequestInit` | Yes | Default `fetch()` options merged into every request made by this client.<br>Commonly used for Next.js caching directives or custom headers.<br>Per-request `fetchOptions` are shallow-merged on top of these defaults. |
| `locale` | `string` | Yes | Default locale code for all requests made by this client.<br>Must be a locale enabled on the site (e.g. `'en'`, `'fr'`, `'de'`).<br>Can be overridden per-request via `BaseRequestOptions.locale`.<br>When omitted, the site's default locale is used for all requests. |
| `publishableKey` | `string` | Yes | Optional publishable key that identifies this client to the Lynkow<br>storefront API. Copied from the admin dashboard under Site Settings.<br>It has the form `lkw_pk_` followed by 24 characters.<br>When set, it is sent as the `X-Lynkow-Pk` header on every storefront API request the client makes.<br>Optional on CMS content routes; required on future commerce routes. |
| `retry` | `boolean \| RetryConfig` | Yes | Automatic retry policy for transient failures (HTTP 429, HTTP 503, and<br>network errors on read requests). Enabled by default with sensible backoff<br>that honors the server's `Retry-After` header. Pass `false` to disable, or a<br>RetryConfig object to tune it. See RetryConfig for the full<br>behavior and defaults. |
| `siteId` | `string` | No | UUID of the Lynkow site to connect to.<br>Found in the admin dashboard under Site Settings.<br>Must be a valid UUID v4 format (lowercase hex with dashes).<br>Interpolated into the path of every request (`/storefront/:siteId/...`)<br>to identify the tenant. It is not sent as a header. |


---

## `RetryConfig`

*Interface*

Automatic retry policy for transient failures.

The SDK retries a request when it fails in a way that is likely to succeed on
a second attempt, using exponential backoff and honoring the server's
`Retry-After` header when present. Retries are enabled by default, which keeps
large static-site builds (SSG/ISR prerender fires many requests at once) from
failing the whole build on a short-lived rate limit.

Only reads are retried: `GET` requests and text endpoints (sitemap, robots,
llms.txt, markdown) are retried on HTTP 429, HTTP 503, and network errors.
Submissions (`POST`, e.g. form and review submits) are never retried, so a
request that may have been processed is not sent twice.

Pass `retry: false` to disable retries entirely.

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `backoffMs` | `number` | Yes | Base delay in milliseconds for exponential backoff, used when the response<br>carries no `Retry-After` header. The nth retry (0-indexed) waits about<br>`backoffMs * 2^n` plus a small random jitter, capped by `maxDelayMs`. |
| `maxDelayMs` | `number` | Yes | Upper bound in milliseconds for any single wait between attempts. Also caps<br>a large `Retry-After` value, so one rate-limited request can never stall a<br>build indefinitely. |
| `retries` | `number` | Yes | Maximum number of retry attempts after the initial request.<br>Set to `0` to disable retries (equivalent to `retry: false`). |


---

## `SiteConfig`

*Interface*

Public site configuration returned by `site.getFullConfig()`.
Contains all site-level settings needed to bootstrap a frontend application.

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `analytics` | `{ consentMode: "opt-in" \| "opt-out" \| "disabled" }` | No | Analytics consent configuration for the site. |
| `defaultLocale` | `string` | No | Default locale code for the site (e.g. `'en'`, `'fr'`).<br>Content and API responses default to this locale when no locale is specified.<br>Always appears in enabledLocales. |
| `description` | `string \| null` | No | Short site description for SEO and metadata.<br>`null` when no description has been set by the admin. |
| `domain` | `string` | No | Primary domain without protocol (e.g. `'example.com'`, `'blog.example.com'`).<br>This is the canonical domain for building absolute URLs. |
| `enabledLocales` | `string[]` | No | Array of all enabled locale codes (e.g. `['en', 'fr', 'de']`).<br>Always contains at least defaultLocale.<br>Use this to validate locale parameters or build locale-prefixed URLs. |
| `faviconUrl` | `string \| null` | No | Full CDN URL to the site favicon.<br>`null` when no favicon has been uploaded.<br>Should be used in the `<link rel="icon">` tag. |
| `i18n` | `I18nConfig` | No | Full i18n configuration including locale display metadata,<br>language switcher settings, and automatic detection behavior.<br>See I18nConfig for details. |
| `id` | `string` | No | Site UUID. Same value as the `siteId` used to initialize the client.<br>Format: UUID v4 (e.g. `'550e8400-e29b-41d4-a716-446655440000'`). |
| `logoUrl` | `string \| null` | No | Full CDN URL to the site logo image.<br>`null` when no logo has been uploaded.<br>Typically used in the site header and Open Graph metadata. |
| `name` | `string` | No | Site display name, as configured by the admin.<br>Used for site branding, document titles, etc. |
| `showBranding` | `boolean` | No | Whether the Lynkow branding badge should be displayed on the site.<br>`true` on free plans; `false` on paid plans where branding is removed. |
| `timezone` | `string \| null` | No | IANA timezone identifier for the site (e.g. `'Europe/Paris'`, `'America/New_York'`).<br>Used for displaying dates in the site's local time.<br>`null` when no timezone has been configured (defaults to UTC). |