Only this pageAll pages
Powered by GitBook
1 of 55

GraphQL API

Loading...

Overview

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

CHANGELOG

Loading...

Loading...

Guides

Loading...

Loading...

Loading...

Loading...

Query examples

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

GraphQL API

This doc provides an overview of our GraphQL API which is designed specifically with data integration in mind.

The API is available at /api/graphql/ URL path of your instance.

API returns data in JSON format.

contains Queries and Mutations.

API schema

Stream queries

List of factors resulting in resource cursor update

Note that some updates though potentially could be interpreted as other resource updates as well, i.e. category name changes could result in updates of both product and category tree cursors, are limited to the specific resource to limit the overall amount of updates.

This is by design since a potentially small change could cause a snowball effect - one, simple category name change, could cause the need to reimport all products in the system, etc.

productStream

  • product created

  • product property updated

    • attribute value

    • product added or removed from a category

    • template assignment

    • status changed

    • a variant has been added or removed

    • grouped product has been added or removed

  • product added to a segment

  • variable product variant added to a segment

  • grouping product grouped product added to a segment

  • product related in product relation attribute added to a segment

attributeStream

  • attribute created

  • attribute property updated

    • name

    • metadata

    • option added, modified, or removed from an attribute

    • unit attribute unit

    • price attribute currency

    • textarea attribute richEdit property

categoryStream

  • category created

  • category property updated

    • name

    • attribute value

categoryTreeStream

  • category tree created

  • category tree property updated

    • name

    • category tree structure

multimediaStream

  • multimedia created

  • multimedia property updated

    • name

    • folder assignment

Error codes

The list of possible error codes to occur in course of executing API mutations.

General

  • 128f9cb0-28bd-4843-a570-d2bd4671c495 The resource is referenced from other resources.

  • e78b3ed7-db49-4e81-9f29-ecc2985072f4 Currency is not supported.

  • 79876042-fe47-4035-ba10-ce07706433fd Template with given TemplateCode does not exist.

  • 4b5f8783-1273-4ddb-8e05-e0ecf685d924 Unit with given UnitName does not exist.

  • 9ff3fdc4-b214-49db-8718-39c315e33d45 Too short input value.

  • d94b19cc-114f-4f44-9cc4-4138e80a87b9 Too long input value.

  • c1051bb4-d103-4f74-8988-acbcafc7fdc3 The input value cannot be blank.

  • ea4e51d1-3342-48bd-87f1-9e672cd90cad The numeric value is too low.

  • 1a9da513-2640-4f84-9b6a-4d99dcddc628 Value is not a valid date format.

  • d6d40d78-bf28-4773-8c0d-4411be1e8fa6 Translation language is not active.

  • 756b1212-697c-468d-a9ad-50dd783bb169 Too many elements in a collection.

  • 491b2811-7e4d-49f7-adbe-a42622031f1c Language has to be passed when setting a value for local scope Attribute.

  • 786446ad-32b8-40a9-9bb5-e5445196ffd5 Value is not unique for the given attribute.

  • a16b966e-e884-4075-9de7-4720cad1022a Value does not match Regex.

  • aa82dbed-9098-4d4b-af22-3a0dde5d47bb Multimedia extension is not acceptable.

  • e47e5afd-c7ef-4a5d-bb3e-0076269951d4 Value contains banned words.

  • 25db6569-d15d-41a2-a32d-61b67308d285 Attribute code has to represent a unique attribute.

Attribute

  • 4a9205b6-8f3c-4e85-960d-9835aaa1e9ab Attribute with given AttributeCode does not exist.

  • 62adb4f9-217d-4d9e-b117-0a30b4b33f3b Attribute with given AttributeCode exists already.

  • 25f77355-4443-4850-b8cd-7d3ec7ef5a7a Attribute already has Option with given OptionCode.

  • bc1a2fc6-4910-4e47-a3aa-1fdbcd2d364b Attribute does not contain Option with given OptionCode.

  • 50084892-e811-4358-820e-f005917f769b Attribute with given AttributeCode is not valid according to context.

  • 72e93c59-575a-4062-914b-5e143f2810f0 Attribute metadata limit exceeded.

  • ea5e8ce4-8ab7-442d-87ca-db500cad7be2 Attribute metadata payload keys duplicates.

  • 7cc10e50-3d49-43c6-a847-3b8363f9ed83 Invalid attribute scope.

Category

  • 6d2e1555-7d1b-47a7-8d2d-47ea2e33bfe6 Category with given CategoryCode does not exist.

  • ef49c353-7fec-4f5a-beb7-47d392606a15 Category with given CategoryCode exists already.

  • b2943d95-24e6-4b0c-9f09-f86ea635d8cb Categories do not have Attribute enabled in configuration.

  • c18fa865-07a5-4fcb-a6af-8c44b5c643bd Attribute is used in Category as value.

Multimedia

  • d62579bf-6fde-4396-9f12-bc71d6394746 Multimedia exists already within MultimediaPath.

  • eabcf146-a4e7-425c-999f-9e04a6c8a988 Multimedia with given MultimediaPath does not exist.

  • 9670b62d-5db8-4de8-81bd-7d6119625df0 Multimedia file should be an image.

  • df8637af-d466-48c6-a59d-e7126250a654 Multimedia file uploaded is too large.

  • dd4722d6-9371-42a2-9c35-87b2a03009e7 Multimedia file uploaded extension is not supported.

  • 9465e18e-be76-46e8-ab9f-1db22426ab06 Multimedia file is corrupted and its extension does not match MIME type.

  • ef0dd12b-f075-4bbb-8535-4f299452cf30 Multimedia with the given extension in MultimediaName does not match the Multimedia file MIME type.

  • d64f83eb-32ae-48f6-a46d-ffa4fcba6ee3 MultimediaFolder with given MultimediaFolderPath does not exist.

  • 54c25a35-59da-4215-aa61-997bb80d303f MultimediaFolder with given MultimediaFolderPath exists already.

Product

  • bb87ccb2-0433-40d9-976d-f4f388299840 Product relation cannot reference self.

  • a339fa44-2bf8-48df-84a5-ad83a4ba74be Product type is invalid.

  • 01b70d39-8e58-4406-a1c8-f63d84f29af6 Product with given Sku does not exist.

  • c63cc7a9-1298-4520-a5ad-6c0a9c478a00 Product with given Sku exists already.

  • 7e270f10-73b7-4b82-991f-80bda5bc70a3 VariableProduct needs to have bindings in order to add variants.

  • d3209a3d-23a5-4c53-bf6b-4b72cd42d376 Product cannot be added as a VariableProduct variant as do not have the required attributes.

  • 18b2cb49-313d-4251-96bd-e031351a95b8 VariableProduct has variants already and its binding attributes cannot be changed.

  • 3b96fc99-792e-4698-aee1-a3d95ad97b05 Product attribute value is a bond to VariableProduct and cannot be changed.

  • 0786e099-07ce-4b4e-bf92-d04442c130e5 Another Product is bonded to VariableProduct with the same set of value of binding attributes.

  • bfff5187-1ac6-45f8-8516-7d59ab030c09 Cannot remove attribute value as it's a binding attribute.

  • 72b36b5b-5c2f-44c6-85f3-ecadc04ea1b3 Product is already a Variant.

  • 6406a966-10e9-4096-abfd-bf6764909fd2 Product does not have given child.

Interfaces

Interfaces represent a parent for Objects providing definition of common fields.

Attribute

An attribute represents a type of value that can be assigned to a product.

Fields:

code

Readable id of Attribute.

Translatable name allowing to set different values in every active language.

scope

Scope of Attribute determining its values behavior.

metadata

Metadata allows describing the Attribute in an enhanced, custom way.

Implemented by:

AttributeValue

Represents a value defining a specific attribute.

Fields:

A value translations.

attribute

An Attribute describing the type of value.

Implemented by:

AttributeValueTranslation

Represents a translated attribute value for language.

Fields:

language

A language of a translation.

Implemented by:

CustomField

A custom field represents a type of value that can be assigned to an attribute option.

Fields:

code

Readable id of CustomField.

Implemented by:

CustomFieldTranslatedValue

Represents a value defining a specific CustomField in specific language only.

Fields:

customField

A CustomField describing the type of value.

Implemented by:

CustomFieldValue

Represents a value defining a specific CustomField.

Fields:

customField

A CustomField describing the type of value.

A value translations.

Implemented by:

CustomFieldValueTranslation

Represents a translated custom field value for language.

Fields:

language

A language of a translation.

Implemented by:

OptionAttribute

An attribute with a predefined set of values(options).

Implements:

Fields:

A list of options of an Attribute. first argument cannot be lesser than 0 and higher than 200. The default value is 50.

customFields

Configured attribute custom fields.

Implemented by:

Product

Fields:

sku

sku

A list of categories Product belongs to. first argument cannot be lesser than 0 and its default value is 50.

template

Template of Product.

A list of Attribute values. first argument cannot be lesser than 0 and its default value is 50.

status

Status of Product.

createdAt

Creation date.

editedAt

Last edition date.

Implemented by:

Query types

Overview of available query and field naming concepts representing how the data is provided.

Single resource

Returns resource identified by the unique inedntifier

  • product(sku: "simple_product") {…} - sku(Sku) for product

  • attribute(code: "attribute_code") {...} - code(AttributeCode) for the attribute

Streams

*Stream (paginable)

Streams allow fetching the collection of resources.

Streams are designed specifically for integrations - once you create a new resource or edit existing ones, a resource is automatically transferred to the end of the stream - a given resource at a given moment is available in the stream only once. The stream gives you the power of importing resources in time without worrying about dealing with nitty-gritty details like edition date etc. As an example, we do have a product stream with the following SKUs [1, 2, 3 {endCursor}]. Once product 2 gets updated the stream will look like the following [1, 3 {endCursorFromInitialState}, 2]. Once you'd add product 4 again the stream would look like [1, 3 {endCursorFromInitialState}, 2, 4]. Thanks to using this powerful design of the cursor approach and our providing method you are sure you don't miss a resource once fetching continuously unlike it's risky on classic paginal collections.

Note if you have an API key created with Segment products are also transferred to the end of the stream once are added to a Segment.

  • productStream(first: 1, after: “cursor”) {…}

Lists

*List (paginable)

Lists allow fetching the collection(list) of the resources.

The list should always be fetched and updated entirely at once. The list represents finite resources not growing in time.

  • languageList(first: 1, after: "cursor") {…}

  • Product.attributeList

Collections

Usually available from other resources levels i.e. bindings of the variable product

  • VariableProduct.bindings

Every API resource is presented in the current state at the moment of fetching.

Schema

Alternatively, in order to obtain the full types definition download the schema

or just query the API:

{
  __schema {
    queryType {
      name
    }
    mutationType {
      name
    }
    subscriptionType {
      name
    }
    types {
      ...FullType 
    }
    directives {
      name
      description
      locations
      args {
        ...InputValue 
      }
    }
  }
}
fragment FullType on __Type {
  kind
  name
  description
  fields(includeDeprecated: true) {
    name
    description
    args {
      ...InputValue 
    } 
    type {
      ...TypeRef
    }
    isDeprecated
    deprecationReason
  }
  inputFields {
    ...InputValue
  }
  interfaces {
    ...TypeRef
  }
  enumValues(includeDeprecated: true) {
    name
    description
    isDeprecated
    deprecationReason
  }
  possibleTypes {
    ...TypeRef 
  }
}
fragment InputValue on __InputValue {
  name
  description
  type {
    ...TypeRef 
  }
  defaultValue
}
fragment TypeRef on __Type {
  kind
  name
  ofType {
    kind
    name
    ofType {
      kind
      name
      ofType {
        kind
        name
        ofType
        {
          kind
          name
          ofType {
            kind
            name
            ofType {
              kind
              name
              ofType {
                kind
                name
              }
            }
          }
        }
      }
    }
  }
}

Types reference:

Queries

Queries allow retrieving data from the server.

attribute

Finds an Attribute.

Arguments:

attributeDeletedStream

Arguments:

attributeOptionList

Provides a list of attribute options.

Arguments:

attributeStream

Arguments:

category

Finds a Category.

Arguments:

categoryAttributeList

Provides a list of attributes allowed to be used in a category.

Arguments:

categoryDeletedStream

Arguments:

categoryStream

Arguments:

categoryTree

Finds a CategoryTree.

Arguments:

categoryTreeDeletedStream

Arguments:

categoryTreeStream

Arguments:

languageList

Provides a list of active languages.

Arguments:

multimedia

Finds a Multimedia.

Arguments:

multimediaFolder

Finds a MultimediaFolder.

Arguments:

multimediaFolderList

Provides a list of multimedia folders.

Arguments:

multimediaStream

Arguments:

product

Finds a Product.

Arguments:

productByUniqueAttribute

Finds a Product by unique attribute value.

Arguments:

productDeletedStream

Arguments:

productStream

Arguments:

productVariantParent

Finds a parent VariableProduct identified by variant Sku.

Arguments:

section

Finds a Section.

Arguments:

sectionList

Provides a list of sections.

Arguments:

template

Finds a Template.

Arguments:

templateList

Provides a list of templates.

Arguments:

name (languages: )

translations (languages: )

translations (languages: )

optionList (after: , first: )

categoryList (after: , first: )

attributeList (after: , first: , codes: )

All paginable collections are based on the standard. According to it every Edge of the graph next to the information of the resource(node) contains a cursor that allows fetching the next resource from the collection.

The entire GraphQL schema is available to fetch from the API itself. It's called .

As with every other query, introspection of the Ergonode API requires .

The simplest way to discover the GraphQL API is to use supporting HTTP clients like . On one hand, they do support scoping through documentation schema, and on the other provide autocomplete functionality which makes writing queries really straightforward.

Returns:

Provides a of deleted attribute codes.

Returns:

Returns:

Provides a of attributes.

Returns:

Returns:

Returns:

Provides a of deleted category codes.

Returns:

Provides a of categories.

Returns:

Returns:

Provides a of deleted category tree codes.

Returns:

Provides a of category trees.

Returns:

Returns:

Returns:

Returns:

Returns:

Provides a of multimedia.

Returns:

Returns:

Returns:

Provides a of deleted product SKUs.

Returns:

Provides a of products.

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Relay
introspection
authentication
Insomnia
Queries
Mutations
Objects
Interfaces
Scalars
Input objects
Enums
Unions
OptionAttribute
Attribute
[AttributeValueTranslation!]!
Attribute!
CustomField!
CustomField!
[CustomFieldValueTranslation!]!
OptionConnection!
[CustomField!]!
Attribute
Product
Product
stream
stream
stream
stream
stream
stream
stream
stream
stream
AttributeCode!
[Language!]
[Language!]
Language!
CustomFieldCode!
[Language!]
Language!
String
Int
Sku!
String
Int
String
Int
[AttributeCode!]
DateTime!
DateTime
AttributeScope!

Breaking changes

The list of recent and upcoming breaking changes

At Ergonode we strive to make your integration process as fluent as possible but from time to time we discover a flaw in the design of the schema or introduce a really cool new feature that is impossible to be provided in a fully-compatible non-breaking way.

In such a situation, we will always aim to not break your integration with the new release and provide you with a transition period of approximately 3-months to adjust your consumer. Every such change shall be communicated in the following list.

2023-08-23

Breaking change scheduled for 04-2024

  • MultiSelectAttribute.options is going to be removed

  • SelectAttribute.options is going to be removed

2023-05-08

Breaking change scheduled for 09-2023

  • MultimediaCreateInput.folderName is going to be removed

  • Mutation.multimediaSetFolder is going to be removed

2022-09-26

Breaking changes scheduled for 02-2023

  • AttributeValue.valueTranslations is going to be removed

2022-08-09

Breaking changes scheduled for 12-2022

  • Attribute.label is going to be removed

  • Option.label is going to be removed

  • OptionInput.label is going to be removed

  • Mutation.attributeSetLabel is going to be removed

  • label field is going to be removed from Attribute create mutation input objects

    • AttributeCreateDateInput

    • AttributeCreateFileInput

    • AttributeCreateGalleryInput

    • AttributeCreateImageInput

    • AttributeCreateMultiSelectInput

    • AttributeCreateNumericInput

    • AttributeCreatePriceInput

    • AttributeCreateProductRelationInput

    • AttributeCreateSelectInput

    • AttributeCreateTextareaInput

    • AttributeCreateTextInput

    • AttributeCreateUnitInput

2022-06-09

Breaking changes scheduled for 10-2022

  • GroupingProduct.childList is going to be removed

  • Template.name is going to be removed

  • Template.defaultLabel is going to be removed

2022-05-04

Breaking changes scheduled for 08-2022

  • TranslatedAttributeValue.inherited is going to be removed

  • Query.languageTreeLeafList is going to be removed

2022-03-15

Breaking change scheduled for 07-2022

  • Attribute.hint is going to be removed

  • Attribute.placeholder is going to be removed

  • Mutation.attributeSetHint is going to be removed

  • Mutation.attributeSetPlaceholder is going to be removed

  • placeholder and hint fields are going to be removed from Attribute create mutation input objects

    • AttributeCreateDateInput

    • AttributeCreateFileInput

    • AttributeCreateGalleryInput

    • AttributeCreateImageInput

    • AttributeCreateMultiSelectInput

    • AttributeCreateNumericInput

    • AttributeCreatePriceInput

    • AttributeCreateProductRelationInput

    • AttributeCreateSelectInput

    • AttributeCreateTextareaInput

    • AttributeCreateTextInput

    • AttributeCreateUnitInput

2022-01-31

Breaking change scheduled for 05-2022

  • Option.attribute is going to be removed

2022-01-18

Breaking change scheduled for 05-2022

  • AttributeValue.value is going to be removed

  • AttributeValue.code is going to be removed

Changelog

The changelog is a list of recent changes to GraphQL API schema.

2024-11-21

  • Query.productVariantParent added

  • Product.status added

  • Mutation.productSetStatus added

2024-10-16

  • Query.productByUniqueAttribute added

2024-07-15

  • ProductAddAttributeValueTranslationsProductRelationInput.twoWayRelation added

2024-06-25

  • Mutation.multimediaFolderDelete added

  • Query.attributeOptionList added

2024-04-16

  • MultiSelectAttribute.options removed

  • SelectAttribute.options removed

