Queries and mutations for managing Stores in the platform.

Queries

Query Stores

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

Get Store

QUERYstore
Arguments
id​
String​

Queries with specified ID

key​
String​

Queries with specified key

Output:Store

Mutations

Create Store

MUTATIONcreateStore
Arguments
draft​
Output:Store

Update Store

MUTATIONupdateStore
Arguments
version​
Long​
actions​
Array of StoreUpdateAction​
id​
String​

Queries with specified ID

key​
String​

Queries with specified key

Output:Store

Delete Store

MUTATIONdeleteStore
Arguments
version​
Long​
id​
String​

Queries with specified ID

key​
String​

Queries with specified key

Output:Store

Output types

Store

Stores allow defining different contexts for a project.

id​
String​

Unique ID of the Store.

version​
Long​

Current version of the Store.

key​
String​

User-defined unique and immutable identifier for the Store.

name​
String​

Name of the Store.

nameAllLocales​
Array of LocalizedString​

Name of the Store.

languages​
Array of Locale​

Languages configured for the Store.

countries​
Array of StoreCountry​

Countries defined for the Store.

productSelections​

Controls availability of Products for this Store via Product Selections:

  • Leave empty if all Products in the Project should be available in this Store.
  • If only inactive Product Selections with IndividualExclusion ProductSelectionMode are provided, all the Products are available in this Store.
  • If all the Product Selections provided are inactive and there's at least a Product Selection of mode Individual, no Product is available in this Store.
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availability in this Store.
distributionChannelsRef​
Array of Reference​

Product Distribution Channels allowed for the Store.

distributionChannels​
Array of Channel​

Product Distribution Channels allowed for the Store.

supplyChannelsRef​
Array of Reference​

Inventory Supply Channels allowed for the Store.

supplyChannels​
Array of Channel​

Inventory Supply Channels allowed for the Store.

storefront​

Customer-facing URLs and policy links for the Store's storefront.

createdAt​

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

lastModifiedAt​

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

custom​

Custom fields for the Store.

createdBy​

IDs and references that created the Store.

lastModifiedBy​

IDs and references that last modified the Store.

ProductSelectionSetting

productSelectionRef​

Reference to a ProductSelection.

productSelection​

Reference to a ProductSelection.

active​
Boolean​

Whether all Products assigned to this Product Selection are part of the Store's assortment.

Storefront

Customer-facing URLs and policy links for the Store's storefront. All fields are optional and only present when set.

checkoutUrlTemplate​
String​
RFC 6570 URI template for the customer-facing checkout page. Must contain the checkoutId variable, for example https://example.com/checkout/{checkoutId}.
orderUrlTemplate​
String​
RFC 6570 URI template for the customer-facing order status page. Must contain the orderId variable, for example https://example.com/orders/{orderId}.
termsOfServiceUrl​
String​
Absolute https URL of the storefront's terms of service page.
privacyPolicyUrl​
String​
Absolute https URL of the storefront's privacy policy page.
refundPolicyUrl​
String​
Absolute https URL of the storefront's refund policy page.
shippingPolicyUrl​
String​
Absolute https URL of the storefront's shipping policy page.
cookiePolicyUrl​
String​
Absolute https URL of the storefront's cookie policy page.
imprintUrl​
String​
Absolute https URL of the storefront's imprint (legal notice) page.
faqUrl​
String​
Absolute https URL of the storefront's FAQ page.
contactUrl​
String​
Absolute https URL of the storefront's contact page.

Store Query Result

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

Input types

CreateStore

key​
String​
name​
languages​
Array of Locale​
countries​
Array of StoreCountryInput​
distributionChannels​
supplyChannels​
productSelections​
custom​
storefront​

StoreCountryInput

code​

ProductSelectionSettingDraft

productSelection​

Resource Identifier of a ProductSelection.

active​
Boolean​

Whether all Products assigned to the Product Selection should become part of the Store's assortment.

StorefrontInput

checkoutUrlTemplate​
String​
orderUrlTemplate​
String​
termsOfServiceUrl​
String​
privacyPolicyUrl​
String​
refundPolicyUrl​
String​
shippingPolicyUrl​
String​
cookiePolicyUrl​
String​
imprintUrl​
String​
faqUrl​
String​
contactUrl​
String​

StoreUpdateAction

addProductSelection​
addCountry​
addDistributionChannel​
addSupplyChannel​
changeProductSelectionActive​
removeProductSelection​
removeCountry​
removeDistributionChannel​
removeSupplyChannel​
setProductSelections​
setCheckoutUrlTemplate​
setContactUrl​
setCookiePolicyUrl​
setCountries​
setCustomField​
setCustomType​
setDistributionChannels​
setFaqUrl​
setImprintUrl​
setLanguages​
setName​
setOrderUrlTemplate​
setPrivacyPolicyUrl​
setRefundPolicyUrl​
setShippingPolicyUrl​
setSupplyChannels​
setTermsOfServiceUrl​

