Documentation is still being updated. Some content maybe unfinished.
curl --request GET \
--url {protocol}://{host}/wp-json/cocart/v1/products/categories[
{
"id": 123,
"name": "<string>",
"slug": "<string>",
"parent": 123,
"description": "<string>",
"display": "<string>",
"image": {
"id": 123,
"src": "<string>",
"name": "<string>",
"alt": "<string>"
},
"menu_order": 123,
"count": 123,
"links": {
"self": [
{
"href": "<string>"
}
],
"collection": [
{
"href": "<string>"
}
],
"up": [
{
"href": "<string>"
}
]
}
}
]Returns a list of product categories.
curl --request GET \
--url {protocol}://{host}/wp-json/cocart/v1/products/categories[
{
"id": 123,
"name": "<string>",
"slug": "<string>",
"parent": 123,
"description": "<string>",
"display": "<string>",
"image": {
"id": 123,
"src": "<string>",
"name": "<string>",
"alt": "<string>"
},
"menu_order": 123,
"count": 123,
"links": {
"self": [
{
"href": "<string>"
}
],
"collection": [
{
"href": "<string>"
}
],
"up": [
{
"href": "<string>"
}
]
}
}
]Scope under which the request is made; determines fields present in response.
view, embed Current page of the collection.
Maximum number of items to be returned in result set.
x <= 100Limit results to those matching a string.
Ensure result set excludes specific IDs.
Limit result set to specific IDs.
Offset the result set by a specific number of items.
Order sort attribute ascending or descending.
asc, desc Sort collection by object attribute.
id, include, name, slug, term_group, description, count Whether to hide resources not assigned to any products.
Limit result set to resources assigned to a specific parent.
Limit result set to resources assigned to a specific product.
Limit result set to resources with a specific slug.
List of product categories.
Unique identifier for the category.
Category name.
Category slug.
Parent category ID.
Category description.
Category display type.
Show child attributes
Menu order.
Number of products in the category.
Show child attributes
Was this page helpful?