2024-01-25

  • OptionAttribute.optionList argument codes added

  • Template.sectionList added

  • Query.section added

  • Query.sectionList added

  • Query.template added

2023-12-20

  • OptionAttribute interface added

  • SelectAttribute implements OptionAttribute

  • MultiSelectAttribute implements OptionAttribute

  • OptionAttribute.customFields added

  • Option.customFields added

  • Mutation.attributeOptionAddCustomFieldImage added

  • Mutation.attributeOptionAddCustomFieldText added

  • Mutation.attributeOptionAddCustomFieldTextarea added

  • Mutation.attributeOptionAddCustomFieldTextareaRTE added

  • Mutation.attributeOptionAddOptionCustomFieldValueTranslationsImage added

  • Mutation.attributeOptionAddOptionCustomFieldValueTranslationsText added

  • Mutation.attributeOptionAddOptionCustomFieldValueTranslationsTextarea added

  • Mutation.attributeOptionAddOptionCustomFieldValueTranslationsTextareaRTE added

  • Mutation.attributeOptionDeleteCustomField added

  • Mutation.attributeOptionDeleteOptionCustomFieldValueTranslations added

2023-09-07

  • Query.multimediaFolder added

  • MultimediaFolderCreateInput.createFolderPath added

  • MultimediaCreateInput.folderName removed

  • Mutation.multimediaSetFolder removed

2023-08-23

  • MultiSelectAttribute.optionList added

  • MultiSelectAttribute.options becomes deprecated. Use MultiSelectAttribute.optionList instead

  • SelectAttribute.optionList added

  • SelectAttribute.options becomes deprecated. Use SelectAttribute.optionList instead

  • Mutation.attributeMultiSelectAddOption added

  • Mutation.attributeMultiSelectDeleteOption added

  • Mutation.attributeMultiSelectSetOptionName added

  • Mutation.attributeSelectAddOption added

  • Mutation.attributeSelectDeleteOption added

  • Mutation.attributeSelectSetOptionName added

  • Mutation.multimediaReplace added

2023-07-25

  • Query.multimedia added

2023-05-08

  • MultimediaFolder.path added

  • Mutation.multimediaMove added

  • Mutation.multimediaFolderCreate added

  • MultimediaCreateInput.folderPath added

  • MultimediaCreateInput.folderName becomes deprecated. If passed together with folderPath this argument becomes disregarded

  • Mutation.multimediaSetFolder becomes deprecated

2023-04-17

  • MultiSelectAttributeValueTranslation.translatedValue added

  • SelectAttributeValueTranslation.translatedValue added

2023-02-28

  • AttributeValue.valueTranslations removed

  • TextareaAttributeValueTranslation.rawValue added

2023-02-22

  • Attribute.metadata added

  • Mutation.attributeAddMetadata added

  • Mutation.attributeDeleteMetadata added

2023-02-14

  • Mutation.multimediaSetFolder added

2022-12-21

  • Query.categoryAttributeList added

  • Mutation.categoryAttributeAddAttribute added

  • Mutation.categoryAttributeRemoveAttribute added

2022-12-07

  • Mutation.attributeSetLabel removed

  • OptionInput.label removed

  • Option.label removed

  • Attribute.label removed

  • label removed from Attribute create mutation input objects

    • AttributeCreateDateInput

    • AttributeCreateFileInput

    • AttributeCreateGalleryInput

    • AttributeCreateImageInput

    • AttributeCreateMultiSelectInput

    • AttributeCreateNumericInput

    • AttributeCreatePriceInput

    • AttributeCreateProductRelationInput

    • AttributeCreateSelectInput

    • AttributeCreateTextareaInput

    • AttributeCreateTextInput

    • AttributeCreateUnitInput

2022-11-09

  • Category.attributeList added

  • Mutation.categoryDeleteAttributeValueTranslations added

  • Mutation.categoryAddAttributeValueTranslationsText added

  • Mutation.categoryAddAttributeValueTranslationsTextarea added

  • Mutation.categoryAddAttributeValueTranslationsNumeric added

  • Mutation.categoryAddAttributeValueTranslationsPrice added

  • Mutation.categoryAddAttributeValueTranslationsUnit added

  • Mutation.categoryAddAttributeValueTranslationsImage added

  • Mutation.categoryAddAttributeValueTranslationsGallery added

  • Mutation.categoryAddAttributeValueTranslationsFile added

  • Mutation.categoryAddAttributeValueTranslationsProductRelation added

  • Mutation.categoryAddAttributeValueTranslationsDate added

  • Mutation.categoryAddAttributeValueTranslationsSelect added

  • Mutation.categoryAddAttributeValueTranslationsMultiSelect added

  • GroupingProduct.childList removed

  • Template.name removed

  • Template.defaultLabel removed

2022-10-19

  • MultimediaCreateInput.folderName added

2022-09-26

  • AttributeValue.translations added - represents the translation value type per Attribute type. MultiSelectAttributeValue and SelectAttributeValue instead of simple OptionCode provides entire Option

  • AttributeValue.valueTranslations becomes deprecated

  • AttributeValue implementations per Attribute type added

2022-08-11

  • TranslatedAttributeValue.inherited removed

  • Query.languageTreeLeafList removed

2022-08-09

  • Template.attributeList added

  • Query.templateList added

  • Attribute.name added - represents the same value as Attribute.label field

  • Attribute.label becomes deprecated

  • Option.name added - represents the same value as Option.label field

  • Option.label becomes deprecated

  • OptionInput.name added

    • if passed together with label field it takes precedence

  • Mutation.attributeSetName added

  • Mutation.attributeSetLabel becomes deprecated

  • name field added in Attribute create mutation input objects. It replaces label field. If passed together with it name takes precedence

    • AttributeCreateDateInput

    • AttributeCreateFileInput

    • AttributeCreateGalleryInput

    • AttributeCreateImageInput

    • AttributeCreateMultiSelectInput

    • AttributeCreateNumericInput

    • AttributeCreatePriceInput

    • AttributeCreateProductRelationInput

    • AttributeCreateSelectInput

    • AttributeCreateTextareaInput

    • AttributeCreateTextInput

    • AttributeCreateUnitInput

2022-08-01

  • Attribute.hint removed

  • Attribute.placeholder removed

  • Mutation.attributeSetHint removed

  • Mutation.attributeSetPlaceholder removed

  • placeholder and hint fields removed from Attribute create mutation input objects

    • AttributeCreateDateInput

    • AttributeCreateFileInput

    • AttributeCreateGalleryInput

    • AttributeCreateImageInput

    • AttributeCreateMultiSelectInput

    • AttributeCreateNumericInput

    • AttributeCreatePriceInput

    • AttributeCreateProductRelationInput

    • AttributeCreateSelectInput

    • AttributeCreateTextareaInput

    • AttributeCreateTextInput

    • AttributeCreateUnitInput

2022-07-14

  • Multimedia.title added

  • Mutation.multimediaSetTitle added

2022-06-09

  • ProductGroupingAddChildInput.quantity added

  • Mutation.productGroupingSetChildQuantity added

  • GroupingProduct.childrenList added

  • GroupingProduct.childList becomes deprecated

  • Template.name becomes deprecated

  • Template.defaultLabel becomes deprecated

2022-05-10

  • AttributeValue.code removed

  • AttributeValue.value removed

  • Option.attribute removed

2022-05-04

  • TranslatedAttributeValue.inherited becomes deprecated

  • Query.languageTree becomes deprecated

  • Query.languageList added

  • language field becomes nullable for(valid for global attributes only)

    • DateValueTranslationInput

    • FileValueTranslationInput

    • GalleryValueTranslationInput

    • ImageValueTranslationInput

    • MultiSelectValueTranslationInput

    • NumericValueTranslationInput

    • PriceValueTranslationInput

    • ProductRelationValueTranslationInput

    • SelectValueTranslationInput

    • TextareaValueTranslationInput

    • TextValueTranslationInput

    • UnitValueTranslationInput

2022-03-15

  • Attribute.hint becomes deprecated

  • Attribute.placeholder becomes deprecated

  • Mutation.attributeSetHint becomes deprecated

  • Mutation.attributeSetPlaceholder becomes deprecated

2022-01-31

  • Option.attribute becomes deprecated

2022-01-18

  • AttributeValue.valueTranslations added

  • AttributeValue.value becomes deprecated

2022-01-04

  • Mutation schema has been added to the API. For a full list of mutations available use an introspection

    • every existing API key has preserved its read access but did not receive write access. In order to obtain write access create a new key with it

code

The code of a searched Attribute.

after

Provides elements after the specified cursor.

first

Provides up to first n results. Value cannot be less than 0 and higher than 200. The default value is 50.

code

The code of a searched Attribute.

filters

Filters for the query.

after

Provides elements after the specified cursor.

first

Provides up to first n results. Value cannot be less than 0 and higher than 200. The default value is 50.

after

Provides elements after the specified cursor.

first

Provides up to first n results. Value cannot be less than 0 and higher than 200. The default value is 50.

code

The code of a searched Category.

after

Provides elements after the specified cursor.

first

Provides up to first n results. Value cannot be less than 0 and higher than 500. The default value is 50.

after

Provides elements after the specified cursor.

first

Provides up to first n results. Value cannot be less than 0 and higher than 200. The default value is 50.

after

Provides elements after the specified cursor.

first

Provides up to first n results. Value cannot be less than 0 and higher than 200. The default value is 50.

code

The code of a searched CategoryTree.

after

Provides elements after the specified cursor.

first

Provides up to first n results. Value cannot be less than 0 and higher than 200. The default value is 50.

after

Provides elements after the specified cursor.

first

Provides up to first n results. Value cannot be less than 0 and higher than 200. The default value is 50.

after

Provides elements after the specified cursor.

first

Provides up to first n results. Value cannot be less than 0 and higher than 1000. The default value is 50.

path

The path of a searched Multimedia.

path

The path of a searched MultimediaFolder.

after

Provides elements after the specified cursor.

first

Provides up to first n results. Value cannot be less than 0 and higher than 300. The default value is 50.

after

Provides elements after the specified cursor.

first

Provides up to first n results. Value cannot be less than 0 and higher than 200. The default value is 50.

sku

The sku of a searched Product.

attributeCode

The code of unique attribute Product is searched by.

value

The value of unique attribute Product is searched by.

after

Provides elements after the specified cursor.

first

Provides up to first n results. Value cannot be less than 0 and higher than 200. The default value is 50.

after

Provides elements after the specified cursor.

first

Provides up to first n results. Value cannot be less than 0 and higher than 200. The default value is 50.

variantSku

The Sku of variant to find a parent VariableProduct.

code

The code of a searched Section.

after

Provides elements after the specified cursor.

first

Provides up to first n results. Value cannot be less than 0 and higher than 100. The default value is 50.

code

The code of a searched Template.

after

Provides elements after the specified cursor.

first

Provides up to first n results. Value cannot be less than 0 and higher than 100. The default value is 50.

Unions

Unions represent possible many types.

GroupedProductProduct

Represents a product grouped in GroupingProduct.

Types:

Mutations

Mutations allow modifing data on the server.

attributeAddMetadata

Adds Attribute metadata.

Input fields:

input

attributeCreateDate

Creates DateAttribute

Input fields:

input

attributeCreateFile

Creates FileAttribute

Input fields:

input

attributeCreateGallery

Creates GalleryAttribute

Input fields:

input

attributeCreateImage

Creates ImageAttribute

Input fields:

input

attributeCreateMultiSelect

Creates MultiSelectAttribute

Input fields:

input

attributeCreateNumeric

Creates NumericAttribute

Input fields:

input

attributeCreatePrice

Creates PriceAttribute

Input fields:

input

attributeCreateProductRelation

Creates ProductRelationAttribute

Input fields:

input

attributeCreateSelect

Creates SelectAttribute

Input fields:

input

attributeCreateTextarea

Creates TextareaAttribute

Input fields:

input

attributeCreateText

Creates TextAttribute

Input fields:

input

attributeCreateUnit

Creates UnitAttribute

Input fields:

input

attributeDateSetFormat

Sets a DateAttribute format.

Input fields:

input

attributeDelete

Deletes Attribute.

Input fields:

input

attributeDeleteMetadata

Deletes Attribute metadata.

Input fields:

input

attributeMultiSelectAddOption

Adds a MultiSelectAttribute option.

Input fields:

input

attributeMultiSelectDeleteOption

Deletes a MultiSelectAttribute option.

Input fields:

input

attributeMultiSelectSetOptionName

Sets a MultiSelectAttribute option name.

Input fields:

input

attributeMultiSelectSetOptions

Sets a MultiSelectAttribute options.

Input fields:

input

attributeOptionAddCustomFieldImage

Adds a custom field to OptionAttribute.

Input fields:

input

attributeOptionAddCustomFieldTextarea

Adds a custom field to OptionAttribute.

Input fields:

input

attributeOptionAddCustomFieldTextareaRTE

Adds a custom field to OptionAttribute.

Input fields:

input

attributeOptionAddCustomFieldText

Adds a custom field to OptionAttribute.

Input fields:

input

attributeOptionAddOptionCustomFieldValueTranslationsImage

Adds custom field value translations to an Option.

Input fields:

input

attributeOptionAddOptionCustomFieldValueTranslationsTextarea

Adds custom field value translations to an Option.

Input fields:

input

attributeOptionAddOptionCustomFieldValueTranslationsTextareaRTE

Adds custom field value translations to an Option.

Input fields:

input

attributeOptionAddOptionCustomFieldValueTranslationsText

Adds custom field value translations to an Option.

Input fields:

input

attributeOptionDeleteCustomField

Deletes custom field from an OptionAttribute.

Input fields:

input

attributeOptionDeleteOptionCustomFieldValueTranslations

Deletes custom field value translations from a Option.

Input fields:

input

attributePriceSetCurrency

Sets a PriceAttribute currency.

Input fields:

input

attributeSelectAddOption

Adds a SelectAttribute option.

Input fields:

input

attributeSelectDeleteOption

Deletes a SelectAttribute option.

Input fields:

input

attributeSelectSetOptionName

Sets a SelectAttribute option name.

Input fields:

input

attributeSelectSetOptions

Sets a SelectAttribute options.

Input fields:

input

attributeSetName

Sets Attribute name.

Input fields:

input

attributeTextareaSetRichEdit

Sets a TextareaAttribute richEdit.

Input fields:

input

attributeUnitSetUnit

Sets an UnitAttribute unit.

Input fields:

input

categoryAddAttributeValueTranslationsDate

Adds a DateAttribute value translations to a category.

Input fields:

input

categoryAddAttributeValueTranslationsFile

Adds a FileAttribute value translations to a category.

Input fields:

input

categoryAddAttributeValueTranslationsGallery

Adds a GalleryAttribute value translations to a category.

Input fields:

input

categoryAddAttributeValueTranslationsImage

Adds a ImageAttribute value translations to a category.

Input fields:

input

categoryAddAttributeValueTranslationsMultiSelect

Adds a MultiSelectAttribute value translations to a category.

Input fields:

input

categoryAddAttributeValueTranslationsNumeric

Adds a NumericAttribute value translations to a category.

Input fields:

input

categoryAddAttributeValueTranslationsPrice

Adds a PriceAttribute value translations to a category.

Input fields:

input

categoryAddAttributeValueTranslationsProductRelation

Adds a ProductRelationAttribute value translations to a category.

Input fields:

input

categoryAddAttributeValueTranslationsSelect

Adds a SelectAttribute value translations to a category.

Input fields:

input

categoryAddAttributeValueTranslationsTextarea

Adds a TextareaAttribute value translations to a category.

Input fields:

input

categoryAddAttributeValueTranslationsText

Adds a TextAttribute value translations to a category.

Input fields:

input

categoryAddAttributeValueTranslationsUnit

Adds a UnitAttribute value translations to a category.

Input fields:

input

categoryAttributeAddAttribute

Adds an Attribute as allowed to be used in Category.

Input fields:

input

categoryAttributeRemoveAttribute

Removes an Attribute as allowed to be used in Category.

Input fields:

input

categoryCreate

Creates a Category.

Input fields:

input

categoryDeleteAttributeValueTranslations

Deletes an attribute value translations from a Category.

Input fields:

input

categoryDelete

Deletes a Category.

Input fields:

input

categorySetName

Sets a Category name.

Input fields:

input

multimediaCreate

Creates a Multimedia.

Input fields:

input

multimediaDelete

Deletes a Multimedia.

Input fields:

input

multimediaFolderCreate

Creates a MultimediaFolder.

Input fields:

input

multimediaFolderDelete

Deletes a MultimediaFolder.

Input fields:

input

multimediaMove

Moves a Multimedia to MultimediaFolder. Multimedia.path identifier is changed as a result.

Input fields:

input

multimediaReplace

Replaces a Multimedia with given MultimediaPath. As a result new Multimedia is created, all relations to it are replaced with a new resource, and the existing one is deleted.

Input fields:

input

multimediaSetAlt

Sets a Multimedia alt.

Input fields:

input

multimediaSetName

Sets a Multimedia name.

Input fields:

input

multimediaSetTitle

Sets a Multimedia title.

Input fields:

input

productAddAttributeValueTranslationsDate

Adds a DateAttribute value translations to a product.

Input fields:

input

productAddAttributeValueTranslationsFile

Adds a FileAttribute value translations to a product.

Input fields:

input

productAddAttributeValueTranslationsGallery

Adds a GalleryAttribute value translations to a product.

Input fields:

input

productAddAttributeValueTranslationsImage

Adds a ImageAttribute value translations to a product.

Input fields:

input

productAddAttributeValueTranslationsMultiSelect

Adds a MultiSelectAttribute value translations to a product.

Input fields:

input

productAddAttributeValueTranslationsNumeric

Adds a NumericAttribute value translations to a product.

Input fields:

input

productAddAttributeValueTranslationsPrice

Adds a PriceAttribute value translations to a product.

Input fields:

input

productAddAttributeValueTranslationsProductRelation

Adds a ProductRelationAttribute value translations to a product.

Input fields:

input

productAddAttributeValueTranslationsSelect

Adds a SelectAttribute value translations to a product.

Input fields:

input

productAddAttributeValueTranslationsTextarea

Adds a TextareaAttribute value translations to a product.

Input fields:

input

productAddAttributeValueTranslationsText

Adds a TextAttribute value translations to a product.

Input fields:

input

