Query product variants including stock levels, pricing, attributes, and barcode data.
Variant — Returns a single variant by id
Variant — Returns a single variant by idquery GetVariant($id: ID!) {
Variant(id: $id) {
id
label
sku
barcode
active
track_inventory
unit_cost
on_hand
product { id label }
attributes {
attribute { id label }
}
}
}Variants — Returns a paginated list of variants with sorting and filters
Variants — Returns a paginated list of variants with sorting and filtersquery Variants(
$where: QueryVariantsWhereWhereConditions,
$orderBy: [QueryVariantsOrderByOrderByClause!],
$search: String,
$first: Int,
$page: Int,
$trashed: Trashed
) {
Variants(
where: $where,
orderBy: $orderBy,
search: $search,
first: $first,
page: $page,
trashed: $trashed
) {
paginatorInfo {
total
currentPage
}
data {
id
sku
label
available
product { label }
}
}
}Available fields
| Field | Type | Description |
|---|---|---|
id | Int | Unique identifier. |
label | String | Variant name (Product Parent + Attributes). |
sku | String | Stock Keeping Unit (unique identifier for the variant). |
barcode | String | EAN/UPC or internal barcode. |
active | Boolean | True if the variant is active. |
track_inventory | Boolean | True if stock levels are tracked. |
type | VariantType | Variant classification (Normal, Kit, Assembly, etc.). |
initial_cost | Float | Cost set during creation. |
unit_cost | Float | Moving Average Cost (MAC). |
last_cost | Float | Price from the most recent purchase. |
unit_manufacturing_cost | Float | Cost associated with assembly/production. |
charge_tax | Boolean | True if sales tax applies. |
ecotax | Float | Environmental tax amount. |
minimum_quantity | Float | Minimum order quantity. |
kit_discount | Float | Discount percentage for kit components. |
weight_amount | Float | Physical weight value. |
weight_unit | String | Unit for weight (kg, g, lbs, etc.). |
weight | Float | Calculated total weight. |
has_batch_numbers | Boolean | True if variant uses batch/lot tracking. |
shipped_this_month | Float | Quantity sold/shipped in the current month (filtered by location). |
shipped_this_month_all_locations | Float | Global quantity sold/shipped this month. |
last_sold_date | String | Date of last registered sale. |
on_hand | Float | Aggregate physical stock (takes location_ids argument). |
available | Float | Aggregate sellable stock (takes location_ids argument). |
incoming | Float | Aggregate pending stock from purchases. |
reserved | Float | Aggregate committed stock from sales. |
bin_location | String | Primary storage bin (filtered by location). |
reorder_point | Float | Low stock alert threshold. |
location_label | String | Name of the primary warehouse. |
valuation | Float | Monetary value of current stock. |
product | Product | Parent product link. |
attributes | [AttributeVariant] | List of attributes (Size, Color, etc.). |
stock_levels | [StockLevel] | Inventory details by location. |
batch_numbers | [BatchNumber] | Linked batch/lot history. |
price | Price | Dynamic sell price (takes filters as arguments). |
recommended_price | Price | MSRP or suggested price. |
variant_prices | [VariantPrice] | Price list entries. |
suppliers | [SupplierSku] | Supplier associations and SKUs. |
tax_codes | [TaxCode] | Applied tax configurations. |
integrations | [Integration] | Platform synchronization data. |
bill_of_materials | [BillOfMaterial] | Manufacturing recipe for assemblies. |
components | [VariantComponent] | Parts list for kits/assemblies. |
image | File | Primary variant image. |
cover_image | String | URL to primary image. |
variant_images | [File] | List of images specific to this variant. |
accounting_family | AccountingFamily | Linked accounting category. |
custom_fields | [EntityCustomField] | Custom fields for this entity. |
Filters
The following fields can be used in the where parameter:
id, on_hand, label, sku, type, barcode, batch_number_barcode, active, available, incoming, reserved, created_at, updated_at, track_inventory, has_batch_numbers, location_id, bin_location, supplier_id, product_supplier_id, supplier_sku, product_id, shipped_this_month, last_sold_date, attribute_id.
Example Filters:
| Field | Example |
|---|---|
sku | { "column": "SKU", "operator": "EQ", "value": "TSH-RED-XL" } |
available | { "column": "AVAILABLE", "operator": "GT", "value": 0 } |
product_id | { "column": "PRODUCT_ID", "operator": "EQ", "value": 100050 } |
trashed | Filter by trashed status. Accepts ALL, TRASHED, or NOT_TRASHED. |
Sorting
You can sort results using the orderBy parameter:
id,label,sku,product_id,barcode,track_inventory,initial_cost,unit_cost,weight_amount,weight_unit,active,created_at,updated_at,shipped_this_month,on_hand,available,incoming,reserved,last_sold_date,bin_location.
DocumentLineItemPrices
DocumentLineItemPricesReturns calculated prices for line items in a document context (considering customer, price level, season, etc.).
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | DocumentLineItemPricesInput! | Pricing context. |
Example Query:
query GetDocumentLineItemPrices($input: DocumentLineItemPricesInput!) {
DocumentLineItemPrices(input: $input) {
line_item_id
variant_id
amount
computed
supplier_price_tiers {
from_quantity
amount
}
}
}Example Variables:
{
"input": {
"customer_id": 1001,
"dated_at": "2026-01-15",
"line_items": [
{ "variant_id": 5001, "quantity": 10 },
{ "variant_id": 5002, "quantity": 5 }
]
}
}| Field | Type | Description |
|---|---|---|
line_item_id | ID | ID of the line item. |
variant_id | Int! | ID of the product variant. |
amount | Float | Calculated price. |
computed | Boolean | Whether the price was computed by the system. |
supplier_price_tiers | [SupplierVariantPriceTier] | Supplier price tiers for the variant. |
Data Types
Price
PriceSupplierSku
SupplierSkuSupplierVariantPriceTier
SupplierVariantPriceTierDocumentLineItemPricesInput
DocumentLineItemPricesInputDocumentLineItemPrice
DocumentLineItemPrice| Field | Type | Description |
|---|---|---|
line_item_id | ID | ID of the linked line item. |
variant_id | Int! | ID of the product variant. |
amount | Float | Calculated price amount. |
computed | Boolean | Whether the price was auto-computed. |
supplier_price_tiers | [SupplierVariantPriceTier] | Supplier price tiers for this variant. |
location_ids | [Int] | Location IDs for stock pricing. |
dated_at | Date | Date for pricing context. |
season_id | Int | Season ID for seasonal pricing. |
discount | Float | Discount percentage. |
line_items | [DocumentLineItemPriceInput!]! | Line items to price. |
DocumentLineItemPriceInput
DocumentLineItemPriceInputEnums
VariantType
VariantType| Value | Description |
|---|---|
normal | Physical item. |
kit | Virtual bundle. |
assembly | Manufactured product. |
packaging | Logistics material. |
service | Non-tangible service. |
StockFromLocationsType
StockFromLocationsType| Value | Description |
|---|---|
ALL | Stock from all locations. |
ACTIVE | Stock from active locations only. |
INACTIVE | Stock from inactive locations only. |
