Access variant-specific pricing across price levels.
query GetVariantPrice($id: ID!) {
VariantPrice(id: $id) {
id
amount
currency { id label }
company_id
variant { id label }
priceable {
... on Customer { id label }
... on Supplier { id label }
... on PriceLevel { id label }
}
priceable_type
}
}
query VariantPrices(
$where: QueryVariantPricesWhereWhereConditions,
$orderBy: [QueryVariantPricesOrderByOrderByClause!],
$search: String,
$first: Int,
$page: Int
) {
VariantPrices(
where: $where,
orderBy: $orderBy,
search: $search,
first: $first,
page: $page
) {
paginatorInfo {
total
currentPage
}
data {
id
amount
currency { id label }
priceable_type
}
}
}
| Field | Type | Description |
|---|
id | Int | Unique identifier. |
amount | Float | Price amount. |
currency | Currency | Linked currency. |
company_id | Int | Company identifier. |
variant | Variant | Linked variant. |
priceable | Priceable | Linked entity (Customer, Supplier, or PriceLevel). |
priceable_type | VariantPriceType | Type of priceable entity (Customer, Supplier, or PriceLevel). |
| Field | Example |
|---|
id | { "column": "ID", "operator": "EQ", "value": 100012 } |
currency | { "column": "CURRENCY", "operator": "EQ", "value": "EUR" } |
company_id | { "column": "COMPANY_ID", "operator": "EQ", "value": 100001 } |
variant_id | { "column": "VARIANT_ID", "operator": "EQ", "value": 100076 } |
variant_label | { "column": "VARIANT_LABEL", "operator": "LIKE", "value": "%Product%" } |
variant_sku | { "column": "VARIANT_SKU", "operator": "EQ", "value": "SKU-001" } |
priceable_id | { "column": "PRICEABLE_ID", "operator": "EQ", "value": 100001 } |
priceable_type | { "column": "PRICEABLE_TYPE", "operator": "EQ", "value": "Customer" } |
The Priceable union can be one of:
Customer
Supplier
PriceLevel
| Field | Type | Description |
|---|
from_quantity | Float! | Minimum quantity for this price tier (required). |
amount | Float! | Price amount for this tier (required). |
| Value | Description |
|---|
Customer | Customer entity. |
Supplier | Supplier entity. |
PriceLevel | Price level entity. |