productAddAttributeValueTranslationsUnit

Adds a UnitAttribute value translations to a product.

Input fields:

input

productAddCategories

Adds a product to categories.

Input fields:

input

productCreateGrouping

Creates a GroupingProduct.

Input fields:

input

productCreateSimple

Creates a SimpleProduct.

Input fields:

input

productCreateVariable

Creates a VariableProduct.

Input fields:

input

productDeleteAttributeValueTranslations

Deletes an attribute value translations from a Product.

Input fields:

input

productDelete

Deletes a product.

Input fields:

input

productGroupingAddChild

Adds a child product to a GroupingProduct.

Input fields:

input

productGroupingRemoveChild

Removes a child product from a GroupingProduct.

Input fields:

input

productGroupingSetChildQuantity

Set a child product quantity of a GroupingProduct.

Input fields:

input

productRemoveCategories

Removes a product from categories.

Input fields:

input

productSetStatus

Sets a product status.

Input fields:

input

productSetTemplate

Sets a product Template.

Input fields:

input

productVariableAddVariant

Adds a variant product to a VariableProduct.

Input fields:

input

productVariableRemoveVariant

Removes a variant product from a VariableProduct.

Input fields:

input

productVariableSetBindings

Sets binding attributes to VariableProduct.

Input fields:

input

Scalars

Scalars represent primitive values like Integer or String.

AttributeCode

Boolean

Represents true or false.

CategoryCode

CategoryTreeCode

Currency

Represents a currency code in ISO 4217 format. Example: PLN.

CustomFieldCode

DateFormat

Represents a date formatted in one of the: yyyy-MM-dd, yy-MM-dd, dd.MM.yy, dd.MM.yyyy, MM/dd/yy, MM/dd/yyyy, MMMM dd, yyyy, dd MMMM yyyy, dd MMM yyyy

DateTime

Represents an ISO 8601 date. Example: 2021-04-09T17:25:26+00:00

Float

Represents signed double-precision fractional values as specified by IEEE 754.

Int

Represents non-fractional signed whole numeric values.

Language

Represents a 5 chars LCID language code. Example: pl_PL.

MetadatumKey

MultimediaFolderName

MultimediaFolderPath

MultimediaName

MultimediaPath

OptionCode

SectionCode

Sku

StatusCode

String

Represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

TemplateCode

UnitName

Enums

Enums represent a predefined sets o values.

AttributeScope

Values:

LOCAL

Value translation is set individually in every language.

GLOBAL

Value translation is the same in every language.

TwoWayRelation

Values:

None

Do not modify related products.

New

Set backward relations to the modified product only in its newly related products. Already related products remain unmodified.

All

Set backward relations to the modified product in all its related products.

Basic query tutorial

Queries in GraphQL are created by opening curly brackets.

If we have more than one query, we need to name them and specify that this is the query, we do it as follows.

An example of a simple query that will return the value of "pageInfo" from the "productStream" branch, and from there provide the value of "endCursor". Additionally, from the "productStream" branch, it will return the value "totalCount". Think of it as a tree, a branch, and a leaf. To get information from a leaf, you must first reach it by going through all the steps one by one. Each subsequent indentation must be called using the next curly bracket. Until it's closed, we are constantly working within the same space.

For better understanding, I've stretched the code below to reflect these indents.

The query can also use arguments. The list of available parameters can be found in the API schema(documentation). Here, we will use the "first" argument.

Without using this argument, the system would return all the data it finds, here we want to limit ourselves to the first 2 results.

It is also possible, to refer to the same place with several arguments, in this example we wanted to get the first 2 results and the then results after something.

However, the above query will not work without a slight modification. If to a given object we refer more than once, we must use aliases. Below I used two aliases: "firstTwo" and "dataAfter". Remember to use a colon after the alias.

Remember that in this case, the "after" filter refers to the cursor, which in this case is "YXJyYXljb25uZWN0aW9uOjM0Mw==". In your case, it will be a completely different string.

Check available cursors with a query:

Note that in the query (the previous one, not the one about available cursors) we call the same "totalCount" data 2 times unnecessarily. We can simplify this by using fragments.

The following query will return us exactly the same data as the previous one.

Of course, if I'm querying only one thing, there's no point in throwing it into a fragment.

However, if there were more objects or the query was more complicated, fragments allow us to optimize it.

In GraphQL it is also possible to use variables, variables are usually passed on by programming languages, but for the sake of completeness, I will show you how to use them.

Before the first curly bracket, I open a round bracket and define ( with the $ sign ) a variable named x in it, then I make a colon and a space and define the type of the variable, in this example, it will be Int (Integer). I could be done here, but I still would like to define a default value, so I put an equals sign followed by "2".

Then in the place where the variable should be passed I simply call it bt $x:

Queries can also use directives. In other words, conditional statements.

I'm going to add a second variable to my query named condition and set its type to Boolean, with the default value true.

Then after pageInfo I placed @include(if: $condition) directive.

Since I have previously set the default value of the $condition variable to true, the condition will be met and the data will show up, but if I change it to false, the data will not.

List of products with attributes and they values in product stream

This is how you can get a list of products with ALL attribute types, if you do not need all of them, simply remove any fragment that is not needed

Input objects

Input objects represent a set of fields allowing describing mutation.

AttributeAddMetadataInput

Input fields:

AttributeCreateDateInput

Input fields:

AttributeCreateFileInput

Input fields:

AttributeCreateGalleryInput

Input fields:

AttributeCreateImageInput

Input fields:

AttributeCreateMultiSelectInput

Input fields:

AttributeCreateNumericInput

Input fields:

AttributeCreatePriceInput

Input fields:

AttributeCreateProductRelationInput

Input fields:

AttributeCreateSelectInput

Input fields:

AttributeCreateTextareaInput

Input fields:

AttributeCreateTextInput

Input fields:

AttributeCreateUnitInput

Input fields:

AttributeDateSetFormatInput

Input fields:

AttributeDeleteInput

Input fields:

AttributeDeleteMetadataInput

Input fields:

AttributeMultiSelectAddOptionInput

Input fields:

AttributeMultiSelectDeleteOptionInput

Input fields:

AttributeMultiSelectSetOptionNameInput

Input fields:

AttributeMultiSelectSetOptionsInput

Input fields:

AttributeOptionAddCustomFieldImageInput

Input fields:

AttributeOptionAddCustomFieldTextareaInput

Input fields:

AttributeOptionAddCustomFieldTextareaRTEInput

Input fields:

AttributeOptionAddCustomFieldTextInput

Input fields:

AttributeOptionAddOptionCustomFieldValueTranslationsImageInput

Input fields:

AttributeOptionAddOptionCustomFieldValueTranslationsTextareaInput

Input fields:

AttributeOptionAddOptionCustomFieldValueTranslationsTextareaRTEInput

Input fields:

AttributeOptionAddOptionCustomFieldValueTranslationsTextInput

Input fields:

AttributeOptionDeleteCustomFieldInput

Input fields:

AttributeOptionDeleteOptionCustomFieldValueTranslationsInput

Input fields:

AttributeOptionListFilterInput

Input fields:

AttributePriceSetCurrencyInput

Input fields:

AttributeSelectAddOptionInput

Input fields:

AttributeSelectDeleteOptionInput

Input fields:

AttributeSelectSetOptionNameInput

Input fields:

AttributeSelectSetOptionsInput

Input fields:

AttributeSetNameInput

Input fields:

AttributeTextareaSetRichEditInput

Input fields:

AttributeUnitSetUnitInput

Input fields:

CategoryAddAttributeValueTranslationsDateInput

Input fields:

CategoryAddAttributeValueTranslationsFileInput

Input fields:

CategoryAddAttributeValueTranslationsGalleryInput

Input fields:

CategoryAddAttributeValueTranslationsImageInput

Input fields:

CategoryAddAttributeValueTranslationsMultiSelectInput

Input fields:

CategoryAddAttributeValueTranslationsNumericInput

Input fields:

CategoryAddAttributeValueTranslationsPriceInput

Input fields:

CategoryAddAttributeValueTranslationsProductRelationInput

Input fields:

CategoryAddAttributeValueTranslationsSelectInput

Input fields:

CategoryAddAttributeValueTranslationsTextareaInput

Input fields:

CategoryAddAttributeValueTranslationsTextInput

Input fields:

CategoryAddAttributeValueTranslationsUnitInput

Input fields:

CategoryAttributeAddAttributeInput

Input fields:

CategoryAttributeRemoveAttributeInput

Input fields:

CategoryCreateInput

Input fields:

CategoryDeleteAttributeValueTranslationsInput

Input fields:

CategoryDeleteInput

Input fields:

CategorySetNameInput

Input fields:

DateValueTranslationInput

Input fields:

FileValueTranslationInput

Input fields:

GalleryValueTranslationInput

Input fields:

ImageCustomFieldValueTranslationInput

Input fields:

ImageValueTranslationInput

Input fields:

MetadatumInput

Input fields:

MultimediaCreateInput

Input fields:

MultimediaDeleteInput

Input fields:

MultimediaFolderCreateInput

Input fields:

MultimediaFolderDeleteInput

Input fields:

MultimediaMoveInput

Input fields:

MultimediaReplaceInput

Input fields:

MultimediaSetAltInput

Input fields:

MultimediaSetNameInput

Input fields:

MultimediaSetTitleInput

Input fields:

MultiSelectValueTranslationInput

Input fields:

NumericValueTranslationInput

Input fields:

OptionInput

Input fields:

PriceValueTranslationInput

Input fields:

ProductAddAttributeValueTranslationsDateInput

Input fields:

ProductAddAttributeValueTranslationsFileInput

Input fields:

ProductAddAttributeValueTranslationsGalleryInput

Input fields:

ProductAddAttributeValueTranslationsImageInput

Input fields:

ProductAddAttributeValueTranslationsMultiSelectInput

Input fields:

ProductAddAttributeValueTranslationsNumericInput

Input fields:

ProductAddAttributeValueTranslationsPriceInput

Input fields:

ProductAddAttributeValueTranslationsProductRelationInput

Input fields:

ProductAddAttributeValueTranslationsSelectInput

Input fields:

ProductAddAttributeValueTranslationsTextareaInput

Input fields:

ProductAddAttributeValueTranslationsTextInput

Input fields:

ProductAddAttributeValueTranslationsUnitInput

Input fields:

ProductAddCategoriesInput

Input fields:

ProductCreateGroupingInput

Input fields:

ProductCreateSimpleInput

Input fields:

ProductCreateVariableInput

Input fields:

ProductDeleteAttributeValueTranslationsInput

Input fields:

ProductDeleteInput

Input fields:

ProductGroupingAddChildInput

Input fields:

ProductGroupingRemoveChildInput

Input fields:

ProductGroupingSetChildQuantityInput

Input fields:

ProductRelationValueTranslationInput

Input fields:

ProductRemoveCategoriesInput

Input fields:

ProductSetStatusInput

Input fields:

ProductSetTemplateInput

Input fields:

ProductVariableAddVariantInput

Input fields:

ProductVariableRemoveVariantInput

Input fields:

ProductVariableSetBindingsInput

Input fields:

SelectValueTranslationInput

Input fields:

TextareaCustomFieldValueTranslationInput

Input fields:

TextareaRTECustomFieldValueTranslationInput

Input fields:

TextareaValueTranslationInput

Input fields:

TextCustomFieldValueTranslationInput

Input fields:

TextValueTranslationInput

Input fields:

TranslatedStringFilterInput

Input fields:

TranslatedStringInput

Input fields:

UnitValueTranslationInput

Input fields:

Objects

Objects represent the resources you can access.

AttributeAddMetadataPayload

A payload for a mutation.

Fields:

AttributeConnection

Fields:

AttributeEdge

An edge in a connection.

Fields:

AttributeCreateDatePayload

A payload for a mutation.

Fields:

AttributeCreateFilePayload

A payload for a mutation.

Fields:

AttributeCreateGalleryPayload

A payload for a mutation.

Fields:

AttributeCreateImagePayload

A payload for a mutation.

Fields:

AttributeCreateMultiSelectPayload

A payload for a mutation.

Fields:

AttributeCreateNumericPayload

A payload for a mutation.

Fields:

AttributeCreatePricePayload

A payload for a mutation.

Fields:

AttributeCreateProductRelationPayload

A payload for a mutation.

Fields:

AttributeCreateSelectPayload

A payload for a mutation.

Fields:

AttributeCreateTextareaPayload

A payload for a mutation.

Fields:

AttributeCreateTextPayload

A payload for a mutation.

Fields:

AttributeCreateUnitPayload

A payload for a mutation.

Fields:

AttributeDateSetFormatPayload

A payload for a mutation.

Fields:

AttributeDeleteMetadataPayload

A payload for a mutation.

Fields:

AttributeDeletePayload

A payload for a mutation.

Fields:

AttributeDeletedConnection

Fields:

AttributeDeletedEdge

An edge in a connection.

Fields:

AttributeMultiSelectAddOptionPayload

A payload for a mutation.

Fields:

AttributeMultiSelectDeleteOptionPayload

A payload for a mutation.

Fields:

AttributeMultiSelectSetOptionNamePayload

A payload for a mutation.

Fields:

AttributeMultiSelectSetOptionsPayload

A payload for a mutation.

Fields:

AttributeOptionAddCustomFieldImagePayload

A payload for a mutation.

Fields:

AttributeOptionAddCustomFieldTextareaPayload

A payload for a mutation.

Fields:

AttributeOptionAddCustomFieldTextareaRTEPayload

A payload for a mutation.

Fields:

AttributeOptionAddCustomFieldTextPayload

A payload for a mutation.

Fields:

AttributeOptionAddOptionCustomFieldValueTranslationsImagePayload

A payload for a mutation.

Fields:

AttributeOptionAddOptionCustomFieldValueTranslationsTextareaPayload

A payload for a mutation.

Fields:

AttributeOptionAddOptionCustomFieldValueTranslationsTextareaRTEPayload

A payload for a mutation.

Fields:

AttributeOptionAddOptionCustomFieldValueTranslationsTextPayload

A payload for a mutation.

Fields:

AttributeOptionDeleteCustomFieldPayload

A payload for a mutation.

Fields:

AttributeOptionDeleteOptionCustomFieldValueTranslationsPayload

A payload for a mutation.

Fields:

AttributePriceSetCurrencyPayload

A payload for a mutation.

Fields:

AttributeSelectAddOptionPayload

A payload for a mutation.

Fields:

AttributeSelectDeleteOptionPayload

A payload for a mutation.

Fields:

AttributeSelectSetOptionNamePayload

A payload for a mutation.

Fields:

AttributeSelectSetOptionsPayload

A payload for a mutation.

Fields:

AttributeSetNamePayload

A payload for a mutation.

Fields:

AttributeTextareaSetRichEditPayload

A payload for a mutation.

Fields:

AttributeUnitSetUnitPayload

A payload for a mutation.

Fields:

AttributeValueConnection

Fields:

AttributeValueEdge

An edge in a connection.

Fields:

Category

Represents a category.

Fields:

CategoryAddAttributeValueTranslationsDatePayload

A payload for a mutation.

Fields:

CategoryAddAttributeValueTranslationsFilePayload

A payload for a mutation.

Fields:

CategoryAddAttributeValueTranslationsGalleryPayload

A payload for a mutation.

Fields:

CategoryAddAttributeValueTranslationsImagePayload

A payload for a mutation.

Fields:

CategoryAddAttributeValueTranslationsMultiSelectPayload

A payload for a mutation.

Fields:

CategoryAddAttributeValueTranslationsNumericPayload

A payload for a mutation.

Fields:

CategoryAddAttributeValueTranslationsPricePayload

A payload for a mutation.

Fields:

CategoryAddAttributeValueTranslationsProductRelationPayload

A payload for a mutation.

Fields:

CategoryAddAttributeValueTranslationsSelectPayload

A payload for a mutation.

Fields:

CategoryAddAttributeValueTranslationsTextareaPayload

A payload for a mutation.

Fields:

CategoryAddAttributeValueTranslationsTextPayload

A payload for a mutation.

Fields:

CategoryAddAttributeValueTranslationsUnitPayload

A payload for a mutation.

Fields:

CategoryAttributeAddAttributePayload

A payload for a mutation.

Fields:

CategoryAttributeRemoveAttributePayload

A payload for a mutation.

Fields:

CategoryConnection

Fields:

CategoryEdge

An edge in a connection.

Fields:

CategoryCreatePayload

A payload for a mutation.

Fields:

CategoryDeleteAttributeValueTranslationsPayload

A payload for a mutation.

Fields:

CategoryDeletePayload

A payload for a mutation.

Fields:

CategoryDeletedConnection

Fields:

CategoryDeletedEdge

An edge in a connection.

Fields:

CategorySetNamePayload

A payload for a mutation.

Fields:

CategoryTree

Represent a tree of categories.

Fields:

CategoryTreeConnection

Fields:

CategoryTreeDeletedConnection

Fields:

CategoryTreeDeletedEdge

An edge in a connection.

Fields:

CategoryTreeEdge

An edge in a connection.

Fields:

CategoryTreeLeaf

Represents a leaf (node) of a category tree.

Fields:

CategoryTreeLeafConnection

Fields:

CategoryTreeLeafEdge

An edge in a connection.

Fields:

DateAttribute

Represents a date.

Implements:

Fields:

DateAttributeValue

An attribute value.

Implements:

Fields:

DateAttributeValueTranslation

Translation of an attribute value.

Implements:

Fields:

FileAttribute

Represents a collection of multimedia files of any type.

Implements:

FileAttributeValue

An attribute value.

Implements:

Fields:

FileAttributeValueTranslation

Translation of an attribute value.

Implements:

Fields:

GalleryAttribute

Represents a collection of images.

Implements:

GalleryAttributeValue

An attribute value.

Implements:

Fields:

GalleryAttributeValueTranslation

Translation of an attribute value.

Implements:

Fields:

GroupedProduct

Fields:

GroupedProductConnection

Fields:

GroupedProductEdge

An edge in a connection.

Fields:

GroupingProduct

A product grouping other products. Can represent products like the ones with common features or promotional packages.

Implements:

Fields:

ImageAttribute

Represents an image.

Implements:

ImageAttributeValue

An attribute value.

Implements:

Fields:

ImageAttributeValueTranslation

Translation of an attribute value.

