orderPadVariantPrices
Requires at least one of the permissions products:pricing:read, sales:quote:create or sales:sales_order:create.
Batch version of customerVariantPrice for the sales app's order pad. It prices up to 50 variant and unit requests in one call using the same pricing, and refuses a larger batch. Needs the pricing read permission, or the quote or sales order create permission. A customer outside your book is reported as not found.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query OrderPadVariantPrices($requests: [OrderPadVariantPriceRequestInput!]!) {
orderPadVariantPrices(requests: $requests) {
currencyCode
customerTierName
automaticDiscountAmount
automaticDiscountPercent
convertedAtRate
convertedFromBaseUnitPrice
appliedDiscounts {
id
code
name
type
discountAmount
fixedAmount
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query OrderPadVariantPrices($requests: [OrderPadVariantPriceRequestInput!]!) {\n orderPadVariantPrices(requests: $requests) {\n currencyCode\n customerTierName\n automaticDiscountAmount\n automaticDiscountPercent\n convertedAtRate\n convertedFromBaseUnitPrice\n appliedDiscounts {\n id\n code\n name\n type\n discountAmount\n fixedAmount\n }\n }\n}",
"variables": {
"requests": [
{
"variantId": "string"
}
]
}
}
EOF
Variables:
{
"requests": [
{
"variantId": "string"
}
]
}
Response:
{
"data": {
"orderPadVariantPrices": [
{
"currencyCode": "string",
"customerTierName": "string",
"automaticDiscountAmount": 0,
"automaticDiscountPercent": 0,
"convertedAtRate": 0,
"convertedFromBaseUnitPrice": 0,
"appliedDiscounts": [
{
"id": "string",
"code": "string",
"name": "string",
"type": "string",
"discountAmount": 0,
"fixedAmount": 0
}
]
}
]
}
}
orderPadVariantPrices(
currency: String
partnerId: String
requests: [OrderPadVariantPriceRequestInput!]!
): [CustomerVariantPrice!]!
Arguments
orderPadVariantPrices.currency ● String scalar
ISO 4217 currency code to price in.
orderPadVariantPrices.partnerId ● String scalar
The ID of the customer the prices are for. Optional: it only decides which discount schemes apply.
orderPadVariantPrices.requests ● [OrderPadVariantPriceRequestInput!]! non-null input
The variants and units to price, at most 50.
Type
CustomerVariantPrice object
The resolved single price for a variant (per selected UOM + qty), plus automatic-discount breakdown and the P1d line-pricing exposure.