The Client SDK is generated specifically for your project using the Frontic CLI. Every block, listing, page, and context endpoint your project exposes becomes a typed method on the generated client.Documentation Index
Fetch the complete documentation index at: https://docs.frontic.com/llms.txt
Use this file to discover all available pages before exploring further.

Generate Client SDK
Run
frontic generate to produce the typed client for your project — see the CLI reference for the full command.Initialization
The generated client supports two initialization patterns.Direct import
For the simplest case — no proxy, no global config:Factory with configuration
For projects that need a global proxy URL (e.g. browser-side requests routed through your own server to avoid CORS):Configuration
createClient(config?)
Create a configured client instance.
Parameters
Global configuration options.
Returns
A configured client instance with all client methods.
Methods
Every method below shares the sameconfig object as a final argument, used to override per-request behaviour. The shared options are listed once here and referenced from each method.
Shared config object
Every method takes an optional config object as its final argument. Not every field applies to every method — the table below in each method’s section calls out which ones are honoured.
Per-request overrides. Optional.
client.block
Fetch a Detail Block by its key.
Parameters
The block name. Example:
'ProductCard'.The record key. Example:
'sku-12345'.See shared
config object.Returns
The block payload, fully typed against the project’s API surface.
Example
Client SDK
client.listing
Fetch a Search Listing with optional parameters and query options.
Parameters
The listing name. Example:
'CategoryListing'.Listing parameters. Shape depends on the listing’s parameter definition.
Example:
{ categoryId: '<category-id>' }.Per-request overrides plus listing-specific query options.
Returns
The listing payload — items, pagination metadata, applied filters, available facets.
Example
Client SDK
client.tree
Fetch a Menu Tree — a hierarchical collection of records assembled from a Data Storage and rendered through a Detail Block.
Parameters
The tree’s API name. Example:
'CategoryNavigation'.Tree-specific query options plus the shared
config object.Returns
An
items array of root-level nodes, each carrying its subtree on $items. Every node’s shape (beyond $items) is defined by the tree’s connected Detail Block.Example
Client SDK
client.page
Fetch a Page by its slug.
Parameters
The URL slug of the page (without protocol). Example:
demo-shop.com/uk/women/shoes/running.See shared
config object.Returns
The page payload —
data, page type, and any alternate urls.Example
Client SDK
client.context
Fetch a context by its token.
Parameters
The
contextKey to look up. Example: 'ae0d4981-c363-4d5a-a49e-1f053d49f2f7'.See shared
config object.Returns
The context —
region, locale, scope, token.Example
Client SDK
client.contextList
List the available contexts (region + currency + locales) for the project, optionally filtered by an existing context token.
Parameters
The
contextKey whose project + scope context variations are returned. Optional.See shared
config object.Returns
Array of context options (region, currency, supported locales with URLs).
The active
contextKey, returned in the fs-context response header.Example
Client SDK
client.contextUpdate
Update an existing context’s region and locale on the Frontic server. Subsequent requests using the same contextKey reflect the change.
Parameters
The context fields to update.
The
contextKey to update.See shared
config object.Returns
The updated context.
Example
Client SDK
Response
Response