Queries and mutations for managing Channels in the platform.

Queries

Query Channels

QUERYchannels
Arguments
where​
String​
sort​
Array of String​
limit​
Int​
offset​
Int​

Get Channel

QUERYchannel
Arguments
id​
String​

Queries with specified ID

key​
String​

Queries with specified key

Output:Channel

Mutations

Create Channel

MUTATIONcreateChannel
Arguments
draft​
Output:Channel

Update Channel

MUTATIONupdateChannel
Arguments
id​
String​

Queries with specified ID

key​
String​

Queries with specified key

version​
Long​
actions​
Output:Channel

Delete Channel

MUTATIONdeleteChannel
Arguments
id​
String​

Queries with specified ID

key​
String​

Queries with specified key

version​
Long​
Output:Channel

Output types

Channel

id​
String​

Unique identifier of the Channel.

version​
Long​

Current version of the Channel.

key​
String​

User-defined unique identifier of the Channel.

roles​
Array of ChannelRole​

Roles of the Channel.

Can be InventorySupply, ProductDistribution, OrderExport, OrderImport, or Primary​
name​
String​

Name of the Channel.

nameAllLocales​
Array of LocalizedString​

Name of the Channel.

description​
String​

Description of the Channel.

descriptionAllLocales​
Array of LocalizedString​

Description of the Channel.

address​

Address where the Channel is located (for example, if the Channel is a physical store).

geoLocation​

GeoJSON geometry object encoding the geo location of the Channel.

createdAt​

Date and time (UTC) the Channel was initially created.

lastModifiedAt​

Date and time (UTC) the Channel was last updated.

reviewRatingStatistics​

Statistics about the review ratings taken into account for the Channel.

custom​

Custom Fields defined for the Channel.

createdBy​

IDs and references that created the Channel.

lastModifiedBy​

IDs and references that last modified the Channel.

ChannelRole

InventorySupply
Role tells that this channel can be used to track inventory entries.Channels with this role can be treated as warehouses
ProductDistribution
Role tells that this channel can be used to expose products to a specific distribution channel. It can be used by the cart to select a product price.
OrderExport
Role tells that this channel can be used to track order export activities.
OrderImport
Role tells that this channel can be used to track order import activities.
Primary
This role can be combined with some other roles (e.g. with `InventorySupply`) to represent the fact that this particular channel is the primary/master channel among the channels of the same type.

Geometry

type​
String​

ReviewRatingStatistics

averageRating​
Float​

Average rating of one target This number is rounded with 5 decimals.

highestRating​
Int​

Highest rating of one target

lowestRating​
Int​

Lowest rating of one target

count​
Long​

Number of ratings taken into account

ratingsDistribution​
Json​

Full distribution of the ratings. The keys are the different ratings and the values are the count of reviews having this rating. Only the used ratings appear in this object.

Channel Query Result

offset​
Int​
count​
Int​
total​
Long​
exists​
Boolean​
results​
Array of Channel​

Input types

ChannelDraft

key​
String​

User-defined unique identifier for the Channel.

If set to an empty value, an InvalidOperation error is returned.
If the value is used by another Channel in the Project, a DuplicateField error is returned.
roles​
Array of ChannelRole​

Roles of the Channel.

The Channel must have at least one role. If set to an empty array, an InvalidOperation error is returned.
Can be InventorySupply, ProductDistribution, OrderExport, OrderImport, or Primary​
name​

Name of the Channel.

description​

Description of the Channel.

custom​

Custom fields defined for the Channel.

address​

Address where the Channel is located.

geoLocation​
GeoJSON geometry object encoding the geo location of the Channel. Currently, only the Point type is supported.

ChannelRole

InventorySupply
Role tells that this channel can be used to track inventory entries.Channels with this role can be treated as warehouses
ProductDistribution
Role tells that this channel can be used to expose products to a specific distribution channel. It can be used by the cart to select a product price.
OrderExport
Role tells that this channel can be used to track order export activities.
OrderImport
Role tells that this channel can be used to track order import activities.
Primary
This role can be combined with some other roles (e.g. with `InventorySupply`) to represent the fact that this particular channel is the primary/master channel among the channels of the same type.

