GET /wp-json/content-api/v1/attributes/
Retrieves all products with their attributes.
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 <your-token-here>
Replace <your-token-here>
with the token you configured.
Parameters
No parameters required.
Example Request
GET /wp-json/content-api/v1/attributes/
Example Response
{
"success": true,
"data": [
{
"id": 456,
"name": "Sample Product",
"attributes": [
{
"name": "Color",
"value": ["Red", "Blue"]
}
]
}
]
}
Possible Errors
Code | Message | Description | HTTP Status |
---|---|---|---|
not_authorized | Not Authorized | The provided Bearer token is invalid or does not match the configured token. | 401 |
no_products | No products found. | No products were found in the database. | 400 |