Documentation is still being updated. Some content maybe unfinished.
curl --request GET \
--url {protocol}://{host}/wp-json/cocart/v2/products/attributes[
{
"id": 1,
"name": "Size",
"position": 0,
"visible": true,
"variation": true,
"options": [
"Small",
"Medium",
"Large",
"X-Large",
"2X-Large"
]
},
{
"id": 2,
"name": "Color",
"position": 1,
"visible": true,
"variation": true,
"options": [
"Red",
"Blue",
"Green",
"Black",
"White",
"Navy Blue",
"Gray"
]
},
{
"id": 3,
"name": "Material",
"position": 2,
"visible": true,
"variation": false,
"options": [
"Cotton",
"Polyester",
"Wool",
"Silk"
]
}
]Gets a list of product attributes.
A valid request URL is required to generate request examples[
{
"id": 1,
"name": "Size",
"position": 0,
"visible": true,
"variation": true,
"options": [
"Small",
"Medium",
"Large",
"X-Large",
"2X-Large"
]
},
{
"id": 2,
"name": "Color",
"position": 1,
"visible": true,
"variation": true,
"options": [
"Red",
"Blue",
"Green",
"Black",
"White",
"Navy Blue",
"Gray"
]
},
{
"id": 3,
"name": "Material",
"position": 2,
"visible": true,
"variation": false,
"options": [
"Cotton",
"Polyester",
"Wool",
"Silk"
]
}
]Product attributes retrieved successfully.
Attribute ID.
Attribute name.
Attribute position.
Define if the attribute is visible on the "Additional information" tab in the product's page.
Define if the attribute can be used as variation.
List of available term names of the attribute.
Was this page helpful?