GeometryInput

type​
String​
coordinates​
Array of Float​

ChannelUpdateAction

addRoles​
changeDescription​
changeKey​
changeName​
removeRoles​
setAddress​
setAddressCustomField​
setAddressCustomType​
setCustomField​
setCustomType​
setGeoLocation​
setRoles​

Update actions

Add Roles

roles​
Array of ChannelRole​

Value to append to the array.

If the specified roles are already present, an InvalidOperation error is returned.
Can be InventorySupply, ProductDistribution, OrderExport, OrderImport, or Primary​

ChannelRole

InventorySupply
Role tells that this channel can be used to track inventory entries.Channels with this role can be treated as warehouses
ProductDistribution
Role tells that this channel can be used to expose products to a specific distribution channel. It can be used by the cart to select a product price.
OrderExport
Role tells that this channel can be used to track order export activities.
OrderImport
Role tells that this channel can be used to track order import activities.
Primary
This role can be combined with some other roles (e.g. with `InventorySupply`) to represent the fact that this particular channel is the primary/master channel among the channels of the same type.

Change Description

description​

New value to set.

If set to an empty value, an InvalidOperation error is returned.
If the new value is the same as the current value, an InvalidOperation error is returned.

Change Key

key​
String​

New value to set.

If set to an empty value, an InvalidOperation error is returned.
If the value is used by another Channel in the Project, a DuplicateField error is returned.

Change Name

name​

New value to set.

If set to an empty value, an InvalidOperation error is returned.
If the new value is the same as the current value, an InvalidOperation error is returned.

Remove Roles

roles​
Array of ChannelRole​

Value to remove from the array.

If none of the specified roles are already present, an InvalidOperation error is returned.
If all roles from the Channel are removed, an InvalidOperation error is returned.
Can be InventorySupply, ProductDistribution, OrderExport, OrderImport, or Primary​

ChannelRole

InventorySupply
Role tells that this channel can be used to track inventory entries.Channels with this role can be treated as warehouses
ProductDistribution
Role tells that this channel can be used to expose products to a specific distribution channel. It can be used by the cart to select a product price.
OrderExport
Role tells that this channel can be used to track order export activities.
OrderImport
Role tells that this channel can be used to track order import activities.
Primary
This role can be combined with some other roles (e.g. with `InventorySupply`) to represent the fact that this particular channel is the primary/master channel among the channels of the same type.

Set Address

address​

Value to set. If omitted, any existing value is removed.

Set Address Custom Field

To set a Custom Field for a Channel, Channel.address must be set; otherwise, an InvalidInput error is returned.
name​
String​
Name of the Custom Field.
value​
String​
Specifies the format of the value of the Custom Field defined by name. If value is absent or null, this field will be removed, if it exists. Removing a field that does not exist returns an InvalidOperation error.

Set Address Custom Type

fields​
Array of CustomFieldInput​
typeKey​
String​
typeId​
String​

Set Custom Field

name​
String​
Name of the Custom Field.
value​
String​
If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

Set Custom Type

fields​
Array of CustomFieldInput​
typeKey​
String​
typeId​
String​

Set Geo Location

geoLocation​

Value to set.

GeometryInput

type​
String​
coordinates​
Array of Float​

Set Roles

roles​
Array of ChannelRole​
Value to set. If set to an empty array, an InvalidOperation error is returned.
If the new value is the same as the current value, an InvalidOperation error is returned.
Can be InventorySupply, ProductDistribution, OrderExport, OrderImport, or Primary​

ChannelRole

InventorySupply
Role tells that this channel can be used to track inventory entries.Channels with this role can be treated as warehouses
ProductDistribution
Role tells that this channel can be used to expose products to a specific distribution channel. It can be used by the cart to select a product price.
OrderExport
Role tells that this channel can be used to track order export activities.
OrderImport
Role tells that this channel can be used to track order import activities.
Primary
This role can be combined with some other roles (e.g. with `InventorySupply`) to represent the fact that this particular channel is the primary/master channel among the channels of the same type.