Implements:

Fields:

ImageCustomField

Represents an image.

Implements:

ImageCustomFieldTranslatedValue

Represents an image translated value.

Implements:

Fields:

ImageCustomFieldValue

A custom field value.

Implements:

Fields:

ImageCustomFieldValueTranslation

Translation of a custom field value.

Implements:

Fields:

LanguageConnection

Fields:

LanguageEdge

An edge in a connection.

Fields:

Metadatum

Represents a metadatum of an attribute.

Fields:

Multimedia

Represents a multimedia file. The multimedia can be a text file, image, document file, etc.

Fields:

MultimediaConnection

Fields:

MultimediaCreatePayload

A payload for a mutation.

Fields:

MultimediaDeletePayload

A payload for a mutation.

Fields:

MultimediaEdge

An edge in a connection.

Fields:

MultimediaFolder

Represents a filesystem-like folder allowing to organize multimedia. Does not correspond to the physical file path or its URL.

Fields:

MultimediaFolderConnection

Fields:

MultimediaFolderCreatePayload

A payload for a mutation.

Fields:

MultimediaFolderDeletePayload

A payload for a mutation.

Fields:

MultimediaFolderEdge

An edge in a connection.

Fields:

MultimediaMovePayload

A payload for a mutation.

Fields:

MultimediaReplacePayload

A payload for a mutation.

Fields:

MultimediaSetAltPayload

A payload for a mutation.

Fields:

MultimediaSetFolderPayload

A payload for a mutation.

Fields:

MultimediaSetNamePayload

A payload for a mutation.

Fields:

MultimediaSetTitlePayload

A payload for a mutation.

Fields:

MultiSelectAttribute

Represents a set of options allowing multiple choices.

Implements:

MultiSelectAttributeValue

An attribute value.

Implements:

Fields:

MultiSelectAttributeValueTranslation

Translation of an attribute value.

Implements:

Fields:

NumericAttribute

Represents a number.

Implements:

NumberAttributeValue

An attribute value.

Implements:

Fields:

NumericAttributeValueTranslation

Translation of an attribute value.

Implements:

Fields:

Option

Represents an option of a select and multi-select attribute.

Fields:

OptionConnection

Fields:

OptionEdge

An edge in a connection.

Fields:

Represents an option of a select and multi-select attribute.

Fields:

OptionTranslatedValue

Simple representation of an Option of select and multi-select attributes with the name in a specific language only.

Fields:

PageInfo

Information about pagination in a connection.

Fields:

PriceAttribute

Represents a positive price of a specific currency.

Implements:

Fields:

PriceAttributeValue

An attribute value.

Implements:

Fields:

PriceAttributeValueTranslation

Translation of an attribute value.

Implements:

Fields:

ProductAddAttributeValueTranslationsDatePayload

A payload for a mutation.

Fields:

ProductAddAttributeValueTranslationsFilePayload

A payload for a mutation.

Fields:

ProductAddAttributeValueTranslationsGalleryPayload

A payload for a mutation.

Fields:

ProductAddAttributeValueTranslationsImagePayload

A payload for a mutation.

Fields:

ProductAddAttributeValueTranslationsMultiSelectPayload

A payload for a mutation.

Fields:

ProductAddAttributeValueTranslationsNumericPayload

A payload for a mutation.

Fields:

ProductAddAttributeValueTranslationsPricePayload

A payload for a mutation.

Fields:

ProductAddAttributeValueTranslationsProductRelationPayload

A payload for a mutation.

Fields:

ProductAddAttributeValueTranslationsSelectPayload

A payload for a mutation.

Fields:

ProductAddAttributeValueTranslationsTextareaPayload

A payload for a mutation.

Fields:

ProductAddAttributeValueTranslationsTextPayload

A payload for a mutation.

Fields:

ProductAddAttributeValueTranslationsUnitPayload

A payload for a mutation.

Fields:

ProductAddCategoriesPayload

A payload for a mutation.

Fields:

ProductConnection

Fields:

ProductCreateGroupingPayload

A payload for a mutation.

Fields:

ProductCreateSimplePayload

A payload for a mutation.

Fields:

ProductCreateVariablePayload

A payload for a mutation.

Fields:

ProductDeletedConnection

Fields:

ProductDeleteAttributeValueTranslationsPayload

A payload for a mutation.

Fields:

ProductDeletedEdge

An edge in a connection.

Fields:

ProductDeletePayload

A payload for a mutation.

Fields:

ProductEdge

An edge in a connection.

Fields:

ProductGroupingAddChildPayload

A payload for a mutation.

Fields:

ProductGroupingRemoveChildPayload

A payload for a mutation.

Fields:

ProductGroupingSetChildQuantityPayload

A payload for a mutation.

Fields:

ProductRelationAttribute

Represents a relation to the collection of products.

Implements:

ProductRelationAttributeValue

An attribute value.

Implements:

Fields:

ProductRelationAttributeValueTranslation

Translation of an attribute value.

Implements:

Fields:

ProductRemoveCategoriesPayload

A payload for a mutation.

Fields:

ProductSetStatusPayload

A payload for a mutation.

Fields:

ProductSetTemplatePayload

A payload for a mutation.

Fields:

ProductStatus

A product status.

Fields:

ProductStatusTranslation

A product status translation.

Fields:

ProductVariableAddVariantPayload

A payload for a mutation.

Fields:

ProductVariableRemoveVariantPayload

A payload for a mutation.

Fields:

ProductVariableSetBindingsPayload

A payload for a mutation.

Fields:

Section

Represents a set of common attributes - technical data, SEO-related parameters, etc.

Fields:

SectionConnection

Fields:

SectionEdge

An edge in a connection.

Fields:

SelectAttribute

Represents a set of options allowing single choice.

Implements:

SelectAttributeValue

An attribute value.

Implements:

Fields:

SelectAttributeValueTranslation

Translation of an attribute value.

Implements:

Fields:

SimpleProduct

A simple product.

Implements:

Template

Represents a set of attributes specific to a market segment.

Fields:

TemplateConnection

Fields:

TemplateEdge

An edge in a connection.

Fields:

TextareaAttribute

Represents a text.

Implements:

Fields:

TextareaAttributeValue

An attribute value.

Implements:

Fields:

TextareaAttributeValueTranslation

Translation of an attribute value.

Implements:

Fields:

TextareaCustomField

Represents a text.

Implements:

TextareaCustomFieldTranslatedValue

Represents a text translated value.

Implements:

Fields:

TextareaCustomFieldValue

A custom field value.

Implements:

Fields:

TextareaCustomFieldValueTranslation

Translation of a custom field value.

Implements:

Fields:

TextareaRTECustomField

Represents a text with RTE enabled.

Implements:

TextareaRTECustomFieldTranslatedValue

Represents a text with RTE translated value.

Implements:

Fields:

TextareaRTECustomFieldValue

A custom field value.

Implements:

Fields:

TextareaRTECustomFieldValueTranslation

Translation of a custom field value.

Implements:

Fields:

TextAttribute

Represents a short text of up to 255 chars.

Implements:

TextAttributeValue

An attribute value.

Implements:

Fields:

TextAttributeValueTranslation

Translation of an attribute value.

Implements:

Fields:

TextCustomField

Represents a short text of up to 255 chars.

Implements:

TextCustomFieldTranslatedValue

Represents a text translated value.

Implements:

Fields:

TextCustomFieldValue

A custom field value.

Implements:

Fields:

TextCustomFieldValueTranslation

Translation of a custom field value.

Implements:

Fields:

TranslatedString

Represents a translated value.

Fields:

Unit

Represents a unit. Can be used to define specific scalar types like a Meter.

Fields:

UnitAttribute

Represents a numeric scalar unit.

Implements:

Fields:

UnitAttributeValue

An attribute value.

Implements:

Fields:

UnitAttributeValueTranslation

Translation of an attribute value.

Implements:

Fields:

VariableProduct

A product representing multiple variants i.e. products of different sizes or colors.

Fields:

Authentication

GraphQL API requires to be authenticated in order to process requests.

In order to obtain access to API resources, an API key is required to be sent along with the appropriate GraphQL query as an HTTP header - X-API-KEY.

Keys can be created in Ergonode System Settings in the API keys tab.

Mutations

By default, the API key grants you access to queries, meaning you can only read data. If mutations(write) access is required you need to specify write access on key creation.

Limiting products catalog with segments

A regular API key provides you with access to the entire product catalog. It is also possible to limit that by assigning a segment while creating the key. If assigned the consumer will only have access to the products available in the specific segment. This also means that, if write access is granted, you'll be able only to modify the data of products available within the segment.

The only exception from that is when the product is created in batch request with further mutations - though possibly not yet part of the segment since you are the creator of it you can modify its data within this request.

API keys, due to security reasons, cannot be changed. If you require a different key just generate a new one in Ergonode settings.

Segment recalculation is an asynchronous process, therefore, sending mutations in separate requests(create and then update) can fail on update - access can not yet be granted.

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

!

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Represents a lowercased, alphanumerical, and _ textual identifier of 1-128 chars in length. It cannot be id or start with esa_.

Represents a lowercased, alphanumerical, and _ textual identifier of 1-128 chars in length.

Represents a textual identifier of 1-128 chars in length.

Represents a lowercased, alphanumerical, and _ textual identifier in a single context of 1-128 chars in length.

Represents an alphanumeric and _ key of 1-128 chars in length.

Represents an alphanumeric, \, - and _ textual name of 1-255 chars in length.

Represents a textual combination of scalars joined with / identifier pointing to its exact location.

Represents a not containing / textual name of 1-128 chars in length.

Represents a textual combination of , and joined with / identifier pointing to its exact location.

Represents a textual identifier in a single context of 1-128 chars in length.

Represents a textual identifier of 3-32 chars in length.

Represents a textual identifier of 1-255 chars in length.

Represents a textual identifier of 1-128 chars in length.

Represents a textual identifier of 3-32 chars in length.

Represents a textual name of 1-255 chars in length.

Represents the behavior of language translation of values.

Represents the behavior of language translation of values.

Determines the behavior of value.

The connection for

The connection for

The connection for

The connection for

The connection for

The connection for

The connection for

The connection for

Represents a product grouped in with a specific quantity for the set.

The connection for

The connection for

The connection for

The connection for

The connection for

The connection for

The connection for

The connection for

The connection for

The best approach for keys assigned to the segment is to create and update the product in .

AttributeCode!
String
Int
AttributeCode!
String
Int
String
Int
CategoryCode!
String
Int
String
Int
String
Int
CategoryTreeCode!
String
Int
String
Int
String
Int
MultimediaPath!
MultimediaFolderPath!
String
Int
String
Int
Sku!
AttributeCode!
String!
String
Int
String
Int
Sku!
SectionCode!
String
Int
TemplateCode!
String
Int
Attribute
CustomField
OptionAttribute
Product
Attribute
Attribute
{

}
query queryName {

}
query queryName {
                productStream {
                                pageInfo {
                                                endCursor
                                }
                                totalCount
                }
}
query queryName {
  productStream (first: 2) {
    pageInfo {
      endCursor
    }
    totalCount
  }
}
query queryName {
  productStream(first: 2) {
    pageInfo {
      endCursor
    }
    totalCount
  }
  productStream(after: "YXJyYXljb25uZWN0aW9uOjM0Mw==") {
    pageInfo {
      endCursor
    }
    totalCount
  }
}
query queryName {
  firstTwo: productStream(first: 2) {
    pageInfo {
      endCursor
    }
    totalCount
  }
  dataAfter: productStream(after: "YXJyYXljb25uZWN0aW9uOjM0Mw==") {
    pageInfo {
      endCursor
    }
    totalCount
  }
}
query x {
  productStream {
    pageInfo {
      endCursor
    }
  }
}
query queryName {
  firstTwo: productStream(first: 2) {
    pageInfo {
      endCursor
    }
    ...fragmentName
  }
  dataAfter: productStream(after: "YXJyYXljb25uZWN0aW9uOjM0Mw==") {
    pageInfo {
      endCursor
    }
    ...fragmentName
  }
}

fragment fragmentName on ProductConnection {
  totalCount
}
query queryName ($x: Int = 2) {
  firstTwo: productStream(first: $x) {
    pageInfo {
      endCursor
    }
    ...fragmentName
  }
  dataAfter: productStream(after: "YXJyYXljb25uZWN0aW9uOjM0Mw==") {
    pageInfo {
      endCursor
    }
    ...fragmentName
  }
}

fragment fragmentName on ProductConnection {
  totalCount
}
query queryName ($x: Int = 2, $condition: Boolean = true) {
  firstTwo: productStream(first: $x) {
    pageInfo @include(if: $condition) {
      endCursor
    }
    ...fragmentName
  }
  dataAfter: productStream(after: "YXJyYXljb25uZWN0aW9uOjM0Mw==") {
    pageInfo {
      endCursor
    }
    ...fragmentName
  }
}

fragment fragmentName on ProductConnection {
  totalCount
}
query queryName ($x: Int = 2, $condition: Boolean = true) {
  firstTwo: productStream(first: $x) {
    pageInfo @include(if: $condition) {
      endCursor
    }
    ...fragmentName
  }
  dataAfter: productStream(after: "YXJyYXljb25uZWN0aW9uOjM0Mw==") {
    pageInfo {
      endCursor
    }
    ...fragmentName
  }
}

fragment fragmentName on ProductConnection {
  totalCount
}
query {
	productStream {
		pageInfo {
			hasNextPage
			endCursor
		}
		edges {
			node {
				sku
				attributeList {
					edges {
						node {
							...AttributeValue
						}
					}
				}
			}
		}
	}
}

fragment AttributeValue on AttributeValue {
	__typename
	attribute {
		code
		name {
			language
			value
		}
	}
	... on TextAttributeValue {
		textAttributeValueTranslations: translations {
			value
			language
		}
	}
	... on TextareaAttributeValue {
		textareaAttributeValueTranslations: translations {
			value
			language
		}
	}
	... on DateAttributeValue {
		dateAttributeValueTranslations: translations {
			value
			language
		}
	}
	... on UnitAttributeValue {
		unitAttribute: attribute {
			# unit might be useful in the value context
			unit {
				name
				symbol
			}
		}
		unitAttributeValueTranslations: translations {
			value
			language
		}
	}
	... on PriceAttributeValue {
		priceAttribute: attribute {
			# currency might be useful in the price context
			currency
		}
		priceAttributeValueTranslations: translations {
			value
			language
		}
	}
	... on NumberAttributeValue {
		numericAttributeValueTranslations: translations {
			value
			language
		}
	}
	... on ProductRelationAttributeValue {
		productRelationAttributeValueTranslations: translations {
			value {
				sku
			}
			language
		}
	}
	... on FileAttributeValue {
		fileAttributeValueTranslations: translations {
			value {
				...Multimedia
			}
			language
		}
	}
	... on GalleryAttributeValue {
		galleryAttributeValueTranslations: translations {
			value {
				...Multimedia
			}
			language
		}
	}
	... on ImageAttributeValue {
		imageAttributeValueTranslations: translations {
			value {
				...Multimedia
			}
			language
		}
	}
	... on MultiSelectAttributeValue {
		multiSelectAttributeValueTranslations: translations {
			translatedValue {
				...OptionTranslatedValue
			}
			language
		}
	}
	... on SelectAttributeValue {
		selectAttributeValueTranslations: translations {
			translatedValue {
				...OptionTranslatedValue
			}
			language
		}
	}
}
fragment Multimedia on Multimedia {
	path
	name
	extension
	mime
	size
	alt {
		value
		language
	}
	title {
		value
		language
	}
	url
}
fragment OptionTranslatedValue on OptionTranslatedValue {
	code
	name
	customFields {
		... on ImageCustomFieldTranslatedValue {
			customField {
				code
			}
			image: value {
				path
				name
				extension
				mime
				size
				alt {
					language
					value
				}
				title {
					language
					value
				}
				url
				folder {
					name
					path
				}
			}
		}
		... on TextCustomFieldTranslatedValue {
			customField {
				code
			}
			value
		}
		... on TextareaCustomFieldTranslatedValue {
			customField {
				code
			}
			value
		}
		... on TextareaRTECustomFieldTranslatedValue {
			customField {
				code
			}
			value
		}
	}
}
AttributeOptionListFilterInput
AttributeMultiSelectDeleteOptionPayload
DateAttribute
FileAttribute
GalleryAttribute
ImageAttribute
MultiSelectAttribute
NumericAttribute
PriceAttribute
ProductRelationAttribute
SelectAttribute
TextareaAttribute
TextAttribute
UnitAttribute
DateAttributeValue
FileAttributeValue
GalleryAttributeValue
ImageAttributeValue
MultiSelectAttributeValue
NumericAttributeValue
PriceAttributeValue
ProductRelationAttributeValue
SelectAttributeValue
TextareaAttributeValue
TextAttributeValue
UnitAttributeValue
DateAttributeValueTranslation
FileAttributeValueTranslation
GalleryAttributeValueTranslation
ImageAttributeValueTranslation
MultiSelectAttributeValueTranslation
NumericAttributeValueTranslation
PriceAttributeValueTranslation
ProductRelationAttributeValueTranslation
SelectAttributeValueTranslation
TextareaAttributeValueTranslation
TextAttributeValueTranslation
UnitAttributeValueTranslation
ImageCustomField
TextareaCustomField
TextareaRTECustomField
TextCustomField
ImageCustomFieldTranslatedValue
TextareaCustomFieldTranslatedValue
TextareaRTECustomFieldTranslatedValue
TextCustomFieldTranslatedValue
ImageCustomFieldValue
TextareaCustomFieldValue
TextareaRTECustomFieldValue
TextCustomFieldValue
ImageCustomFieldValueTranslation
TextareaCustomFieldValueTranslation
TextareaRTECustomFieldValueTranslation
TextCustomFieldValueTranslation
MultiSelectAttribute
SelectAttribute
GroupingProduct
SimpleProduct
VariableProduct
[TranslatedString!]!
[Metadatum!]!
CategoryConnection!
Template!
AttributeValueConnection!
[ProductStatusTranslation!]!
AttributeDeletedConnection
OptionConnection
AttributeConnection
Category
AttributeConnection
CategoryDeletedConnection
CategoryConnection
CategoryTree
CategoryTreeDeletedConnection
CategoryTreeConnection
LanguageConnection
Multimedia
MultimediaFolder
MultimediaFolderConnection
MultimediaConnection
ProductDeletedConnection
ProductConnection
VariableProduct
Section
SectionConnection
Template
TemplateConnection
SimpleProduct
VariableProduct
AttributeAddMetadataPayload
AttributeCreateDatePayload
AttributeCreateFilePayload
AttributeCreateGalleryPayload
AttributeCreateImagePayload
AttributeCreateMultiSelectPayload
AttributeCreateNumericPayload
AttributeCreatePricePayload
AttributeCreateProductRelationPayload
AttributeCreateSelectPayload
AttributeCreateTextareaPayload
AttributeCreateTextPayload
AttributeCreateUnitPayload
AttributeDateSetFormatPayload
AttributeDeletePayload
AttributeDeleteMetadataPayload
AttributeMultiSelectAddOptionPayload
AttributeMultiSelectSetOptionNamePayload
AttributeMultiSelectSetOptionsPayload
AttributeOptionAddCustomFieldImagePayload
AttributeOptionAddCustomFieldTextareaPayload
AttributeOptionAddCustomFieldTextareaRTEPayload
AttributeOptionAddCustomFieldTextPayload
AttributeOptionAddOptionCustomFieldValueTranslationsImagePayload
AttributeOptionAddOptionCustomFieldValueTranslationsTextareaPayload
AttributeOptionAddOptionCustomFieldValueTranslationsTextareaRTEPayload
AttributeOptionAddOptionCustomFieldValueTranslationsTextPayload
AttributeOptionDeleteCustomFieldPayload
AttributeOptionDeleteOptionCustomFieldValueTranslationsPayload
AttributePriceSetCurrencyPayload
AttributeSelectAddOptionPayload
AttributeSelectDeleteOptionPayload
AttributeSelectSetOptionNamePayload
AttributeSelectSetOptionsPayload
AttributeSetNamePayload
AttributeTextareaSetRichEditPayload
AttributeUnitSetUnitPayload
CategoryAddAttributeValueTranslationsDatePayload
CategoryAddAttributeValueTranslationsFilePayload
CategoryAddAttributeValueTranslationsGalleryPayload
CategoryAddAttributeValueTranslationsImagePayload
CategoryAddAttributeValueTranslationsMultiSelectPayload
CategoryAddAttributeValueTranslationsNumericPayload
CategoryAddAttributeValueTranslationsPricePayload
CategoryAddAttributeValueTranslationsProductRelationPayload
CategoryAddAttributeValueTranslationsSelectPayload
CategoryAddAttributeValueTranslationsTextareaPayload
CategoryAddAttributeValueTranslationsTextPayload
CategoryAddAttributeValueTranslationsUnitPayload
CategoryAttributeAddAttributePayload
CategoryAttributeRemoveAttributePayload
CategoryCreatePayload
CategoryDeleteAttributeValueTranslationsPayload
CategoryDeletePayload
CategorySetNamePayload
MultimediaCreatePayload
MultimediaDeletePayload
MultimediaFolderCreatePayload
MultimediaFolderDeletePayload
MultimediaMovePayload
MultimediaReplacePayload
MultimediaSetAltPayload
MultimediaSetNamePayload
MultimediaSetTitlePayload
ProductAddAttributeValueTranslationsDatePayload
ProductAddAttributeValueTranslationsFilePayload
ProductAddAttributeValueTranslationsGalleryPayload
ProductAddAttributeValueTranslationsImagePayload
ProductAddAttributeValueTranslationsMultiSelectPayload
ProductAddAttributeValueTranslationsNumericPayload
ProductAddAttributeValueTranslationsPricePayload
ProductAddAttributeValueTranslationsProductRelationPayload
ProductAddAttributeValueTranslationsSelectPayload
ProductAddAttributeValueTranslationsTextareaPayload
ProductAddAttributeValueTranslationsTextPayload
ProductAddAttributeValueTranslationsUnitPayload
ProductAddCategoriesPayload
ProductCreateGroupingPayload
ProductCreateSimplePayload
ProductCreateVariablePayload
ProductDeleteAttributeValueTranslationsPayload
ProductDeletePayload
ProductGroupingAddChildPayload
ProductGroupingRemoveChildPayload
ProductGroupingSetChildQuantityPayload
ProductRemoveCategoriesPayload
ProductSetStatusPayload
ProductSetTemplatePayload
ProductVariableAddVariantPayload
ProductVariableRemoveVariantPayload
ProductVariableSetBindingsPayload
Category
CategoryTree
Metadatum
MultimediaFolder
MultimediaFolderName
MultimediaFolder
Multimedia
MultimediaFolderPath
MultimediaName
Multimedia
Attribute
Option
Section
ProductStatus
Template
Unit
ProductRelationAttribute
CategoryTreeCode
CategoryTreeLeaf

