cmsBlocks
Requires at least one of the permissions storefront:storefront:read or storefront:storefront:update.
Read-only list of the organization's retired Home CMS blocks, ordered by position — the source of the theme editor's Home CMS importer. The Home CMS editor is retired. Needs the storefront read or update permission.
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 CmsBlocks {
cmsBlocks {
id
createdAt
isActive
kind
metadata
order
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CmsBlocks {\n cmsBlocks {\n id\n createdAt\n isActive\n kind\n metadata\n order\n }\n}"
}
EOF
Response:
{
"data": {
"cmsBlocks": [
{
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"isActive": true,
"kind": "BRAND_PREMIX",
"metadata": {},
"order": 0
}
]
}
}
cmsBlocks(
kind: HomeSectionKind
): [CmsBlock!]!
Arguments
cmsBlocks.kind ● HomeSectionKind enum
Only blocks of this kind of home section.
Type
CmsBlock object
A block of content on a page.