Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 1.35 KB

product-attribute-terms.md

File metadata and controls

46 lines (35 loc) · 1.35 KB

Product Attribute Terms API

GET /products/attributes/:id/terms
GET /products/attributes/:id/terms&orderby=slug
Attribute Type Required Description
id integer Yes The ID of the attribute to retrieve terms for.
order string no Order ascending or descending. Allowed values: asc, desc
orderby string no Sort collection by object attribute. Allowed values: name, slug, count.
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
	}
]

We're hiring! Come work with us!

🐞 Found a mistake, or have a suggestion? Leave feedback about this document here.