CreateProduct
CreateProductCreates a new product (parent). Variants can be passed in variants parameter.
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | ProductInput! | 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
UpdateProductUpdates an existing product.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | Int! | ID of the product. |
input | ProductInput! | Updated data. |
Example Query:
mutation UpdateProduct($id: ID!, $input: ProductInput!) {
UpdateProduct(id: $id, input: $input) {
id
active
}
}DeleteProduct / DeleteProducts
DeleteProduct / DeleteProductsDeletes one or multiple products.
DisableProduct / DisableProducts
DisableProduct / DisableProductsDeactivates one or multiple products, removing them from active sale screens but keeping historical data.
EnableProduct / EnableProducts
EnableProduct / EnableProductsRe-activates disabled products.
DuplicateProduct
DuplicateProductCreates a copy of the specified product along with its attributes.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | Int! | ID of the product to duplicate. |
input | VariantInput | Custom variant details for the duplicated product. |
PublishProductToB2bStore / PublishProductsToB2bStore
PublishProductToB2bStore / PublishProductsToB2bStoreMakes a product or multiple products visible and available in the B2B store.
Parameters:
UnpublishProductFromB2bStore / UnpublishProductsFromB2bStore
UnpublishProductFromB2bStore / UnpublishProductsFromB2bStoreHides a product or multiple products from the B2B store.
UploadProductImage
UploadProductImageUploads a new image directly to the product.
Parameters:
| Parameter | Type | Description |
|---|---|---|
file | TmpBucketFileInput! | Image file. |
type | ProductImageType | Identifies as productImage. |
Input Data Types
ProductInput
ProductInput| Field | Type | Description |
|---|---|---|
id | ID | ID. |
label | String | Name of the product. |
active | Boolean | Product status. |
description | String | Public description. |
country_of_origin | String | Country of origin code. |
supplier_description | String | Private supplier notes. |
default_supplier_id | ID | Default supplier ID. |
brand | BrandInput | Brand assignment. |
options | [OptionProductInput] | Mapping to attribute options. |
variants | ProductVariantInput | List of variants. |
suppliers | ProductSupplierInput | Linked suppliers. |
product_tags | [ProductTagInput] | Linked product tags. |
seasons | [SeasonInput] | Linked seasons. |
images | [FileInput] | Assigned images. |
custom_fields | [EntityCustomFieldInput] | Custom fields for this entity. |
ProductVariantInput
ProductVariantInput| Field | Type | Description |
|---|---|---|
data | [VariantInput] | List of variants. |
ProductSupplierInput
ProductSupplierInput| Field | Type | Description |
|---|---|---|
data | [SupplierInput] | List of suppliers. |
OptionProductInput
OptionProductInput| Field | Type | Description |
|---|---|---|
id | ID | ID of the option product relation. |
option | OptionInput | Option data. |
weight | Int | Rendering order. |
Enums
ProductImageType
ProductImageType| Value | Description |
|---|---|
productImage | Standard product image. |
