Skip to content
Queries

brand

An active brand by its slug, with its products in the same query.

brand returns an active brand from the slug in its URL. Its products field returns the brand's products, with filters and facets, in the same query.

brand(slug: String!): BrandDetail!

Arguments

ArgumentTypeRule
slugString!Up to 200 characters. Surrounding spaces are trimmed.

BrandDetail

FieldTypeDescription
idString!Brand ID.
nameString!Name.
slugString!Slug.
urlString!Public path of the brand.
imageUrlStringThe brand's logo, or its icon when it has no logo.
descriptionStringDescription.
metaTitleStringTitle for search engines.
metaDescriptionStringDescription for search engines.
productCountInt!Published products with this brand.
products(input: StorefrontProductsInput)SearchResult!The brand's products.

products takes the same input as products and returns the same SearchResult. It filters by the brand name: it replaces whatever you send in brands.

Example

BrandPage.graphql
query BrandPage($slug: String!, $page: Int = 1) {
  brand(slug: $slug) {
    id
    name
    url
    imageUrl
    description
    products(input: { page: $page, pageSize: 24, includeFilters: false }) {
      totalPages
      products { id name url imageUrl price }
    }
  }
}
Terminal
curl --request POST "https://storefront.ecomiq.pe/graphql" \
  --header "Content-Type: application/json" \
  --header "x-Store-Domain: my-store" \
  --data-binary '{
    "query": "query BrandPage($slug: String!, $page: Int = 1) { brand(slug: $slug) { id name url imageUrl description products(input: { page: $page, pageSize: 24, includeFilters: false }) { totalPages products { id name url imageUrl price } } } }",
    "variables": { "slug": "andina", "page": 1 }
  }'
Response
{
  "data": {
    "brand": {
      "id": "7204558912004324355",
      "name": "Andina",
      "url": "/brands/andina",
      "imageUrl": "https://…/andina.webp",
      "description": "Pima cotton clothing.",
      "products": {
        "totalPages": 1,
        "products": [
          {
            "id": "7204558912004322039",
            "name": "Pima cotton T-shirt",
            "url": "/products/pima-cotton-t-shirt",
            "imageUrl": "https://…/t-shirt.webp",
            "price": 59.9
          }
        ]
      }
    }
  }
}

Errors

CodeCause
BAD_USER_INPUTslug is empty or longer than 200 characters, or input is not valid.
NOT_FOUNDThe brand doesn't exist in the store or is inactive.
STORE_CONTEXT_REQUIREDx-Store-Domain is missing or doesn't match a store.

REST equivalent

GET /v1/brands/{slug} returns the same brand, without products. For its products, filter GET /v1/products with its name in brands.

Last updated:

On this page