Update actions

Add Product Selection

To make all included Products available to your customers of a given Store, add the Product Selections to the respective Store. This action has no effect if the given Product Selection is already present in the Store and has the same active flag.
productSelection​

Product Selection to add to the Store either activated or deactivated.

active​
Boolean​

Whether to make all Products assigned to the referenced Product Selection available in the Store.

Add Country

This update action produces the StoreCountriesChanged Message. It has no effect if the given country is already present in a Store.
country​
Value to append to countries.

StoreCountryInput

code​

Add Distribution Channel

This update action produces the StoreDistributionChannelsChanged Message. It has no effect if a given distribution channel is already present in a Store.
Adding a Channel without the ProductDistribution ChannelRoleEnum returns a MissingRoleOnChannel error.
distributionChannel​

Value to append.

Add Supply Channel

This action has no effect if a given supply channel is already present in a Store.

Adding a supply channel produces the StoreSupplyChannelsChanged Message.
Adding a Channel without the InventorySupply ChannelRoleEnum returns a MissingRoleOnChannel error.
supplyChannel​

Value to append.

Change Product Selection Active

productSelection​
active​
Boolean​

Remove Product Selection

This action has no effect if the given Product Selection is not in the Store.

productSelection​

Value to remove. The removed Product Selection is made offline.

Remove Country

This update action produces the StoreCountriesChanged Message. It has no effect if a given country is not present in a Store.
country​
Value to remove from countries.

StoreCountryInput

code​

Remove Distribution Channel

This update action produces the StoreDistributionChannelsChanged Message.
distributionChannel​
Value to remove. ResourceIdentifier of a Channel with the ProductDistribution ChannelRoleEnum.

Remove Supply Channel

This update action produces the StoreSupplyChannelsChanged Message.
supplyChannel​
Value to remove. ResourceIdentifier of a Channel with the InventorySupply ChannelRoleEnum.

Set Product Selections

Instead of adding or removing Product Selections individually, you can also change all the Store's Product Selections in one go using this update action. The Store will only contain the Product Selections specified in the request.
productSelections​

Value to set.

  • If provided, Product Selections for which active is set to true are available in the Store.
  • If omitted or provided as empty array, the action removes all Product Selections from this Store, meaning all Products in the Project are available in this Store.

ProductSelectionSettingInActionInput

productSelection​
active​
Boolean​

Set Checkout Url Template

This update action produces the StoreCheckoutUrlTemplateSet Message.
checkoutUrlTemplate​
String​

Set Contact Url

This update action produces the StoreContactUrlSet Message.
contactUrl​
String​
Value to set. Must be an absolute https URL. If empty, any existing value is removed.

Set Countries

This update action produces the StoreCountriesChanged Message.
countries​
Array of StoreCountryInput​

New value to set.

StoreCountryInput

code​

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 Distribution Channels

This update action produces the StoreDistributionChannelsChanged Message.
Setting a Channel without the ProductDistribution ChannelRoleEnum returns a MissingRoleOnChannel error.
distributionChannels​
Value to set. If not defined, the Store's distributionChannels are unset.

Set Faq Url

This update action produces the StoreFaqUrlSet Message.
faqUrl​
String​
Value to set. Must be an absolute https URL. If empty, any existing value is removed.

Set Imprint Url

This update action produces the StoreImprintUrlSet Message.
imprintUrl​
String​
Value to set. Must be an absolute https URL. If empty, any existing value is removed.

Set Languages

This update action produces the StoreLanguagesChanged Message.
languages​
Array of Locale​

Value to set.

If a language is not configured for the Project, a ProjectNotConfiguredForLanguages error is returned.

Set Name

This update action produces the StoreNameSet Message.
name​

Value to set.

Set Order Url Template

This update action produces the StoreOrderUrlTemplateSet Message.
orderUrlTemplate​
String​

Set Privacy Policy Url

This update action produces the StorePrivacyPolicyUrlSet Message.
privacyPolicyUrl​
String​
Value to set. Must be an absolute https URL. If empty, any existing value is removed.

Set Refund Policy Url

This update action produces the StoreRefundPolicyUrlSet Message.
refundPolicyUrl​
String​
Value to set. Must be an absolute https URL. If empty, any existing value is removed.

Set Shipping Policy Url

This update action produces the StoreShippingPolicyUrlSet Message.
shippingPolicyUrl​
String​
Value to set. Must be an absolute https URL. If empty, any existing value is removed.

Set Supply Channels

Setting a supply channel produces the StoreSupplyChannelsChanged Message.
Setting a Channel without the InventorySupply ChannelRoleEnum returns a MissingRoleOnChannel error.
supplyChannels​
Value to set. If not defined, the Store's supplyChannels are unset.

Set Terms Of Service Url

This update action produces the StoreTermsOfServiceUrlSet Message.
termsOfServiceUrl​
String​
Value to set. Must be an absolute https URL. If empty, any existing value is removed.