List of active languages

query {
  languageList {
    edges {
      node
    }
  }
}

Batching mutations

API mutations are designed to be very small and atomic on purpose - thanks to that design, you don't have to prefetch data to send it back to the server and worry only about the actual change you want to perform.

On the other hand, occasionally your intention is to create or change resources with data that a single mutation does not handle. GraphQL comes in handy here - thanks to its design you can batch mutations(and queries) which means that multiple operations can be performed in one, single request - this not only makes it easier to make updates but also speeds up operations.

mutation {
  create: productCreateSimple(input: {sku: "new_product", templateCode: "template"}) {
    __typename
  }
  assignDescription: productAddAttributeValueTranslationsTextarea(
    input: {
      sku: "new_product"
      attributeCode: "description"
      translations: [{ value: "Long description", language: "en_GB" }]
    }
  ) {
    __typename
  }
  assignShortDescription: productAddAttributeValueTranslationsTextarea(
    input: {
      sku: "new_product"
      attributeCode: "short_description"
      translations: [{ value: "Short description", language: "en_GB" }]
    }
  ) {
    __typename
  }
}

Batch mutations are executed synchronously which also means their order does matter. You need to create the product first in order to assign values to it.

All mutations in the batch are performed one after another and if one or more fails all the others will still be tried to execute. The batch result will contain requested data from each mutation as well as specific errors which occurred for those which failed.

Note that each mutation has an alias (create: (...)) - which means a custom name is assigned to it. Aliasing is required if there are at least two same mutations in one batch - productAddAttributeValueTranslationsTextarea in this case - this behavior allows differentiation of the data in the result which in another case would not be possible.

In the above example for simplicity, all mutations have been aliased in the example but it'd also suffice to only alias duplicates.

As tempting as it may sound to make one update of all data in the system bear in mind the fact of synchronicity of the batch process - it means that the process will last as long as there are some mutations left to be executed.

In practice, it means that too-long running processes are usually more faulty and also it's harder to handle potential errors. In most extreme cases, you can even reach timeout from your HTTP client or the server can drop the handling of the request as it takes too long to process.

A usually recommended approach would be to limit the batch to a single resource(product, attribute, multimedia) or with a similar intention in mind.

List of 100 grouped products with simple and variable products in stream

This will allow you to get list of first 100 product no matter if they're simple or variable.

By default query would return the first 50 products, so using "first" argument is necessary.

Please remember that limit for "first" is 200

query groupingProduct {
  productStream(first: 100) {
    ... ProductConnection
    edges {
      node {
        ... on GroupingProduct {
          ... Product
          childrenList {
            pageInfo {
              hasNextPage
              endCursor
            }
            edges {
              node {
                quantity
                product {
                  ... SimpleProduct
                  ... VariableProduct
                }
              }
            }
          }
        }
        template {
          code
        }
      }
    }
  }
}

fragment SimpleProduct on SimpleProduct {
  ... Product
  attributeList {
    ... AttributeValueConnection
  }
}

fragment VariableProduct on VariableProduct {
  ... Product
  attributeList {
    ... AttributeValueConnection
  }
  bindings {
    ... Attribute
    options {
      code
      name {
        value
        language
      }
    }
  }
  variantList {
    ... ProductConnection
  }
}

fragment AttributeValueConnection on AttributeValueConnection {
  pageInfo {
    hasNextPage
    endCursor
  }
  edges {
    node {
      attribute {
        ... Attribute
      }
      translations {
        language
      }
    }
  }
}

fragment Attribute on Attribute {
  code
  name {
    value
    language
  }
  scope
}

fragment Product on Product {
  __typename
  sku
  createdAt
  editedAt
}

fragment ProductConnection on ProductConnection {
  pageInfo {
    hasNextPage
    endCursor
  }
  edges {
    node {
      ... Product
    }
  }
}

Integrating data

Note: the following examples are based on the API Stream integration concept - if you are not yet familiar with it check an overview of the Query types to understand the approach.

A simple example of integrating categories into the system from scratch:

Fetch the first page of the Category stream

{
  categoryStream(first: 1) {
    pageInfo {
      endCursor
      hasNextPage
    }
    edges {
      node {
        code
        name {
          value
          language
        }
      }
      cursor
    }
  }
}

first parameter put on limit how many categories are fetched in one result

example response:

{
  "data": {
    "categoryStream": {
      "pageInfo": {
        "endCursor": "YXJyYXljb25uZWN0aW9uOjQ5",
        "hasNextPage": true
      },
      "edges": [
        {
          "node": {
            "code": "category_name_clothing",
            "name": [
              {
                "value": "Clothing",
                "language": "en_GB"
              },
              {
                "value": "Odzież",
                "language": "pl_PL"
              }
            ]
          },
          "cursor": "YXJyYXljb25uZWN0aW9uOjQ5"
        }
      ]
    }
  }
}

Fetch the next page of the Category stream

Since we received information that the next page exists data.categoryStream.pageInfo.hasNextPage=true we should request the next resource. The query is very similar to the previous one except we are passing the appropriate cursor with the request:

