Skip to main content

customerProductDetail

Requires a customer (portal or buyer app) session.

Returns one active product with its variants, units of measure, images, attributes and the signed-in customer's prices and stock.

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 CustomerProductDetail($productId: ID!) {
customerProductDetail(productId: $productId) {
id
name
brandName
createdAt
brandId
canAddToCart
variants {
id
QRCode
name
attributes
availableQuantity
barcode
}
}
}

Variables:

{
"productId": "id"
}

Response:

{
"data": {
"customerProductDetail": {
"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"
}
]
}
}
}
customerProductDetail(
addressId: ID
productId: ID!
): CustomerProductDetail!

Arguments​

customerProductDetail.addressId ● ID scalar​

Kept for compatibility; it does not change which prices or discounts apply.

customerProductDetail.productId ● ID! non-null scalar​

The ID of the product.

Type​

CustomerProductDetail object​

A product as a buyer sees it on its page.