Skip to main content

Product Attribute Terms API

GET /products/attributes/:id/terms
GET /products/attributes/:id/terms?orderby=slug
AttributeTypeRequiredDescription
idintegerYesThe ID of the attribute to retrieve terms for.
orderstringnoOrder ascending or descending. Allowed values: asc, desc
orderbystringnoSort collection by object attribute. Allowed values: id, name, name_num, slug, count, menu_order.
curl "https://example-store.com/wp-json/wc/store/v1/products/attributes/1/terms"

Example response:

[
{
"id": 22,
"name": "Blue",
"slug": "blue",
"count": 5
},
{
"id": 48,
"name": "Burgundy",
"slug": "burgundy",
"count": 1
}
]