customerCategoryDetail
Requires a customer (portal or buyer app) session.
Returns a category detail (subcategories) by slug.
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 CustomerCategoryDetail($slug: String!) {
customerCategoryDetail(slug: $slug) {
id
name
imageUrl
slug
subcategories {
id
name
imageUrl
slug
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CustomerCategoryDetail($slug: String!) {\n customerCategoryDetail(slug: $slug) {\n id\n name\n imageUrl\n slug\n subcategories {\n id\n name\n imageUrl\n slug\n }\n }\n}",
"variables": {
"slug": "string"
}
}
EOF
Variables:
{
"slug": "string"
}
Response:
{
"data": {
"customerCategoryDetail": {
"id": "id",
"name": "string",
"imageUrl": "string",
"slug": "string",
"subcategories": [
{
"id": "id",
"name": "string",
"imageUrl": "string",
"slug": "string"
}
]
}
}
}
customerCategoryDetail(
slug: String!
): CategoryDetail!
Arguments
customerCategoryDetail.slug ● String! non-null scalar
The slug that identifies the record.
Type
CategoryDetail object
A category with its subcategories.