Skip to main content

publicCategories

Public: no authentication required.

Returns a seller's category tree for the public storefront. Needs no sign-in. An unknown subdomain gives an empty list.

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:

query PublicCategories($subdomain: String!) {
publicCategories(subdomain: $subdomain) {
id
code
name
description
imageUrl
level
children {
id
code
name
description
imageUrl
level
}
}
}

Variables:

{
"subdomain": "string"
}

Response:

{
"data": {
"publicCategories": [
{
"id": "id",
"code": "string",
"name": "string",
"description": "string",
"imageUrl": "string",
"level": 0,
"children": [
{
"id": "id",
"code": "string",
"name": "string",
"description": "string",
"imageUrl": "string",
"level": 0
}
]
}
]
}
}
publicCategories(
subdomain: String!
): [CustomerCategory!]!

Arguments​

publicCategories.subdomain ● String! non-null scalar​

The seller's storefront subdomain.

Type​

CustomerCategory object​

A category a customer can shop.