Products Mutations

CreateProduct

Creates a new product (parent). Variants can be passed in variants parameter.

Parameters:

ParameterTypeDescription
inputProductInput!Product data.

Example Query:

mutation CreateProduct($input: ProductInput!) {
  CreateProduct(input: $input) {
    id
    label
    active
  }
}

Example Variables:

{
  "input": {
    "label": "Basic Tee",
    "active": true,
    "description": "High quality basic tee.",
    "variants": {
        "data": [
            { "sku": "TSH-W", "label": "White Tee" },
            { "sku": "TSH-B", "label": "Black Tee" }
        ]
    }
  }
}

UpdateProduct

Updates an existing product.

Parameters:

ParameterTypeDescription
idInt!ID of the product.
inputProductInput!Updated data.

Example Query:

mutation UpdateProduct($id: ID!, $input: ProductInput!) {
  UpdateProduct(id: $id, input: $input) {
    id
    active
  }
}

DeleteProduct / DeleteProducts

Deletes one or multiple products.


DisableProduct / DisableProducts

Deactivates one or multiple products, removing them from active sale screens but keeping historical data.


EnableProduct / EnableProducts

Re-activates disabled products.


DuplicateProduct

Creates a copy of the specified product along with its attributes.

Parameters:

ParameterTypeDescription
idInt!ID of the product to duplicate.
inputVariantInputCustom variant details for the duplicated product.

PublishProductToB2bStore / PublishProductsToB2bStore

Makes a product or multiple products visible and available in the B2B store.

Parameters:

ParameterTypeDescription
idInt!Single product ID.
ids[ID!]!List of product IDs.

UnpublishProductFromB2bStore / UnpublishProductsFromB2bStore

Hides a product or multiple products from the B2B store.


UploadProductImage

Uploads a new image directly to the product.

Parameters:

ParameterTypeDescription
fileTmpBucketFileInput!Image file.
typeProductImageTypeIdentifies as productImage.

Input Data Types

ProductInput

FieldTypeDescription
idIDID.
labelStringName of the product.
activeBooleanProduct status.
descriptionStringPublic description.
country_of_originStringCountry of origin code.
supplier_descriptionStringPrivate supplier notes.
default_supplier_idIDDefault supplier ID.
brandBrandInputBrand assignment.
options[OptionProductInput]Mapping to attribute options.
variantsProductVariantInputList of variants.
suppliersProductSupplierInputLinked suppliers.
product_tags[ProductTagInput]Linked product tags.
seasons[SeasonInput]Linked seasons.
images[FileInput]Assigned images.
custom_fields[EntityCustomFieldInput]Custom fields for this entity.

ProductVariantInput

FieldTypeDescription
data[VariantInput]List of variants.

ProductSupplierInput

FieldTypeDescription
data[SupplierInput]List of suppliers.

OptionProductInput

FieldTypeDescription
idIDID of the option product relation.
optionOptionInputOption data.
weightIntRendering order.

Enums

ProductImageType

ValueDescription
productImageStandard product image.