Skip to main content

ChannelCreateInput

Input for creating a new channel within a tenant. Channels represent distinct sales or distribution channels with their own configuration.

input ChannelCreateInput {
name: String!
descriptions: [LocalizedStringInput!]
catalogRootId: Int
anonymousUserId: Int
marketIds: [String!]
defaultMarketId: String
}

Fields​

ChannelCreateInput.name ● String! non-null scalar​

Unique name for the channel within the tenant. Must be at least 1 character long and will be used for identification and display purposes.

Validation: Minimum length of 1 character.

ChannelCreateInput.descriptions ● [LocalizedStringInput!] list input​

Localized descriptions for the channel in different languages. Each entry must have a unique language code to avoid duplicates.

ChannelCreateInput.catalogRootId ● Int scalar​

Reference to the root catalog item for this channel. Defines the top-level product hierarchy available through this channel.

ChannelCreateInput.anonymousUserId ● Int scalar​

Reference to the anonymous user account for this channel. Used for handling unauthenticated user sessions and permissions.

ChannelCreateInput.marketIds ● [String!] list scalar​

BETA: markets can still change in ways that break existing integrations. Backwards compatibility is not guaranteed while it is in beta.

Ids of the markets this channel sells in. Without marketIds and defaultMarketId, the channel gets the tenant's default market. The list can't be empty, and it can't be null. Without defaultMarketId, a list of one market makes that market the default; a longer list needs defaultMarketId too.

Errors: MARKET_NOT_FOUND_ERROR for an unknown market, CHANNEL_INVALID_MARKETS_ERROR when the default market isn't in the list, or when a longer list comes without defaultMarketId.

ChannelCreateInput.defaultMarketId ● String scalar​

BETA: markets can still change in ways that break existing integrations. Backwards compatibility is not guaranteed while it is in beta.

Id of the channel's default market: the market the front-end shows first. Must be one of marketIds. Without marketIds, the channel gets just this market. Can't be null.

Errors: MARKET_NOT_FOUND_ERROR for an unknown market, CHANNEL_INVALID_MARKETS_ERROR when it isn't one of marketIds.

Member Of​

channelCreate mutation