Get Channel
About
The channel query retrieves detailed information about a single channel by its ID. Use this query to:
- Display channel-specific information and branding
- Fetch channel configuration for your application
- Get channel translations for multi-language support
- Check maintenance mode status and allowed IPs
- Retrieve channel themes and display settings
- Access channel logos and branding assets
- Build channel-specific pages and configurations
- Handle channel-based routing and localization
This query returns comprehensive channel data including logos, favicons, themes, all translations, and maintenance mode settings.
Arguments
| Argument | Type | Description |
|---|---|---|
id | ID! | Channel ID in format /api/shop/channels/{id} or numeric ID. |
Possible Returns
| Field | Type | Description |
|---|---|---|
id | ID! | Unique channel API identifier. |
_id | Int! | Numeric channel ID. |
code | String! | Unique channel code (e.g., 'default', 'mobile'). |
timezone | String! | Channel timezone (e.g., 'UTC', 'US/Eastern'). |
theme | String | Theme name assigned to this channel. |
hostname | String! | Channel hostname/domain. |
logo | String | File path to channel logo. |
favicon | String | File path to channel favicon. |
isMaintenanceOn | Boolean! | Whether maintenance mode is enabled. |
allowedIps | String | Comma-separated IPs allowed during maintenance (CIDR notation supported). |
createdAt | DateTime! | Channel creation timestamp. |
updatedAt | DateTime! | Last update timestamp. |
logoUrl | String | Full URL to channel logo image. |
faviconUrl | String | Full URL to channel favicon image. |
translation | ChannelTranslation! | Default locale translation. |
translation.id | ID! | Translation identifier. |
translation._id | Int! | Numeric translation ID. |
translation.channelId | Int! | Associated channel ID. |
translation.locale | String! | Language locale code (e.g., 'en', 'ar', 'fr'). |
translation.name | String! | Channel name in current language. |
translation.description | String | Channel description. |
translation.maintenanceModeText | String | Custom maintenance mode message. |
translation.createdAt | DateTime! | Translation creation timestamp. |
translation.updatedAt | DateTime! | Translation update timestamp. |
homeSeo | String | JSON string containing SEO metadata (meta_title, meta_description, meta_keywords). |
locales | LocaleCollection! | All locales (languages) enabled for this channel. |
currencies | CurrencyCollection! | All currencies enabled for this channel. |
defaultLocale | Locale! | The default locale used when no language is explicitly selected. |
baseCurrency | Currency! | The base currency used for pricing on this channel. |
translations | ChannelTranslationCollection! | All available translations. |
translations.edges | [Edge!]! | Translation edges with cursors. |
translations.edges.node | ChannelTranslation! | Individual translation. |
translations.edges.cursor | String! | Pagination cursor for this translation. |
translations.pageInfo | PageInfo! | Pagination information. |
translations.pageInfo.hasNextPage | Boolean! | More translations available. |
translations.pageInfo.hasPreviousPage | Boolean! | Previous translations available. |
translations.pageInfo.startCursor | String | First translation cursor. |
translations.pageInfo.endCursor | String | Last translation cursor. |
translations.totalCount | Int! | Total translations for this channel. |
Channel Relationships
The Get Channel with Relationships variant fetches the channel along with its associated configuration objects — locales, currencies, default locale, and base currency. These are not simple scalar fields; they are linked resources that define how the channel behaves for different regions and markets.
| Relationship | Type | Description |
|---|---|---|
locales | Collection | All languages enabled for this channel. Use this to build a language switcher or determine which locales the channel supports. |
currencies | Collection | All currencies enabled for this channel. Use this to display price selectors or determine accepted currencies. |
defaultLocale | Single object | The fallback language used when no locale is explicitly selected by the user. |
baseCurrency | Single object | The primary currency used for pricing and calculations on this channel. |
When to use this variant:
- Building a storefront that needs to know which languages and currencies are available
- Rendering a locale or currency switcher in the header
- Determining the channel's default display language for first-time visitors
- Resolving the base currency before formatting prices
IP Allowlist Format
The allowedIps field supports multiple formats:
| Format | Example | Description |
|---|---|---|
| Single IP | 192.168.1.1 | Exact IP address |
| Multiple IPs | 192.168.1.1,192.168.1.2 | Comma-separated addresses |
| CIDR Notation | 192.168.1.0/24 | Subnet range |
| Mixed | 127.0.0.1,10.0.0.0/8 | Combination of formats |
Use Cases
1. Channel Detail Page
Use the "Complete Details" example to display full channel information with all metadata.
2. Branding Configuration
Use the "With Branding Assets" example to get logos and favicons for dynamic theming.
3. Maintenance Mode
Use the "Maintenance Details" example to check if channel is under maintenance and display appropriate messages.
4. Multi-Language Support
Use the "With All Translations" example to display channel information in all languages.
5. Channel Relationships (Locales, Currencies)
Use the "With Relationships" example to get all locales, currencies, default locale, and base currency associated with the channel.
6. Channel Routing
Use the basic query to get channel hostname and timezone for routing and localization.
Best Practices
- Cache Channel Data - Channels change infrequently, cache the response per channel
- Check Maintenance Mode - Always verify
isMaintenanceOnstatus before displaying content - Include Translations - Fetch all translations for multi-language support
- Validate IP Allowlist - Verify user IP against
allowedIpsduring maintenance - Use Correct ID Format - Use
/api/shop/channels/{id}format when available - Apply Theme Dynamically - Use
themefield to load theme-specific CSS/configuration - Display Localized Messages - Use translations for maintenance messages in user's language
Maintenance Mode Details
During maintenance mode:
- Set
isMaintenanceOntotrue - Configure
allowedIpsto allow specific IP addresses - Display localized
maintenanceModeTextto users - Redirect non-allowed users to maintenance page
- Support CIDR notation for flexible IP ranges
Related Resources
- Channels - Get all channels with pagination
- Pagination Guide - Cursor pagination documentation
- Shop API Overview - Overview of Shop API resources

