Skip to content

Latest commit

 

History

History
81 lines (60 loc) · 1.63 KB

product-attributes.md

File metadata and controls

81 lines (60 loc) · 1.63 KB

Product Attributes API

Table of Contents

List Product Attributes

GET /products/attributes

There are no parameters required for this endpoint.

curl "https://example-store.com/wp-json/wc/store/v1/products/attributes"

Example response:

[
	{
		"id": 1,
		"name": "Color",
		"taxonomy": "pa_color",
		"type": "select",
		"order": "menu_order",
		"has_archives": false
	},
	{
		"id": 2,
		"name": "Size",
		"taxonomy": "pa_size",
		"type": "select",
		"order": "menu_order",
		"has_archives": false
	}
]

Single Product Attribute

Get a single attribute taxonomy.

GET /products/attributes/:id
Attribute Type Required Description
id integer Yes The ID of the attribute to retrieve.
curl "https://example-store.com/wp-json/wc/store/v1/products/attributes/1"

Example response:

{
	"id": 1,
	"name": "Color",
	"taxonomy": "pa_color",
	"type": "select",
	"order": "menu_order",
	"has_archives": false
}

We're hiring! Come work with us!

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