Variants Mutations

CreateVariant

Creates a new variation logic for an existing product.

Parameters:

ParameterTypeDescription
inputVariantInput!All variant data.

Example Query:

mutation CreateVariant($input: VariantInput!) {
  CreateVariant(input: $input) {
    id
    sku
    label
    active
  }
}

UpdateVariant

Updates an existing variant record.

Parameters:

ParameterTypeDescription
idInt!ID of the variant document.
inputVariantInput!Fields to update.

DeleteVariant

Deletes a variant. Note that variants with history might be soft-deleted.


DisableVariant / EnableVariant

Manages the active status of a variant without deleting its history.


DuplicateVariant

Creates a full copy of an existing variant within its parent product.


EnableVariantsWeight

Bulk updates the weight value for multiple variants.

ParameterTypeDescription
input[VariantWeightInput!]!List of variant IDs and their weights.

PublishVariantsToB2bStore / UnpublishVariantsFromB2bStore

Manages visibility of multiple variants in the B2B store.


Input Data Types

VariantInput

FieldTypeDescription
idIntID for updates.
productProductIDInputParent product link.
labelStringName of the variant.
skuStringStock Keeping Unit identifier.
barcodeStringProduct barcode (EAN, UPC, etc.).
typevariantTypeVariant classification.
track_inventoryBooleanEnable/disable inventory tracking.
has_batch_numbersBooleanEnable/disable batch/lot tracking.
has_serial_numbersBooleanEnable/disable serial number tracking.
charge_taxBooleanApply taxes on sales.
country_of_originStringOrigin country for customs.
ecotaxFloatEnvironmental tax value.
minimum_quantityFloatOrder minimum requirement.
kit_discountFloatDiscount applied if part of a kit.
initial_costFloatStarting unit cost.
purchase_price_amountFloatPurchase price amount.
purchase_price_currencyCurrencyInputPurchase price currency.
weight_amountFloatNumerical weight value.
weight_unitStringWeight unit (kg, lbs).
weightFloatNormalized weight value.
initial_stock_levelFloatFirst stock count (Creation only).
initial_locationLocationInputFirst location (Creation only).
initial_bin_locationStringFirst bin location (Creation only).
initial_reorder_pointFloatFirst alert threshold (Creation only).
stock_levelsVariantStockLevelInputMultiple 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_familyAccountingFamilyInputAccounting link.
b2b_publishedBooleanAvailability in B2B store.
manufacturing_routingProductVariantIDInputProduction routing identifier.
unit_manufacturing_costFloatProduction unit cost.
components[VariantComponentInput]Parts list for kits/assemblies.
hs_codeHsCodeInputHarmonized System code link.
custom_fields[EntityCustomFieldInput]Custom fields for this entity.

VariantWeightInput

FieldTypeDescription
idID!ID of the variant record.
weightFloatPrecise weight value.

SupplierSkusInput

FieldTypeDescription
idIDID for the link record.
supplier_skuStringSKU used by the supplier.
minimum_quantityFloatMinimum purchase order count.

VariantStockLevelInput

FieldTypeDescription
data[StockLevelInput]List of stock level updates.

StockLevelInput

FieldTypeDescription
idIDID for existing level update.
locationLocationInputWarehouse link.
bin_locationStringStorage shelf/bin.
reorder_pointFloatLow stock threshold.
on_handFloatInitial physical stock.

Enums

variantType

ValueDescription
normalStandard physical product.
kitVirtual item combination.
assemblyManufactured product.
packagingLogistics material.
serviceNon-tangible service.