Skip to main content

productAttributes

Requires permission products:product:read.

Lists the product attributes the organization's active variants carry, each value with how many variants carry it and the picture set for it. Requires permission to read products.

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 ProductAttributes {
productAttributes {
key
productCount
valuesTruncated
variantCount
values {
imageUrl
value
variantCount
}
}
}

Response:

{
"data": {
"productAttributes": [
{
"key": "string",
"productCount": 0,
"valuesTruncated": true,
"variantCount": 0,
"values": [
{
"imageUrl": "string",
"value": "string",
"variantCount": 0
}
]
}
]
}
}
productAttributes: [ProductAttribute!]!

Type​

ProductAttribute object​

A product attribute and its values.