Skip to main content

customerProductBySku

Requires a customer (portal or buyer app) session.

Finds the active product that has a variant with the given SKU and returns it with that variant.

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:

query CustomerProductBySku($sku: String!) {
customerProductBySku(sku: $sku) {
id
name
brandName
createdAt
brandId
canAddToCart
variants {
id
QRCode
name
attributes
availableQuantity
barcode
}
}
}

Variables:

{
"sku": "string"
}

Response:

{
"data": {
"customerProductBySku": {
"id": "id",
"name": "string",
"brandName": "string",
"createdAt": "2025-01-15T00:00:00Z",
"brandId": "string",
"canAddToCart": true,
"variants": [
{
"id": "id",
"QRCode": "string",
"name": "string",
"attributes": "string",
"availableQuantity": 0,
"barcode": "string"
}
]
}
}
}
customerProductBySku(
sku: String!
): CustomerProductDetail!

Arguments​

customerProductBySku.sku ● String! non-null scalar​

The SKU to look up.

Type​

CustomerProductDetail object​

A product as a buyer sees it on its page.