How to

Get CMS Page

Retrieve a CMS page by its alias using Geins Merchant API

Prerequisites

  • Merchant API key
  • Page alias (for example, "about", "contact")

Goal

  • Retrieve a page's widget collection by providing its alias

Architecture at a glance

  • Call widgetArea with alias → Receive content collection for that page

Example

Use the alias argument to fetch the page.

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

Request example

query widgetArea(
  $alias: String
  $channelId: String
  $languageId: String
  $marketId: String
) {
  widgetArea(
    alias: $alias
    channelId: $channelId
    languageId: $languageId
    marketId: $marketId
  ) {
    tags
    containers {
      layout
      design
      widgets {
        name
        configuration
        images { fileName }
      }
    }
  }
}
The channelId, languageId, and marketId arguments are optional and can be left out to use default values.

Response example

200 OK
response.json
{
  "data": {
    "widgetArea": {
      "tags": ["page"],
      "containers": [
        {
          "layout": "one-column",
          "design": "default",
          "widgets": [
            {
              "name": "HeroBanner",
              "configuration": "{...}",
              "images": [{"fileName": "hero.jpg"}]
            }
          ]
        }
      ]
    }
  }
}

Options

Channel, Language, and Market

The query also supports optional parameters for multi-market support:

Read more about channelId, languageId, and marketId in the "how to"-article about using multi-market support.

Authenticated access

While authentication is not required for this query, including a JWT bearer token in the Authorization header can provide personalized results based on the authenticated user's context, for example personalized or restricted content.

To include authentication, add the JWT bearer token to your request headers:

"Authorization": "Bearer {JWT_TOKEN}"
Read more about obtaining and using JWT tokens in the guide about the authentication flow.
Related