Skip to content

returnExchangeOptions

Queryin Return

What a line of one of the customer's own orders can be exchanged for: the other variants of its product that are in stock and cost no more than was paid. Empty for a business unit's order. Another product can be chosen too, by its sku, under the same rules.

Arguments

ArgumentTypeDescription
orderIdID!
lineItemIdID!

Returns

[ProductVariant!]!

FieldTypeDescription
idID!Unique identifier for the variant
availabilityProductAvailabilityTypeAvailability status of the variant
nameStringThe name of the variant.
descriptionStringThe variant description, can be formatted using Markdown.
skuStringThe SKU (stock keeping unit) for the variant.
eanStringEuropean Article Number (EAN)
mpnStringThe manufacturer's part number (MPN).
hscodeStringHarmonized System (HS) code for the variant.
primaryImageProductImageThe main image associated with the product variant.
images[ProductImage!]All images associated with the product variant.
priceTaxedPriceThe price on the platform after regular product discounts are applied, it's the price communicated to the customer in the storefront.
regularPriceTaxedPriceThe regular selling price on the platform, potentially already discounted from the MSRP. It's the standard price at which the product is usually offered when there are no special sales or additional discounts.
listPriceTaxedPriceRepresents the list price, also known as te Manufacturer's Suggested Retail Price (MSRP). It's the highest price shown and could be used as the strikethrough price to indicate the original value of the product before any discounts.
unitStringThe name of the unit the variant is sold in, such as piece, box or metre, in the store's language, without a quantity: how many go in one is the quantityRule step. Null where the catalog does not say.
documents[ProductDocument!]!The variant's documents, such as its datasheet and declaration of conformity, in catalog order. Empty where it has none.
accessories[ProductAccessory!]!The accessories and spare parts sold for this variant, in catalog order. One that cannot be sold in the store is left out.
complementaryProducts[ProductVariant!]!Products to buy alongside this variant, such as socks with shoes, each as the variant it is sold as, in catalog order, so its price and stock are the ones a buyer gets; its product, and that product's slug, link to its page. One that cannot be sold in the store, or is out of stock, is left out. Empty where the catalog lists none.
lowestPriceTaxedPriceThe lowest price of the 30 days before the current discount, which EU price-indication rules require beside a reduction. Null when the variant is not discounted, and where the engine has no record of it.
specifications[ProductSpecificationGroup!]Specifications for this variant. These reflect predefined groups of attributes that can be used to describe the variant on the frontend.
highlightedSpecifications[ProductSpecificationAttribute!]Highlighted specifications for this variant. These are a subset of the full specifications that are particularly important or relevant for the product. They are often used to highlight key features in the product detail view.
productProductBacklink to the product. This is useful for the frontend to fetch product information if the entrypoint was the variant.
ribbonProductRibbonThe ribbon. For example: 'Boeket van de maand' etc.
dimensions[Dimension!]!The dimensions specific to the product variant. Used to display the dimensions of the variant.
priceTiers[ProductPriceTier!]The unit price at each order quantity, lowest quantity first, for a tier table. Empty when the price has no tiers; null when the engine does not tell.
stockByWarehouse[WarehouseStock!]Stock per warehouse, for a buyer who chooses where to order from. Null when stock is not kept per warehouse.
kindProductKindTypeWhether the variant is shipped or delivered digitally, so a storefront can drop the quantity selector and shipping promises for a digital one. Null when the engine does not tell.
stockProductVariantStockHow much of the variant is in stock, for a storefront to say so. Null when no stock is tracked for it, or when it is not for sale.
inStockAlternativeProductVariantThe variant of the same product most like this one that is in stock, such as the same colour in another size. Null when this one is in stock, or when no other variant is.
quantityRuleProductVariantQuantityRuleHow many of the variant can be ordered on one line, for a quantity stepper before it is in the cart. Null when the engine does not tell.
deliveryPromiseDeliveryPromiseWhen this variant arrives if it is ordered now, at a country and optional postal code: the earliest date, the deadline to order for it, the carrier and the price. The same source as the cart's delivery dates, so the product page promises what checkout offers. Null when the delivery provider makes no promises.Arguments: country, postalCode

Example

query ReturnExchangeOptions($orderId: ID!, $lineItemId: ID!) {
returnExchangeOptions(orderId: $orderId, lineItemId: $lineItemId) {
id
availability
name
description
sku
ean
mpn
hscode
primaryImage {
url
alt
description
}
images {
url
alt
description
}
price {
__typename
}
regularPrice {
__typename
}
listPrice {
__typename
}
unit
documents {
kind
name
url
contentType
size
locale
}
accessories {
kind
}
complementaryProducts {
id
availability
name
description
sku
ean
mpn
hscode
unit
kind
}
lowestPrice {
__typename
}
specifications {
name
label
description
}
highlightedSpecifications {
__typename
... on ProductSpecificationStringAttribute {
name
label
value
description
}
... on ProductSpecificationNumberAttribute {
name
label
value
description
}
... on ProductSpecificationBooleanAttribute {
name
label
value
description
}
}
product {
id
slug
name
brand
}
ribbon {
kind
label
}
dimensions {
key
label
value
valueLabel
}
priceTiers {
minimumQuantity
}
stockByWarehouse {
availableQuantity
expectedAvailableDate
}
kind
stock {
level
lowStockQuantity
expectedAvailableDate
}
inStockAlternative {
id
availability
name
description
sku
ean
mpn
hscode
unit
kind
}
quantityRule {
minimum
maximum
step
}
}
}

The query selects the return type's fields two levels deep; pick the ones you need. The response shows its shape with placeholder values.

Served by

@evolve-framework/commercetoolsResolved

Used by

The storefront packages that send it, in these GraphQL documents: