GET /wp-json/content-api/v1/product/brands/
Retrieves all product brands.
Content API Version: 1.0.1
Authentication
This endpoint requires a Bearer token in the Authorization
header. To authenticate:
- Go to Content API > Settings in your WordPress admin panel.
- Set a secure token in the “Token” field and save it.
- Include the token in your request header as follows:
Authorization: Bearer
Replace
with the token you configured.
Parameters
Name | Type | Description | Required |
---|---|---|---|
taxonomy | string | Taxonomy name (defaults to product_brand ) |
No |
limit | integer | Maximum number of brands to return (returns all if not defined) | No |
Example Request
GET /wp-json/content-api/v1/product/brands/?taxonomy=product_brand&limit=10
Example Response
{
"success": true,
"data": [
{
"id": 1,
"name": "Brand A",
"slug": "brand-a",
"count": 10
},
{
"id": 2,
"name": "Brand B",
"slug": "brand-b",
"count": 5
}
]
}
Possible Errors
Code | Message | Description | HTTP Status |
---|---|---|---|
get_terms_failed | Failed to get product brands | An error occurred while retrieving the product brands. | 500 |
not_authorized | Not Authorized | The provided Bearer token is invalid or does not match the configured token. | 401 |