How to

Get brands

Retrieve all available brands for displaying brand navigation, filters, or brand listing pages using Geins Merchant API

Prerequisites

  • Merchant API key

Goal

  • Display a linked list of all brands for navigation or filtering
  • Create a brands page listing all available brands

Architecture at a glance

  • Use brands query → Get all brands with details → Display in navigation or listing

APIs used

  • Merchant API: https://merchantapi.geins.io/graphql

Step-by-step

Get all brands

Use the brands query to retrieve all available brands:

Try it out in the GraphQL Playground using the query, headers and variables below.

Request example

query brands(
  $channelId: String
  $languageId: String
  $marketId: String
) {
  brands(
    channelId: $channelId
    languageId: $languageId
    marketId: $marketId
  ) {
    name
    description
    alias
    canonicalUrl
    primaryImage
  }
}
The channelId, languageId, and marketId arguments are optional and can be left out to use default values.

Response example

200 OK
response.json
{
  "data": {
    "brands": [
      {
        "name": "Acme",
        "description": "Premium quality products since 1950",
        "alias": "acme",
        "canonicalUrl": "/b/acme",
        "primaryImage": "https://cdn.example.com/images/brands/acme-logo.jpg"
      },
      {
        "name": "TechCorp",
        "description": "Innovative technology solutions",
        "alias": "techcorp",
        "canonicalUrl": "/b/techcorp",
        "primaryImage": "https://cdn.example.com/images/brands/techcorp-logo.jpg"
      }
    ]
  }
}

Multi-market support

The query supports optional parameters for multi-market configurations:

Read more about channelId, languageId, and marketId in the multi-market support guide.

Common pitfalls

  • Hardcoding brand URLs - use the canonicalUrl field for proper routing
Related