customerProductDetails
Requires a customer (portal or buyer app) session.
Returns several active products in one call, each shaped like customerProductDetail. Ids that are not active products are left out. At most 20 ids per call.
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 CustomerProductDetails($productIds: [ID!]!) {
customerProductDetails(productIds: $productIds) {
id
name
brandName
createdAt
brandId
canAddToCart
variants {
id
QRCode
name
attributes
availableQuantity
barcode
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CustomerProductDetails($productIds: [ID!]!) {\n customerProductDetails(productIds: $productIds) {\n id\n name\n brandName\n createdAt\n brandId\n canAddToCart\n variants {\n id\n QRCode\n name\n attributes\n availableQuantity\n barcode\n }\n }\n}",
"variables": {
"productIds": [
"id"
]
}
}
EOF
Variables:
{
"productIds": [
"id"
]
}
Response:
{
"data": {
"customerProductDetails": [
{
"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"
}
]
}
]
}
}
customerProductDetails(
productIds: [ID!]!
): [CustomerProductDetail!]!
Arguments
customerProductDetails.productIds ● [ID!]! non-null scalar
The IDs of the products to return.
Type
CustomerProductDetail object
A product as a buyer sees it on its page.