customerStorefrontPage
Requires a customer (portal or buyer app) session.
A page of this store's LIVE published storefront theme as the buyer app draws it (never the draft; the basic default theme when nothing is published): the home page, the Search template, or the Category template a category uses (its assigned alternate, else the default). Only sections shown in the app.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query CustomerStorefrontPage($page: StorefrontAppPageKind!) {
customerStorefrontPage(page: $page) {
isDefault
liveVersion
pageId
sections {
id
belowMain
handle
settings
version
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CustomerStorefrontPage($page: StorefrontAppPageKind!) {\n customerStorefrontPage(page: $page) {\n isDefault\n liveVersion\n pageId\n sections {\n id\n belowMain\n handle\n settings\n version\n }\n }\n}",
"variables": {
"page": "CATEGORY"
}
}
EOF
Variables:
{
"page": "CATEGORY"
}
Response:
{
"data": {
"customerStorefrontPage": {
"isDefault": true,
"liveVersion": 0,
"pageId": "string",
"sections": [
{
"id": "string",
"belowMain": true,
"handle": "string",
"settings": {},
"version": 0
}
]
}
}
}
customerStorefrontPage(
categoryId: ID
page: StorefrontAppPageKind!
): StorefrontAppPage!
Arguments
customerStorefrontPage.categoryId ● ID scalar
CATEGORY only: the category shown, to find the alternate template assigned to it. Ignored for any other page.
customerStorefrontPage.page ● StorefrontAppPageKind! non-null enum
The page to return.
Type
StorefrontAppPage object
A page of the storefront buyers see in the buyer app: the LIVE published theme (never the draft), or the basic default theme when the store has published nothing. Only the page's own sections; the app keeps its own header and tab bar, so the theme's shared header and footer are not included.