CreateVariant
CreateVariantCreates a new variation logic for an existing product.
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | VariantInput! | All variant data. |
Example Query:
mutation CreateVariant($input: VariantInput!) {
CreateVariant(input: $input) {
id
sku
label
active
}
}UpdateVariant
UpdateVariantUpdates an existing variant record.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | Int! | ID of the variant document. |
input | VariantInput! | Fields to update. |
DeleteVariant
DeleteVariantDeletes a variant. Note that variants with history might be soft-deleted.
DisableVariant / EnableVariant
DisableVariant / EnableVariantManages the active status of a variant without deleting its history.
DuplicateVariant
DuplicateVariantCreates a full copy of an existing variant within its parent product.
EnableVariantsWeight
EnableVariantsWeightBulk updates the weight value for multiple variants.
| Parameter | Type | Description |
|---|---|---|
input | [VariantWeightInput!]! | List of variant IDs and their weights. |
PublishVariantsToB2bStore / UnpublishVariantsFromB2bStore
PublishVariantsToB2bStore / UnpublishVariantsFromB2bStoreManages visibility of multiple variants in the B2B store.
Input Data Types
VariantInput
VariantInput| Field | Type | Description |
|---|---|---|
id | Int | ID for updates. |
product | ProductIDInput | Parent product link. |
label | String | Name of the variant. |
sku | String | Stock Keeping Unit identifier. |
barcode | String | Product barcode (EAN, UPC, etc.). |
type | variantType | Variant classification. |
track_inventory | Boolean | Enable/disable inventory tracking. |
has_batch_numbers | Boolean | Enable/disable batch/lot tracking. |
has_serial_numbers | Boolean | Enable/disable serial number tracking. |
charge_tax | Boolean | Apply taxes on sales. |
country_of_origin | String | Origin country for customs. |
ecotax | Float | Environmental tax value. |
minimum_quantity | Float | Order minimum requirement. |
kit_discount | Float | Discount applied if part of a kit. |
initial_cost | Float | Starting unit cost. |
purchase_price_amount | Float | Purchase price amount. |
purchase_price_currency | CurrencyInput | Purchase price currency. |
weight_amount | Float | Numerical weight value. |
weight_unit | String | Weight unit (kg, lbs). |
weight | Float | Normalized weight value. |
initial_stock_level | Float | First stock count (Creation only). |
initial_location | LocationInput | First location (Creation only). |
initial_bin_location | String | First bin location (Creation only). |
initial_reorder_point | Float | First alert threshold (Creation only). |
stock_levels | VariantStockLevelInput | Multiple location stock levels (Updates). |
attributes | [AttributeVariantInput] | Attribute values. |
suppliers | [SupplierSkusInput] | Supplier SKU associations. |
tax_codes | [TaxCodeInput] | Tax specific rules. |
variant_prices | [VariantPriceInput] | Price level definitions. |
variant_images | [FileInput] | Variant-specific attachments. |
accounting_family | AccountingFamilyInput | Accounting link. |
b2b_published | Boolean | Availability in B2B store. |
manufacturing_routing | ProductVariantIDInput | Production routing identifier. |
unit_manufacturing_cost | Float | Production unit cost. |
components | [VariantComponentInput] | Parts list for kits/assemblies. |
hs_code | HsCodeInput | Harmonized System code link. |
custom_fields | [EntityCustomFieldInput] | Custom fields for this entity. |
VariantWeightInput
VariantWeightInputSupplierSkusInput
SupplierSkusInputVariantStockLevelInput
VariantStockLevelInput| Field | Type | Description |
|---|---|---|
data | [StockLevelInput] | List of stock level updates. |
StockLevelInput
StockLevelInput| Field | Type | Description |
|---|---|---|
id | ID | ID for existing level update. |
location | LocationInput | Warehouse link. |
bin_location | String | Storage shelf/bin. |
reorder_point | Float | Low stock threshold. |
on_hand | Float | Initial physical stock. |
Enums
variantType
variantType| Value | Description |
|---|---|
normal | Standard physical product. |
kit | Virtual item combination. |
assembly | Manufactured product. |
packaging | Logistics material. |
service | Non-tangible service. |