{
  categoryStream(first: 1, after: "YXJyYXljb25uZWN0aW9uOjQ5") {
    ...
}

after parameter represents the appropriate cursor that identifies a last-fetched resource. Available as either cursor field of the node or the endCursor of PageInfo object.

example response:

{
  "data": {
    "categoryStream": {
      "pageInfo": {
        "endCursor": "YXJyYXljb25uZWN0aW9uOjUw",
        "hasNextPage": false
      }
      ...
    }
  }
}

we do know that there is no next page, therefore, there is nothing to fetch at the very moment. We can retry the next request(for the retrieved cursor) with i.e., an increased interval not to waste resources.

A more complex example of integrating categories

Alternatively in some systems, we will want only to fetch the identifier of the resource using some sort of queueing system in order to distribute the consumption processes. In that case, we can just fetch our resource ID (code in the case of categories) and the PageInfo object:

{
  categoryStream(first: 1) {
    pageInfo {
      endCursor
      hasNextPage
    }
    edges {
      node {
        code
      }
    }
  }
}

and fetch it in the separate consuming process via a single resource query:

{
  category(code: "category_name_clothing") {
    name {
      value
      language
    }
    code
  }
}

The rest of the process looks the same for the paginating over the stream.

Though given above content provides an example of handling categories you can use the same approach for every other resource available via streams like products, multimedia, and attributes.

List of grouped products with simple and variable products AFTER some end cursor

This is how you can get data after some cursor via API.

This approach can be helpful if you do not use the "first" argument or records in a stream that exceeded 200.

Please take note that the cursor is a string, therefore needs to be put in quotes.

To understand what streams and cursors are, please refer to the "Query types" article in the "Overview" section on this page.

query groupingProduct {
  productStream(after: "YXJyYXljb25uZWN0aW9uOjM2MTE=") {
    ... ProductConnection
    edges {
      node {
        ... on GroupingProduct {
          ... Product
          childrenList {
            pageInfo {
              hasNextPage
              endCursor
            }
            edges {
              node {
                quantity
                product {
                  ... SimpleProduct
                  ... VariableProduct
                }
              }
            }
          }
        }
        template {
          code
        }
      }
    }
  }
}

fragment SimpleProduct on SimpleProduct {
  ... Product
  attributeList {
    ... AttributeValueConnection
  }
}

fragment VariableProduct on VariableProduct {
  ... Product
  attributeList {
    ... AttributeValueConnection
  }
  bindings {
    ... Attribute
    options {
      code
      name {
        value
        language
      }
    }
  }
  variantList {
    ... ProductConnection
  }
}

fragment AttributeValueConnection on AttributeValueConnection {
  pageInfo {
    hasNextPage
    endCursor
  }
  edges {
    node {
      attribute {
        ... Attribute
      }
      translations {
        language
      }
    }
  }
}

fragment Attribute on Attribute {
  code
  name {
    value
    language
  }
  scope
}

fragment Product on Product {
  __typename
  sku
  createdAt
  editedAt
}

fragment ProductConnection on ProductConnection {
  pageInfo {
    hasNextPage
    endCursor
  }
  edges {
    node {
      ... Product
    }
  }
}

It's also possible to use both "after" and "first" arguments in one query. Example below will return 100 records (if they exist), that are after endCursor in productStream.

query groupingProduct {
  productStream(after: "YXJyYXljb25uZWN0aW9uOjM2MTE=", first: 100) {
    ... ProductConnection
    edges {
      node {
        ... on GroupingProduct {
          ... Product
          childrenList {
            pageInfo {
              hasNextPage
              endCursor
            }
            edges {
              node {
                quantity
                product {
                  ... SimpleProduct
                  ... VariableProduct
                }
              }
            }
          }
        }
        template {
          code
        }
      }
    }
  }
}

fragment SimpleProduct on SimpleProduct {
  ... Product
  attributeList {
    ... AttributeValueConnection
  }
}

fragment VariableProduct on VariableProduct {
  ... Product
  attributeList {
    ... AttributeValueConnection
  }
  bindings {
    ... Attribute
    options {
      code
      name {
        value
        language
      }
    }
  }
  variantList {
    ... ProductConnection
  }
}

fragment AttributeValueConnection on AttributeValueConnection {
  pageInfo {
    hasNextPage
    endCursor
  }
  edges {
    node {
      attribute {
        ... Attribute
      }
      translations {
        language
      }
    }
  }
}

fragment Attribute on Attribute {
  code
  name {
    value
    language
  }
  scope
}

fragment Product on Product {
  __typename
  sku
  createdAt
  editedAt
}

fragment ProductConnection on ProductConnection {
  pageInfo {
    hasNextPage
    endCursor
  }
  edges {
    node {
      ... Product
    }
  }
}
batch mutation
AttributeAddMetadataInput!
AttributeCreateDateInput!
AttributeCreateFileInput!
AttributeCreateGalleryInput!
AttributeCreateImageInput!
AttributeCreateMultiSelectInput!
AttributeCreateNumericInput
AttributeCreatePriceInput!
AttributeCreateProductRelationInput!
AttributeCreateSelectInput!
AttributeCreateTextareaInput!
AttributeCreateTextInput!
AttributeCreateUnitInput!
AttributeDateSetFormatInput!
AttributeDeleteInput!
AttributeDeleteMetadataInput!
AttributeMultiSelectAddOptionInput!
AttributeMultiSelectDeleteOptionInput!
AttributeMultiSelectSetOptionNameInput!
AttributeMultiSelectSetOptionsInput!
AttributeOptionAddCustomFieldImageInput!
AttributeOptionAddCustomFieldTextareaInput!
AttributeOptionAddCustomFieldTextareaRTEInput!
AttributeOptionAddCustomFieldTextInput!
AttributeOptionAddOptionCustomFieldValueTranslationsImageInput!
AttributeOptionAddOptionCustomFieldValueTranslationsTextareaInput!
AttributeOptionAddOptionCustomFieldValueTranslationsTextareaRTEInput!
AttributeOptionAddOptionCustomFieldValueTranslationsTextInput!
AttributeOptionDeleteCustomFieldInput!
AttributeOptionDeleteOptionCustomFieldValueTranslationsInput!
AttributePriceSetCurrencyInput!
AttributeSelectAddOptionInput!
AttributeSelectDeleteOptionInput!
AttributeSelectSetOptionNameInput!
AttributeSelectSetOptionsInput!
AttributeSetNameInput!
AttributeTextareaSetRichEditInput!
AttributeUnitSetUnitInput!
CategoryAddAttributeValueTranslationsDateInput!
CategoryAddAttributeValueTranslationsFileInput!
CategoryAddAttributeValueTranslationsGalleryInput!
CategoryAddAttributeValueTranslationsImageInput!
CategoryAddAttributeValueTranslationsMultiSelectInput!
CategoryAddAttributeValueTranslationsNumericInput!
CategoryAddAttributeValueTranslationsPriceInput!
CategoryAddAttributeValueTranslationsProductRelationInput!
CategoryAddAttributeValueTranslationsSelectInput!
CategoryAddAttributeValueTranslationsTextareaInput!
CategoryAddAttributeValueTranslationsTextInput!
CategoryAddAttributeValueTranslationsUnitInput!
CategoryAttributeAddAttributeInput!
CategoryAttributeRemoveAttributeInput!
CategoryCreateInput!
CategoryDeleteAttributeValueTranslationsInput!
CategoryDeleteInput!
CategorySetNameInput!
MultimediaCreateInput!
MultimediaDeleteInput!
MultimediaFolderCreateInput!
MultimediaFolderDeleteInput!
MultimediaMoveInput!
MultimediaReplaceInput!
MultimediaSetAltInput!
MultimediaSetNameInput!
MultimediaSetTitleInput!
ProductAddAttributeValueTranslationsDateInput!
ProductAddAttributeValueTranslationsFileInput!
ProductAddAttributeValueTranslationsGalleryInput!
ProductAddAttributeValueTranslationsImageInput!
ProductAddAttributeValueTranslationsMultiSelectInput!
ProductAddAttributeValueTranslationsNumericInput!
ProductAddAttributeValueTranslationsPriceInput!
ProductAddAttributeValueTranslationsProductRelationInput!
ProductAddAttributeValueTranslationsSelectInput!
ProductAddAttributeValueTranslationsTextareaInput!
ProductAddAttributeValueTranslationsTextInput!
ProductAddAttributeValueTranslationsUnitInput!
ProductAddCategoriesInput!
ProductCreateGroupingInput!
ProductCreateSimpleInput!
ProductCreateVariableInput!
ProductDeleteAttributeValueTranslationsInput!
ProductDeleteInput!
ProductGroupingAddChildInput!
ProductGroupingRemoveChildInput!
ProductGroupingSetChildQuantityInput!
ProductRemoveCategoriesInput!
ProductSetStatusInput!
ProductSetTemplateInput!
ProductVariableAddVariantInput!
ProductVariableRemoveVariantInput!
ProductVariableSetBindingsInput!
Attribute
AttributeValue
Attribute
AttributeValue
AttributeValueTranslation
Attribute
AttributeValue
AttributeValueTranslation
Attribute
AttributeValue
AttributeValueTranslation
Product
Attribute
AttributeValue
AttributeValueTranslation
CustomField
CustomFieldTranslatedValue
CustomFieldValue
CustomFieldValueTranslation
Attribute
OptionAttribute
AttributeValue
AttributeValueTranslation
Attribute
AttributeValue
AttributeValueTranslation
Attribute
AttributeValue
AttributeValueTranslation
Product
Attribute
AttributeValue
AttributeValueTranslation
Attribute
OptionAttribute
AttributeValue
AttributeValueTranslation
Product
Attribute
AttributeValue
AttributeValueTranslation
CustomField
CustomFieldTranslatedValue
CustomFieldValue
CustomFieldValueTranslation
CustomField
CustomFieldTranslatedValue
CustomFieldValue
CustomFieldValueTranslation
Attribute
AttributeValue
AttributeValueTranslation
CustomField
CustomFieldTranslatedValue
CustomFieldValue
CustomFieldValueTranslation
Attribute
AttributeValue
AttributeValueTranslatio
AttributeCode
CategoryCode
Language
Sku
Category
CategoryTree
GroupingProduct
GroupedProduct
Multimedia
MultimediaFolder
Option
Section
Template

code

The code of Attribute the mutation to be performed on.

metadata

Metadata to be set.

code

Code of Attribute.

scope

Scope of Attribute.

name

Name of Attribute.

format

Format of Attribute.

code

Code of Attribute.

scope

Scope of Attribute.

name

Name of Attribute.

code

Code of Attribute.

scope

Scope of Attribute.

name

Name of Attribute.

code

Code of Attribute.

scope

Scope of Attribute.

name

Name of Attribute.

code

Code of Attribute.

scope

Scope of Attribute.

name

Name of Attribute.

options

Options of Attribute.

code

Code of Attribute.

scope

Scope of Attribute.

name

Name of Attribute.

code

Code of Attribute.

scope

Scope of Attribute.

name

Name of Attribute.

currency

Currency of Attribute.

code

Code of Attribute.

scope

Scope of Attribute.

name

Name of Attribute.

code

Code of Attribute.

scope

Scope of Attribute.

name

Name of Attribute.

options

Options of Attribute.

code

Code of Attribute.

scope

Scope of Attribute.

name

Name of Attribute.

richEdit

Is rich edit enabled.

code

Code of Attribute.

scope

Scope of Attribute.

name

Name of Attribute.

code

Code of Attribute.

scope

Scope of Attribute.

name

Name of Attribute.

unitName

Unit name for Attribute.

code

The code of Attribute the mutation to be performed on.

format

Format of Attribute.

code

The code of Attribute the mutation to be performed on.

code

The code of Attribute the mutation to be performed on.

metadataKeys

Metadata keys to be deleted.

code

The code of Attribute the mutation to be performed on.

option

Option to be added.

code

The code of Attribute the mutation to be performed on.

optionCode

Option to be deleted.

code

The code of Attribute the mutation to be performed on.

optionCode

Option to be changed.

optionName

Option name to be set.

code

The code of Attribute the mutation to be performed on.

options

Options to be set.

code

The code of Attribute the mutation to be performed on.

customFieldCode

Code of the custom field to be configured.

code

The code of Attribute the mutation to be performed on.

customFieldCode

Code of the custom field to be configured.

code

The code of Attribute the mutation to be performed on.

customFieldCode

Code of the custom field to be configured.

code

The code of Attribute the mutation to be performed on.

customFieldCode

Code of the custom field to be configured.

code

The code of Attribute the mutation to be performed on.

optionCode

Option to be changed.

customFieldCode

Code of the custom field to be configured.

translations

Translations of the value to be added.

code

The code of Attribute the mutation to be performed on.

optionCode

Option to be changed.

customFieldCode

Code of the custom field to be configured.

translations

Translations of the value to be added.

code

The code of Attribute the mutation to be performed on.

optionCode

Option to be changed.

customFieldCode

Code of the custom field to be configured.

translations

Translations of the value to be added.

code

The code of Attribute the mutation to be performed on.

optionCode

Option to be changed.

customFieldCode

Code of the custom field to be configured.

translations

Translations of the value to be added.

code

The code of Attribute the mutation to be performed on.

customFieldCode

Code of the custom field to be deleted.

code

The code of Attribute the mutation to be performed on.

optionCode

Option to be changed.

customFieldCode

Code of the custom field changed.

languages

Languages the translations to be deleted in.

optionCodes

Option codes to be filtered by.

optionNames

Option names to be filtered by.

code

The code of Attribute the mutation to be performed on.

currency

Currency to be set.

code

The code of Attribute the mutation to be performed on.

option

Option to be added.

code

The code of Attribute the mutation to be performed on.

optionCode

Option to be deleted.

code

The code of Attribute the mutation to be performed on.

optionCode

Option to be changed.

optionName

Option name to be set.

code

The code of Attribute the mutation to be performed on.

options

Options to be set.

code

The code of Attribute the mutation to be performed on.

name

Name to be set.

code

The code of Attribute the mutation to be performed on.

richEdit

Is rich edit enabled.

code

The code of Attribute the mutation to be performed on.

unitName

Unit to be set.

categoryCode

The code of Category the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

categoryCode

The code of Category the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

categoryCode

The code of Category the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

categoryCode

The code of Category the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

categoryCode

The code of Category the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

categoryCode

The code of Category the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

categoryCode

The code of Category the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

categoryCode

The code of Category the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

categoryCode

The code of Category the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

categoryCode

The code of Category the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

categoryCode

The code of Category the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

categoryCode

The code of Category the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

attributeCode

The code of Attribute to be added.

attributeCode

The code of Attribute to be removed.

code

The code of Category.

name

The name of Category.

code

The code of Category the mutation to be performed on.

attributeCode

The code of Attribute deleting value from.

languages

Languages the translations to be deleted in.

code

The code of Category the mutation to be performed on.

code

The code of Category the mutation to be performed on.

name

Name to be set.

language

value

Translation value to be set.

language

value

Translation value to be set.

language

value

Translation value to be set.

language

Language the translation to be added in.

value

Translation value to be set.

language

value

Translation value to be set.

key

Key of the metadata value to be set on.

value

Value to be set.

name

The name of Multimedia.

folderPath

Folder Multimedia to be put in.

path

The path of Multimedia the mutation to be performed on.

name

The name of MultimediaFolder.

folderPath

Folder MultimediaFolder to be put in.

createFolderPath

Creates folderPath if does not exist. Defaults to false.

path

The path of MultimediaFolder the mutation to be performed on.

path

The path of Multimedia the mutation to be performed on.

folderPath

Folder Multimedia to be put in.

path

The path of Multimedia the mutation to be performed on.

path

The path of Multimedia the mutation to be performed on.

alt

Alt to be set.

path

The path of Multimedia the mutation to be performed on.

name

Name to be set.

path

The path of Multimedia the mutation to be performed on.

title

Title to be set.

language

value

Translation value to be set.

language

value

Translation value to be set.

code

Code of the Option to be used.

name

Name to be set.

language

value

Translation value to be set.

sku

The sku of Product the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

sku

The sku of Product the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

sku

The sku of Product the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

sku

The sku of Product the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

sku

The sku of Product the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

sku

The sku of Product the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

sku

The sku of Product the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

sku

The sku of Product the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

twoWayRelation

Determines behavior of the value. Defaults to None

sku

The sku of Product the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

sku

The sku of Product the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

sku

The sku of Product the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

sku

The sku of Product the mutation to be performed on.

attributeCode

The code of Attribute adding value to.

translations

Translations of the value to be added.

sku

The sku of Product the mutation to be performed on.

categoryCodes

Categories to be added.

sku

Sku of Product.

templateCode

Template of Product.

categoryCode

Categories of Product.

sku

Sku of Product.

templateCode

Template of Product.

categoryCode

Categories of Product.

sku

Sku of Product.

templateCode

Template of Product.

categoryCode

Categories of Product.

sku

The sku of Product the mutation to be performed on.

attributeCode

The code of Attribute deleting value from.

languages

Languages the translations to be deleted in.

sku

The sku of Product the mutation to be performed on.

sku

The sku of Product the mutation to be performed on.

childSku

Child to be added.

quantity

Quantity the child to be added in.

sku

The sku of Product the mutation to be performed on.

childSku

Child to be removed.

sku

The sku of Product the mutation to be performed on.

childSku

Child quantity to be modified.

quantity

Quantity to be set.

language

value

Translation value to be set.

sku

The sku of Product the mutation to be performed on.

categoryCodes

Categories to be removed.

sku

The sku of Product the mutation to be performed on.

statusCode

Status to be set.

language

Language the status to be set in.

sku

The sku of Product the mutation to be performed on.

template

Template to be set.

sku

The sku of Product the mutation to be performed on.

variantSku

Variant to be added.

sku

The sku of Product the mutation to be performed on.

variantSku

Variant to be removed.

sku

The sku of Product the mutation to be performed on.

bindingCodes

Binding attributes to be set.

language

value

Translation value to be set.

language

Language the translation to be added in.

value

Translation value to be set.

language

Language the translation to be added in.

value

Translation value to be set.

language

value

Translation value to be set. Accepts Attribute Variables in format {{#attribute_code}}.

language

Language the translation to be added in.

value

Translation value to be set.

language

value

Translation value to be set.

language

Language the translation to be filtered in.

value

Translation value to be filtered by.

language

Language the translation to be added in.

value

Translation value to be set.

language

value

Translation value to be set.

attribute

Changed Attribute.

edges

Edges of the connection.

pageInfo

Page info of the connection.

totalCount

Count of all edges in connection.

node

Node of the Edge.

cursor

The Edge cursor.

attribute

Created Attribute.

attribute

Created Attribute.

attribute

Created Attribute.

attribute

Created Attribute.

attribute

Created Attribute.

attribute

Created Attribute.

attribute

Created Attribute.

attribute

Created Attribute.

attribute

Created Attribute.

attribute

Created Attribute.

attribute

Created Attribute.

attribute

Created Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

code

Deleted AttributeCode.

edges

Edges of the connection.

pageInfo

Page info of the connection.

totalCount

Count of all edges in connection.

node

Node of the Edge.

cursor

The Edge cursor.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

attribute

Changed Attribute.

edges

Edges of the connection.

pageInfo

Page info of the connection.

totalCount

Count of all edges in connection.

node

Node of the Edge.

cursor

The Edge cursor.

code

Readable id of Category.

Translatable name allowing to set different values in every active language.

A list of attribute values. first argument cannot be lesser than 0 and its default value is 50.

category

Changed Category.

category

Changed Category.

category

Changed Category.

category

Changed Category.

category

Changed Category.

category

Changed Category.

category

Changed Category.

category

Changed Category.

category

Changed Category.

category

Changed Category.

category

Changed Category.

category

Changed Category.

categoryAttributeList

Updated list of attributes.

categoryAttributeList

Updated list of attributes.

edges

Edges of the connection.

pageInfo

Page info of the connection.

totalCount

Count of all edges in connection.

node

Node of the Edge.

cursor

The Edge cursor.

category

Created Category.

category

Changed Category.

code

Deleted CategoryCode.

edges

Edges of the connection.

pageInfo

Page info of the connection.

totalCount

Count of all edges in connection.

node

Node of the Edge.

cursor

The Edge cursor.

category

Changed Category.

code

Readable id of CategoryTree.

Translatable name allowing to set different values in every active language.

A list of categories belonging to the CategoryTree. first argument cannot be lesser than 0, higher than 1000 and its default value is 50.

edges

Edges of the connection.

pageInfo

Page info of the connection.

totalCount

Count of all edges in connection.

edges

Edges of the connection.

pageInfo

Page info of the connection.

totalCount

Count of all edges in connection.

node

Node of the Edge.

cursor

The Edge cursor.

node

Node of the Edge.

cursor

The Edge cursor.

category

A leaf of the tree.

parentCategory

Parent leaf of to leaf.

edges

Edges of the connection.

pageInfo

Page info of the connection.

totalCount

Count of all edges in connection.

node

Node of the Edge.

cursor

The Edge cursor.

format

Represented date format.

attribute

An Attribute describing the value.

A value translations.

value

A translation value of an Attribute.

attribute

An Attribute describing the value.

A value translations.

value

A translation value of an Attribute.

attribute

An Attribute describing the value.

A value translations.

value

A translation value of an Attribute.

quantity

Quantity of a grouped Product.

product

Grouped Product.

edges

Edges of the connection.

pageInfo

Page info of the connection.

totalCount

Count of all edges in connection.

node

Node of the Edge.

cursor

The Edge cursor.

A list of children. first argument cannot be lesser than 0 and its default value is 50.

attribute

An Attribute describing the value.

A value translations.

value

A translation value of an Attribute.

customField

A CustomField describing the value.

value

A value in the context language.

customField

A CustomField describing the value.

A value translations.

value

A translation value of a CustomField.

edges

Edges of the connection.

pageInfo

Page info of the connection.

totalCount

Count of all edges in connection.

node

Node of the Edge.

cursor

The Edge cursor.

key

A key of metadatum.

value

Metadata value.

path

Readable id of Multimedia.

name

Given file name.

extension

File extension.

mime

Mime type of the file.

size

File size in bytes.

Represents the alternate text for an image if it cannot be displayed.

Represents the title tooltip value.

url

URL to download binary multimedia file.

folder

Folder where multimedia is stored.

edges

Edges of the connection.

pageInfo

Page info of the connection.

totalCount

Count of all edges in connection.

multimedia

Created Multimedia.

path

Deleted MultimediaPath.

node

Node of the Edge.

cursor

The Edge cursor.

path

Readable id of MultimediaFolder.

name

Name of MultimediaFolder.

edges

Edges of the connection.

pageInfo

Page info of the connection.

totalCount

Count of all edges in connection.

multimediaFolder

Changed MultimediaFolder.

path

Deleted MultimediaFolderPath.

node

Node of the Edge.

cursor

The Edge cursor.

multimedia

Changed Multimedia.

multimedia

Replacing Multimedia.

multimedia

Changed Multimedia.

multimedia

Changed Multimedia.

multimedia

Changed Multimedia.

multimedia

Changed Multimedia.

attribute

An Attribute describing the value/

A value translations.

translatedValue

Represents simplified translated value containing scalar names in context language only.

value

A translation value of an Attribute.

attribute

An Attribute describing the value.

A value translations.

value

A translation value of an Attribute.

code

Readable id of Option.

Translatable name allowing to set different values in every active language.

customFields

CustomField values.

edges

Edges of the connection.

pageInfo

Page info of the connection.

totalCount

Count of all edges in connection.

node

Node of the Edge.

cursor

The Edge cursor.

code

Readable id of Option.

Translatable name allowing to set different values in every active language.

code

Code of Option.

name

Option name in the context language.

startCursor

When paginating backwards, the cursor to continue.

endCursor

When paginating forwards, the cursor to continue.

hasPreviousPage

When paginating backwards, are there more items?

hasNextPage

When paginating forwards, are there more items?

currency

The currency price is in.

attribute

An Attribute describing the value.

A value translations.

value

A translation value of an Attribute.

product

Changed Product.

product

Changed Product.

product

Changed Product.

product

Changed Product.

product

Changed Product.

product

Changed Product.

product

Changed Product.

product

Changed Product.

product

Changed Product.

product

Changed Product.

product

Changed Product.

product

Changed Product.

product

Changed Product.

edges

Edges of the connection.

pageInfo

Page info of the connection.

totalCount

Count of all edges in connection.

product

Created Product.

product

Created Product.

product

Created Product.

edges

Edges of the connection.

pageInfo

Page info of the connection.

totalCount

Count of all edges in connection.

product

Changed Product.

node

Node of the Edge.

cursor

The Edge cursor.

sku

Deleted Sku.

node

Node of the Edge.

cursor

The Edge cursor.

product

Changed Product.

product

Changed Product.

product

Changed Product.

attribute

An Attribute describing the value.

A value translations.

value

A translation value of an Attribute.

product

Changed Product.

product

Changed Product.

product

Changed Product.

code

Readable id of ProductStatus.

translatedName

Represents translated name in the context language.

language

Language of status.

value

Status value.

product

Changed Product.

product

Changed Product.

product

Changed Product.

code

Readable id of Section.

A list of attributes used in the Section. first argument cannot be lesser than 0 and its default value is 50.

edges

Edges of the connection.

pageInfo

Page info of the connection.

totalCount

Count of all edges in connection.

node

Node of the Edge.

cursor

The Edge cursor.

attribute

An Attribute describing the value.

A value translations.

translatedValue

Represents simplified translated value containing scalar names in context language only.

value

A translation value of an Attribute.

code

Readable id of Template.

A list of attributes used in the Template. first argument cannot be lesser than 0 and its default value is 50.

A list of sections used in the Template. first argument cannot be lesser than 0 and its default value is 50.

edges

Edges of the connection.

pageInfo

Page info of the connection.

totalCount

Count of all edges in connection.

node

Node of the Edge.

cursor

The Edge cursor.

richEdit

Is rich text editor enabled.

attribute

An Attribute describing the value.

A value translations.

value

A translation value of an Attribute.

rawValue

Represents raw textarea value translation with attribute variables unresolved in form of {{#attribute_code}}.

customField

A CustomField describing the value.

value

A value in the context language.

customField

A CustomField describing the value.

A value translations.

value

A translation value of a CustomField.

customField

A CustomField describing the value.

value

A value in the context language.

customField

A CustomField describing the value.

A value translations.

value

A translation value of a CustomField.

attribute

An Attribute describing the value.

A value translations.

value

A translation value of an Attribute.

customField

A CustomField describing the value.

value

A value in the context language.

customField

A CustomField describing the value.

A value translations.

value

A translation value of a CustomField.

value

Tranlated value.

language

Language of translation.

name

Name o Unit.

symbol

Symbol of Unit.

unit

Unit of Attribute.

attribute

An Attribute describing the value.

A value translations.

value

A translation value of an Attribute.

bindings

A list of attributes by which variants are bonded.

A list of variants in VariableProduct. first argument cannot be lesser than 0 and its default value is 50.

Get information about specific product and specific attribute values in specific language

This is an example of how you can get values of specific attributes in specific languages of a specific product using pagination.

query getAttValues {
    product(sku: "0123456789") {
        # SKU of a single product to get data from
        sku
        createdAt
        editedAt
        template {
            code
        }
        attributeList(
            first: 10 # nuber of entries to return in a single page (max response time is 60s)
            after: "YXJyYXljb25uZWN0aW9uOjA=" # endCursor from the response to get rest of the data if "hasNextPage": true
            codes: [
                # attributes to get values from
                "name"
                "color"
                "short_description"
                "price_local_eur"
                "galeria_zdjec"
            ]
        ) {
            ... on AttributeValueConnection {
                pageInfo {
                    hasNextPage
                    endCursor
                }
                edges {
                    node {
                        ... on PriceAttributeValue {
                            priceAttribute: attribute {
                                # currency might be useful in the price context
                                currency
                            }
                            priceAttributeValue: translations(
                                languages: ["en_GB", "pl_PL"]
                            ) {
                                language
                                value
                            }
                        }
                        ... on SelectAttributeValue {
                            SelectAttributeValue: translations(
                                languages: ["en_GB", "pl_PL"]
                            ) {
                                language
                                translatedValue {
                                    ...OptionTranslatedValue
                                }
                            }
                        }
                        ... on TextAttributeValue {
                            attribute {
                                name(languages: ["en_GB", "pl_PL"]) {
                                    language
                                    value
                                }
                            }
                            TextAttributeValue: translations(
                                languages: ["en_GB", "pl_PL"]
                            ) {
                                language
                                value
                            }
                        }
                        ... on TextareaAttributeValue {
                            attribute {
                                name(languages: ["en_GB", "pl_PL"]) {
                                    language
                                    value
                                }
                            }
                            TextareaAttributeValue: translations(
                                languages: ["en_GB", "pl_PL"]
                            ) {
                                language
                                value
                            }
                        }
                        ... on GalleryAttributeValue {
                            GalleryAttributeValue: translations {
                                language
                                value {
                                    ...Multimedia
                                }
                            }
                        }
                    }
                }
            }
        }
        __typename
    }
}

fragment Multimedia on Multimedia {
    path
    name
    extension
    mime
    sizeInBytes: size
    alt(languages: ["en_GB", "pl_PL"]) {
        language
        value
    }
    title(languages: ["en_GB", "pl_PL"]) {
        language
        value
    }
}
fragment OptionTranslatedValue on OptionTranslatedValue {
    code
    name
}
{
    "data": {
        "product": {
            "sku": "0123456789",
            "createdAt": "2024-04-04T11:44:54+00:00",
            "editedAt": "2024-04-04T13:33:46+00:00",
            "template": {
                "code": "GraphQL"
            },
            "attributeList": {
                "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": "YXJyYXljb25uZWN0aW9uOjQ="
                },
                "edges": [
                    {
                        "node": {
                            "SelectAttributeValue": [
                                {
                                    "language": "en_GB",
                                    "translatedValue": {
                                        "code": "blk",
                                        "name": "Black"
                                    }
                                },
                                {
                                    "language": "pl_PL",
                                    "translatedValue": {
                                        "code": "blk",
                                        "name": "Czarny"
                                    }
                                }
                            ]
                        }
                    },
                    {
                        "node": {
                            "attribute": {
                                "name": [
                                    {
                                        "language": "en_GB",
                                        "value": "Short description"
                                    },
                                    {
                                        "language": "pl_PL",
                                        "value": "Krótki opis"
                                    }
                                ]
                            },
                            "TextareaAttributeValue": [
                                {
                                    "language": "en_GB",
                                    "value": "Short countertop description"
                                },
                                {
                                    "language": "pl_PL",
                                    "value": "Krótki opis blatu"
                                }
                            ]
                        }
                    },
                    {
                        "node": {
                            "priceAttribute": {
                                "currency": "EUR"
                            },
                            "priceAttributeValue": [
                                {
                                    "language": "en_GB",
                                    "value": 10.1
                                },
                                {
                                    "language": "pl_PL",
                                    "value": 9.99
                                }
                            ]
                        }
                    },
                    {
                        "node": {
                            "GalleryAttributeValue": [
                                {
                                    "language": "en_GB",
                                    "value": [
                                        {
                                            "path": "semir-beige-kapinos-stopnica-narozna-33x33-g1.webp",
                                            "name": "semir-beige-kapinos-stopnica-narozna-33x33-g1.webp",
                                            "extension": "webp",
                                            "mime": "image\/webp",
                                            "sizeInBytes": 46116,
                                            "alt": [
                                                {
                                                    "language": "en_GB",
                                                    "value": null
                                                },
                                                {
                                                    "language": "pl_PL",
                                                    "value": null
                                                }
                                            ],
                                            "title": [
                                                {
                                                    "language": "en_GB",
                                                    "value": null
                                                },
                                                {
                                                    "language": "pl_PL",
                                                    "value": null
                                                }
                                            ]
                                        },
                                        {
                                            "path": "ILARIO_Beige_stopnica_narozna_kapinos_330x330_3D@2x.webp",
                                            "name": "ILARIO_Beige_stopnica_narozna_kapinos_330x330_3D@2x.webp",
                                            "extension": "webp",
                                            "mime": "image\/webp",
                                            "sizeInBytes": 158884,
                                            "alt": [
                                                {
                                                    "language": "en_GB",
                                                    "value": null
                                                },
                                                {
                                                    "language": "pl_PL",
                                                    "value": null
                                                }
                                            ],
                                            "title": [
                                                {
                                                    "language": "en_GB",
                                                    "value": null
                                                },
                                                {
                                                    "language": "pl_PL",
                                                    "value": null
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "language": "pl_PL",
                                    "value": [
                                        {
                                            "path": "semir-beige-kapinos-stopnica-narozna-33x33-g1.webp",
                                            "name": "semir-beige-kapinos-stopnica-narozna-33x33-g1.webp",
                                            "extension": "webp",
                                            "mime": "image\/webp",
                                            "sizeInBytes": 46116,
                                            "alt": [
                                                {
                                                    "language": "en_GB",
                                                    "value": null
                                                },
                                                {
                                                    "language": "pl_PL",
                                                    "value": null
                                                }
                                            ],
                                            "title": [
                                                {
                                                    "language": "en_GB",
                                                    "value": null
                                                },
                                                {
                                                    "language": "pl_PL",
                                                    "value": null
                                                }
                                            ]
                                        },
                                        {
                                            "path": "ILARIO_Beige_stopnica_narozna_kapinos_330x330_3D@2x.webp",
                                            "name": "ILARIO_Beige_stopnica_narozna_kapinos_330x330_3D@2x.webp",
                                            "extension": "webp",
                                            "mime": "image\/webp",
                                            "sizeInBytes": 158884,
                                            "alt": [
                                                {
                                                    "language": "en_GB",
                                                    "value": null
                                                },
                                                {
                                                    "language": "pl_PL",
                                                    "value": null
                                                }
                                            ],
                                            "title": [
                                                {
                                                    "language": "en_GB",
                                                    "value": null
                                                },
                                                {
                                                    "language": "pl_PL",
                                                    "value": null
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "language": "de_DE",
                                    "value": [
                                        {
                                            "path": "semir-beige-kapinos-stopnica-narozna-33x33-g1.webp",
                                            "name": "semir-beige-kapinos-stopnica-narozna-33x33-g1.webp",
                                            "extension": "webp",
                                            "mime": "image\/webp",
                                            "sizeInBytes": 46116,
                                            "alt": [
                                                {
                                                    "language": "en_GB",
                                                    "value": null
                                                },
                                                {
                                                    "language": "pl_PL",
                                                    "value": null
                                                }
                                            ],
                                            "title": [
                                                {
                                                    "language": "en_GB",
                                                    "value": null
                                                },
                                                {
                                                    "language": "pl_PL",
                                                    "value": null
                                                }
                                            ]
                                        },
                                        {
                                            "path": "ILARIO_Beige_stopnica_narozna_kapinos_330x330_3D@2x.webp",
                                            "name": "ILARIO_Beige_stopnica_narozna_kapinos_330x330_3D@2x.webp",
                                            "extension": "webp",
                                            "mime": "image\/webp",
                                            "sizeInBytes": 158884,
                                            "alt": [
                                                {
                                                    "language": "en_GB",
                                                    "value": null
                                                },
                                                {
                                                    "language": "pl_PL",
                                                    "value": null
                                                }
                                            ],
                                            "title": [
                                                {
                                                    "language": "en_GB",
                                                    "value": null
                                                },
                                                {
                                                    "language": "pl_PL",
                                                    "value": null
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ]
                        }
                    }
                ]
            },
            "__typename": "SimpleProduct"
        }
    }
}

List of all multimedia in stream

This query will return all multimedia in PIM and extra info about them.

Create a simple product

This is how you can create a simple product via API.

Please note that for this to work, you need to create a template beforehand. This mutation can only assign products to an already existing template, and will NOT create a new one.

You can also assign a category to the newly created product in the same query.

While templateCode is required, categoryCodes is not. But if used, also needed to be created beforehand.

List of product relations for a specific product

In this example, we're using a specific product with SKU47.

For your query please use your own.

Get values of custom fields

Example query on how to get values of custom fields options

Create a grouping product

This is how you can create a simple product via API.

Please note that for this to work, you need to create a template beforehand. This mutation can only assign products to an already existing template, and will NOT create a new one.

You can also assign a category to the newly created product in the same query.

While templateCode is required, categoryCodes is not. But if used, also needed to be created beforehand.

List of templates with attributes

Language the translation to be added in. Allowed empty only in case of scope.

Language the translation to be added in. Allowed empty only in case of scope.

Language the translation to be added in. Allowed empty only in case of scope.

Language the translation to be added in. Allowed empty only in case of scope.

Language the translation to be added in. Allowed empty only in case of scope.

Language the translation to be added in. Allowed empty only in case of scope.

Language the translation to be added in. Allowed empty only in case of scope.

Language the translation to be added in. Allowed empty only in case of scope.

Language the translation to be added in. Allowed empty only in case of scope.

Language the translation to be added in. Allowed empty only in case of scope.

Language the translation to be added in. Allowed empty only in case of scope.

Language the translation to be added in. Allowed empty only in case of scope.

name (languages: )

attributeList (after: , first: , codes: )

name (languages: )

categoryTreeLeafList (after: , first: )

translations (languages: )

translations (languages: )

translations (languages: )

childrenList (after: , first: )

translations (languages: )

translations (languages: )

alt (languages: )

title (languages: )

translations (languages: )

translations (languages: )

name (languages: )

name (languages: )

translations (languages: )

translations (languages: )

attributeList (after: , first: )

translations (languages: )

attributeList (after: , first: )

sectionList (after: , first: )

translations (languages: )

translations (languages: )

translations (languages: )

translations (languages: )

translations (languages: )

translations (languages: )

variantList (after: , first: )

Please keep in mind that this is just an example and more data can be pulled. How to deal with other attribute types can be seen in the fragment AttributeValue .

here
AttributeCode!
AttributeCode!
DateFormat!
AttributeCode!
AttributeCode!
AttributeCode!
AttributeCode!
AttributeCode!
AttributeCode!
Currency!
AttributeCode!
AttributeCode!
AttributeCode!
Boolean!
AttributeCode!
AttributeCode!
UnitName!
AttributeCode!
DateFormat!
AttributeCode!
AttributeCode!
[MetadatumKey!]!
AttributeCode!
AttributeCode!
OptionCode!
AttributeCode!
OptionCode!
AttributeCode!
AttributeCode!
CustomFieldCode!
AttributeCode!
CustomFieldCode!
AttributeCode!
CustomFieldCode!
AttributeCode!
CustomFieldCode!
AttributeCode!
OptionCode!
CustomFieldCode!
AttributeCode!
OptionCode!
CustomFieldCode!
AttributeCode!
OptionCode!
CustomFieldCode!
AttributeCode!
OptionCode!
CustomFieldCode!
AttributeCode!
CustomFieldCode!
AttributeCode!
OptionCode!
CustomFieldCode!
[Language!]!
[OptionCode!]
AttributeCode!
Currency!
AttributeCode!
AttributeCode!
OptionCode!
AttributeCode!
OptionCode!
AttributeCode!
AttributeCode!
AttributeCode!
Boolean!
AttributeCode!
UnitName!
CategoryCode!
AttributeCode!
CategoryCode!
AttributeCode!
CategoryCode!
AttributeCode!
CategoryCode!
AttributeCode!
CategoryCode!
AttributeCode!
CategoryCode!
AttributeCode!
CategoryCode!
AttributeCode!
CategoryCode!
AttributeCode!
CategoryCode!
AttributeCode!
CategoryCode!
AttributeCode!
CategoryCode!
AttributeCode!
CategoryCode!
AttributeCode!
AttributeCode!
AttributeCode!
CategoryCode!
CategoryCode!
AttributeCode!
[Language!]
CategoryCode!
CategoryCode!
Language
String!
Language
[MultimediaPath!]!
Language
[MultimediaPath!]!
Language!
MultimediaPath!
Language
MultimediaPath!
MetadatumKey!
String!
MultimediaName!
MultimediaFolderPath
MultimediaPath!
MultimediaFolderName!
MultimediaFolderPath
Boolean!
MultimediaFolderPath!
MultimediaPath!
MultimediaFolderPath
MultimediaPath!
MultimediaPath!
MultimediaPath!
MultimediaName!
MultimediaPath!
Language
[OptionCode!]!
Language
Float!
OptionCode!
Language
Float!
Sku!
AttributeCode!
Sku!
AttributeCode!
Sku!
AttributeCode!
Sku!
AttributeCode!
Sku!
AttributeCode!
Sku!
AttributeCode!
Sku!
AttributeCode!
Sku!
AttributeCode!
Sku!
AttributeCode!
Sku!
AttributeCode!
Sku!
AttributeCode!
Sku!
AttributeCode!
Sku!
[CategoryCode!]!
Sku!
TemplateCode!
[CategoryCode!]
Sku!
TemplateCode!
[CategoryCode!]
Sku!
TemplateCode!
[CategoryCode!]
Sku!
AttributeCode!
[Language!]
Sku!
Sku!
Sku!
Int
Sku!
Sku!
Sku!
Sku!
Int!
Language
[Sku!]!
Sku!
[CategoryCode!]!
Sku!
StatusCode!
Language!
Sku!
TemplateCode!
Sku!
Sku!
Sku!
Sku!
Sku!
[AttributeCode!]!
Language
OptionCode!
Language!
String!
Language!
String!
Language
String!
Language!
String!
Language
String!
Language!
String!
Language!
String!
Language
Float!
Int
String!
AttributeCode!
Int
AttributeCode!
String!
Int
String!
CategoryCode!
[Language!]
String
Int
[AttributeCode!]
Int
String!
CategoryCode!
Int
CategoryCode!
String!
CategoryTreeCode!
[Language!]
String
Int
Int
Int
CategoryTreeCode!
String!
String!
Int
String!
DateFormat!
[Language!]
String
[Language!]
[Language!]
Int!
Int
String!
String
Int
[Language!]
[Language!]
Int
Language!
String!
MetadatumKey!
String!
MultimediaPath!
MultimediaName!
String!
String
Int!
[Language!]
[Language!]
String!
Int
MultimediaPath!
String!
MultimediaFolderPath!
MultimediaFolderName!
Int
MultimediaFolderPath!
String!
[Language!]
[Language!]
Float
OptionCode!
[Language!]
Int
String!
OptionCode!
[Language!]
OptionCode!
String
String
String
Boolean!
Boolean!
Currency!
[Language!]
Float
Int
Int
Sku!
String!
Sku!
String!
[Language!]
StatusCode!
String
Language!
SectionCode!
String
Int
Int
String!
[Language!]
TemplateCode!
String
Int
String
Int
Int
String!
Boolean!
[Language!]
String
String
String
[Language!]
String
String
[Language!]
String
[Language!]
String
String
[Language!]
String
String
Language!
UnitName!
String!
[Language!]
Float
String
Int
[MetadatumInput!]!
[TranslatedStringInput!]
[TranslatedStringInput!]
[TranslatedStringInput!]
[TranslatedStringInput!]
[TranslatedStringInput!]
[OptionInput!]!
[TranslatedStringInput!]
[TranslatedStringInput!]
[TranslatedStringInput!]
[TranslatedStringInput!]
[OptionInput!]!
[TranslatedStringInput!]
[TranslatedStringInput!]
[TranslatedStringInput!]
OptionInput!
[TranslatedStringInput!]!
[OptionInput!]!
[ImageCustomFieldValueTranslationInput!]!
[TextareaCustomFieldValueTranslationInput!]!
[TextareaRTECustomFieldValueTranslationInput!]!
[TextCustomFieldValueTranslationInput!]!
[TranslatedStringFilterInput!]
OptionInput!
[TranslatedStringInput!]!
[OptionInput!]!
[TranslatedStringInput!]!
[DateValueTranlationInput!]!
[FileValueTranlationInput!]!
[GalleryValueTranlationInput!]!
[ImageValueTranlationInput!]!
[MultiSelectValueTranlationInput!]!
[NumericValueTranlationInput!]!
[PriceValueTranlationInput!]!
[ProductRelationValueTranlationInput!]!
[SelectValueTranlationInput!]!
[TextareaValueTranlationInput!]!
[TextValueTranlationInput!]!
[UnitValueTranlationInput!]!
[TranslatedStringInput!]
[TranslatedStringInput!]!
[TranslatedStringInput!]!
[TranslatedStringInput!]!
[TranslatedStringInput!]
[DateValueTranlationInput!]!
[FileValueTranslationInput!]!
[GalleryValueTranslationInput!]!
[ImageValueTranslationInput!]!
[MultiSelectValueTranslationInput!]!
[NumericValueTranslationInput!]!
[PriceValueTranslationInput!]!
[ProductRelationValueTranslationInput!]!
[SelectValueTranslationInput!]!
[TextareaValueTranslationInput!]!
[TextValueTranslationInput!]!
[UnitValueTranslationInput!]!
AttributeScope!
AttributeScope!
AttributeScope!
AttributeScope!
AttributeScope!
AttributeScope!
AttributeScope!
AttributeScope!
AttributeScope!
AttributeScope!
AttributeScope!
AttributeScope!
GLOBAL
GLOBAL
GLOBAL
GLOBAL
GLOBAL
GLOBAL
GLOBAL
TwoWayRelation
GLOBAL
GLOBAL
GLOBAL
GLOBAL
GLOBAL
Attribute!
Attribute!
Attribute!
OptionAttribute!
OptionAttribute!
OptionAttribute!
OptionAttribute!
OptionAttribute!
OptionAttribute!
OptionAttribute!
OptionAttribute!
OptionAttribute!
OptionAttribute!
Attribute!
AttributeValue!
[CustomFieldValue!]!
Product!
Product!
Product!
Product!
Product!
Product!
Product!
Product!
Product!
Product!
Product!
Product!
Product!
Product!
Product!
[Product!]!
Product!
Product!
Product!
[AttributeEdge!]
PageInfo
DateAttribute!
FileAttribute!
GalleryAttribute!
ImageAttribute!
MultiSelectAttribute!
NumericAttribute!
PriceAttribute!
ProductRelationAttribute!
SelectAttribute!
TextareaAttribute!
TextAttribute!
UnitAttribute!
DateAttribute!
[AttributeDeletedEdge!]
PageInfo
MultiSelectAttribute!
MultiSelectAttribute!
MultiSelectAttribute!
MultiSelectAttribute!
PriceAttribute!
SelectAttribute!
SelectAttribute!
SelectAttribute!
SelectAttribute!
TextareaAttribute!
UnitAttribute!
[AttributeValueEdge!]
PageInfo
[TranslatedString!]!
AttributeValueConnection!
Category!
Category!
Category!
Category!
Category!
Category!
Category!
Category!
Category!
Category!
Category!
Category!
AttributeConnection!
AttributeConnection!
[CategoryEdge!]
PageInfo
Category!
Category!
Category!
[CategoryDeletedEdge!]
PageInfo
Category!
[TranslatedString!]!
CategoryTreeLeafConnection!
[CategoryTreeEdge!]
PageInfo
[CategoryTreeDeletedEdge!]
PageInfo
CategoryTree!
Category!
Category
[CategoryTreeLeafEdge!]
PageInfo
CategoryTreeLeaf!
DateAttribute!
[DateAttributeValueTranslation!]!
FileAttribute!
[FileAttributeValueTranslation!]!
[Multimedia!]!
GalleryAttribute!
[GalleryAttributeValueTranslation!]!
[Multimedia!]!
[GroupedProductEdge!]
PageInfo
GroupedProduct!
GroupedProductConnection!
ImageAttribute!
[ImageAttributeValueTranslation!]!
Multimedia
ImageCustomField!
Multimedia
ImageCustomField!
[ImageCustomFieldValueTranslation!]!
Multimedia
[LanguageEdge!]
PageInfo
[TranslatedString!]!
[TranslatedString!]!
MultimediaFolder
[MultimediaEdge!]
PageInfo
Multimedia!
Multimedia!
[MultimediaFolderEdge!]
PageInfo
MultimediaFolder!
MultimediaFolder!
Multimedia!
Multimedia!
Multimedia!
Multimedia!
Multimedia!
Multimedia!
MultiSelectAttribute!
[MultiSelectAttributeValueTranslation!]!
[OptionTranslatedValue!]!
[Option!]!
NumericAttribute!
[NumericAttributeValueTranslation!]!
[TranslatedString!]!
[OptionEdge!]
PageInfo
Option!
[TranslatedString!]!
PriceAttribute!
[PriceAttributeValueTranslation!]!
[ProductEdge!]
PageInfo
GroupingProduct!
SimpleProduct!
VariableProduct!
[ProductDeletedEdge!]
PageInfo
GroupingProduct!
GroupingProduct!
GroupingProduct!
ProductRelationAttribute!
[ProductRelationAttributeValueTranslation!]!
ProductStatus
VariableProduct!
VariableProduct!
VariableProduct!
AttributeConnection!
[SectionEdge!]
PageInfo
Section!
SelectAttribute!
[SelectAttributeValueTranslation!]!
OptionTranslatedValue
Option
AttributeConnection!
SectionConnection!
[TemplateEdge!]
PageInfo
Template!
TextareaAttribute!
[TextareaAttributeValueTranslation!]!
TextareaCustomField!
TextareaCustomField!
[TextareaCustomFieldValueTranslation!]!
TextareaRTECustomField!
TextareaRTECustomField!
[TextareaRTECustomFieldValueTranslation!]!
TextAttribute!
[TextAttributeValueTranslation!]!
TextCustomField!
TextCustomField!
[TextCustomFieldValueTranslation!]!
Unit!
UnitAttribute!
[UnitAttributeValueTranslation!]!
[SelectAttribute!]!
ProductConnection!
GroupedProductProduct!
query multimedia {
  multimediaStream {
    pageInfo {
      hasNextPage
      endCursor
    }
    edges {
      __typename
      node {
        name
        path
        alt {
          value
          language
        }
        extension
        mime
        size
        folder {
          name
        }
        url
      }
    }
  }
}
mutation {
  productCreateSimple(
    input: { sku: "SKU_test2", templateCode: "Tshirts"}
  ) {
    __typename
  }
}
mutation {
  productCreateSimple(
    input: { sku: "SKU_test2", templateCode: "Tshirts", categoryCodes: "DELL" }
  ) {
    __typename
  }
}
query productRelation {
  product(sku: "001") {
    sku
    createdAt
    editedAt
    attributeList {
      pageInfo {
        hasNextPage
        endCursor
      }
      edges {
        node {
          attribute {
            code
          }
          translations {
            ... on ProductRelationAttributeValueTranslation {
              language
              value {
                sku
              }
            }
          }
        }
      }
    }
  }
}
fragment Option on Option {
    code
    name {
        value
        language
    }
    customFields {
        __typename
        customField {
            code
        }
        translations {
            language
            ... on ImageCustomFieldValueTranslation {
                imageCustomFieldValue: value {
                    path
                }
            }
            ... on TextCustomFieldValueTranslation {
                textCustomFieldValue: value
            }
            ... on TextareaCustomFieldValueTranslation {
                textareaCustomFieldValue: value
            }
            ... on TextareaRTECustomFieldValueTranslation {
                textareaRTECustomFieldValue: value
            }
        }
    }
}
mutation {
  productCreateGrouping(
    input: { sku: "SKU_GR_PRODUCT", templateCode: "Tshirts"}
  ) {
    __typename
  }
}
mutation {
  productCreateGrouping(
    input: { sku: "SKU_GR_PRODUCT", templateCode: "Tshirts", categoryCodes: "DELL"}
  ) {
    __typename
  }
}
query {
  templateList {
    pageInfo {
      hasNextPage
      endCursor
    }
    edges {
      node {
        code
        attributeList {
          edges {
            node {
              scope
              code
              name {
                value
                language
              }
            }
          }
        }
      }
    }
  }
}

Remove a child product from grouping one

This is how you remove child product from grouping one via API.

mutation {
  productGroupingRemoveChild(input: { sku: "SKU_GR_PRODUCT", childSku: "SKU_test2" }
  ) {
    __typename
  }
}

Set quantity of child product

Here's how you can set child product quantity via API.

mutation {
  productGroupingSetChildQuantity(
    input: { sku: "SKU_GR_PRODUCT", childSku: "SKU_test2", quantity: 2 }
  ) {
    __typename
  }
}

Add a variant to variable product

Here's how to add variant to variable product via API.

Both products must exist before this operation.

mutation {
  productVariableAddVariant(input: { sku: "SKU_VAR_PRODUCT", variantSku: "SKU_test2" }) {
    __typename
  }
}

Create a variable product

This is how you can create variable product via API.

Please note that for this to work, you need to create a template beforehand. This mutation can only assign the product to an already existing template, and will NOT create a new one.

While templateCode is required, categoryCodes is not. But if used, also needed to be created beforehand.

mutation {
  productCreateVariable(
    input: {
      sku: "SKU_VAR_PRODUCT"
      templateCode: "Tshirts"
      categoryCodes: "DELL"
    }
  ) {
    __typename
  }
}

Get products with variants, binding attributes and variants list

query {
  productStream {
    pageInfo {
      hasNextPage
      endCursor
    }
    edges {
      node {
        ... on VariableProduct {
          sku
          bindings {
            code
            __typename
          }
          variantList {
            edges {
              node {
                sku
              }
            }
          }
        }
      }
    }
  }
}

Add a child product to grouping one

That's how you add child product to grouping one.

Please bear in mind, that quantity isn't required and if used, cannot be a string - must be Integer (so there's no quotation mark)

Both products must exist before this operation.

mutation {
  productGroupingAddChild(
    input: { sku: "SKU_GR_PRODUCT", childSku: "SKU_test2", quantity: 1 }
  ) {
    __typename
  }
}

Delete Multimedia

The MultimediaPath scalar type represents a textual combination of MultimediaFolderPath, and MultimediaName joined with '/' Multimedia identifier pointing to its exact location. If the file is in the root folder you need to skip MultimediaFolderPath in path.

Remove a variant product from variable one

This is how you can remove variant product from variable one via API

Set alternative value for a multimedia

This is how you can set alternative value to a single multimedia via API.

The MultimediaPath scalar type represents a textual combination of MultimediaFolderPath, and MultimediaName joined with '/' Multimedia identifier pointing to its exact location. If the file is in the root folder you need to skip MultimediaFolderPath in path.

Change the name of the multimedia

This is how you can change the name of single multimedia via API.

The MultimediaPath scalar type represents a textual combination of MultimediaFolderPath, and MultimediaName joined with '/' Multimedia identifier pointing to its exact location. If the file is in the root folder you need to skip MultimediaFolderPath in path.

Add images to the gallery attribute

Attribute Gallery and Product identified with SKU must already exist.

value: is the path to an image, you can get it with query "multimediaStream"

Multimedia create

This is how you can create multimedia via API.

To create multimedia via API you need to send the data by a multipart request with upload and query headers.

The folder to which multimedia will be uploaded must already exist.

folderPath parameter is optional, if not included multimedia will be uploaded to the main folder.

Max allowed file size is 100 MB

Example in PHP8

Example in Python3

mutation {
  multimediaDelete(input: { path: "multimedia.jpg" }) {
    __typename
  }
}
mutation {
  productVariableRemoveVariant(input: { sku: "SKU_VAR_PRODUCT", variantSku: "SKU_test2" }
  ) {
    __typename
  }
}
mutation {
  multimediaSetAlt(
    input: {
      path: "multimedia.jpg"
      alt: { language: "en_GB", value: "Alternative value" }
    }
  ) {
    __typename
  }
}
mutation {
  multimediaSetName(
    input: {
      path: "multimedia.jpg"
      name: "multimedia_2.jpg"
    }
  ) {
    __typename
  }
}
mutation {
  productAddAttributeValueTranslationsGallery(
    input: {
      sku: "1"
      attributeCode: "gallery"
      translations: [
        { language: "pl_PL", value: ["1.jpg", "2.jpg", "3.jpg"] }
      ]
    }
  ) {
    __typename
  }
}
mutation {
  multimediaCreate(
    input: { name: "file_name.extension", folderPath: "folder_path" }
  ) {
    __typename
  }
}
$client = new \GuzzleHttp\Client(); // Guzzle version 6

$resp = $client->post(
    $url,
    [
        'multipart' => [
            [
                'name' => 'upload',
                'contents' => fopen(__DIR__ . '/test.png', 'r'),
            ],
            [
                'name' => 'query',
                'contents' => '
                    mutation {
                        multimediaCreate(input: {name: "new.png", folderPath: null}) {__typename}
                    }
                ',
            ],
        ],
        'headers' => [
            'X-API-KEY' => $apiKey,
        ],
    ],
);
from urllib import response
import requests

url = "https://marcin.ergonode.app/api/graphql/"

data = {
    'upload': open('C:\\temp\\temp.png', 'rb'),
    'query': (None, 'mutation{multimediaCreate(input:{name:"<choose_a_name>",folderPath: "<some_folder_path>"}){__typename}}')
}

headers = {
    'X-API-KEY': '<some_api_key>',
}

response = requests.post(url, files=data, headers=headers)

print (response.text)

Assign the template to a product

Both sku and template must already exist.

mutation {
  productSetTemplate(input: { sku: "SKU78", template: "template" }) {
    __typename
  }
}

Create a category

mutation {
  categoryCreate(
    input:{
      code: "category_name"
      name: {
        language:"pl_PL"
        value:"nazwa_kategorii"
      }
    }
  ) {
    __typename
  }
      
}

code - system name of the category

language - language code ex: pl_PL

value - translated name of the category (string)

Get attributes list by SKU

This is how you can query GraphQL API on product attributes by SKU

query product {
  product(sku: "SKU72") {
    sku
    attributeList {
      edges {
        node {
          attribute {
            code
            scope
            name {
              value
              language
            }
          }
        }
      }
    }
  }
}

Get category tree by category tree code

query {
  categoryTree(code: "<code_of_the_category_tree>") {
    code
    categoryTreeLeafList {
      pageInfo {
        hasNextPage
        endCursor
      }
      edges {
        node {
          category {
            code
          }
          parentCategory {
            code
          }
        }
      }
    }
  }
}

Create a product and assign / modify attributes values

This mutation assumes that below already exists in the system:

  • template with code template

  • textarea attribute with code description

  • textarea attribute with code short_description

  • text attribute with code text

  • pl_PL language is active

Note that each mutation is aliased (create: (...)). Aliasing is required if there are at least two same mutations in one batch - productAddAttributeValueTranslationsTextarea in this case.

For simplicity, all mutations have been aliased in the example but it'd also suffice to only alias duplicates.

mutation {
  create: productCreateSimple(input: {sku: "new_product", templateCode: "template"}) {
    __typename
  }
  assignDescription: productAddAttributeValueTranslationsTextarea(
    input: {
      sku: "new_product"
      attributeCode: "description"
      translations: [{ value: "Długi opis", language: "pl_PL" }]
    }
  ) {
    __typename
  }
  assignShortDescription: productAddAttributeValueTranslationsTextarea(
    input: {
      sku: "new_product"
      attributeCode: "short_description"
      translations: [{ value: "Krótki opis", language: "pl_PL" }]
    }
  ) {
    __typename
  }
  assignText: productAddAttributeValueTranslationsText(
    input: {
      sku: "new_product"
      attributeCode: "text"
      translations: [{ value: "wartość", language: "pl_PL" }]
    }
  ) {
    __typename
  }
}

Add a file to the product

mutation {
  productAddAttributeValueTranslationsFile(input: {
    sku:"SKU77"
    attributeCode:"file_test"
    translations:{
      language:"pl_PL"
      value:"bike-1.jpg"
    }
  })
  {__typename}
}

Product, attribute, and file must already exist

value - path to the file

The MultimediaPath scalar type represents a textual combination of MultimediaFolderName, and MultimediaName joined with '/' Multimedia identifier pointing to its exact location.

The path to the file can be found with this .

query

Set multiple options in multiselect attribute on specific product

mutation {
  productAddAttributeValueTranslationsMultiSelect(
    input: {
      sku: "product_2" # SKU of a product we want to set attribute options in
      attributeCode: "labels" # attribute code
      translations: [
        { value: ["test1", "test2"], language: "en_GB" } # options to set in a specific language
      ]
    }
  ) {
    __typename
  }
}

Get a specific category with values of the category attribute

Remember to change "buty" with your own category code (system name)

query catWithAttVal {
  category(code: "buty") {
    code
    attributeList {
      pageInfo {
        hasNextPage
        endCursor
      }
      edges {
        node {
          ...AttributeValue
        }
      }
    }
  }
}

fragment AttributeValue on AttributeValue {
  __typename
  attribute {
    code
    name {
      language
      value
    }
  }
  ... on TextAttributeValue {
    textAttributeValueTranslations: translations {
      value
      language
    }
  }
  ... on TextareaAttributeValue {
    textareaAttributeValueTranslations: translations {
      value
      language
    }
  }
  ... on DateAttributeValue {
    dateAttributeValueTranslations: translations {
      value
      language
    }
  }
  ... on UnitAttributeValue {
    unitAttribute: attribute {
      # unit might be useful in the value context
      unit {
        name
        symbol
      }
    }
    unitAttributeValueTranslations: translations {
      value
      language
    }
  }
  ... on PriceAttributeValue {
    priceAttribute: attribute {
      # currency might be useful in the price context
      currency
    }
    priceAttributeValueTranslations: translations {
      value
      language
    }
  }
  ... on NumberAttributeValue {
    numericAttributeValueTranslations: translations {
      value
      language
    }
  }
  ... on ProductRelationAttributeValue {
    productRelationAttributeValueTranslations: translations {
      value {
        sku
      }
      language
    }
  }
  ... on FileAttributeValue {
    fileAttributeValueTranslations: translations {
      value {
        ...Multimedia
      }
      language
    }
  }
  ... on GalleryAttributeValue {
    galleryAttributeValueTranslations: translations {
      value {
        ...Multimedia
      }
      language
    }
  }
  ... on ImageAttributeValue {
    imageAttributeValueTranslations: translations {
      value {
        ...Multimedia
      }
      language
    }
  }
  ... on MultiSelectAttributeValue {
    multiSelectAttributeValueTranslations: translations {
      translatedValue {
        ...OptionTranslatedValue
      }
      language
    }
  }
  ... on SelectAttributeValue {
    selectAttributeValueTranslations: translations {
      translatedValue {
        ...OptionTranslatedValue
      }
      language
    }
  }
}
fragment Multimedia on Multimedia {
  path
  name
  extension
  mime
  size
  alt {
    value
    language
  }
  title {
    value
    language
  }
  url
}
fragment OptionTranslatedValue on OptionTranslatedValue {
  code
  name
}
477KB
integration_api_graphpql_introspection.json

Add option to select type attribute

Please keep in mind that to add the option attribute "Model" must first exist.

mutation {
  attributeSelectAddOption(
    input: {
      code: "Model"
      option: {
        code: "eve_1011"
        name: { language: "pl_PL", value: "eve_1011" }
      }
    }
  ) {
    __typename
  }
}