Retrieve Attribute Values
Retrieves detailed information about a specific attribute value by its ID.
HTTP Request
GET/api/products/attributes/:attribute_id/values/:value_id
Authorization
Authorization
- Required: Yes
- Permission: Staff or Admin
- Authentication: Token-based (Authorization: Token <your_api_key>)
Path Parameters
| Parameter | Type | Required | Description |
|---|
| attribute_id | Integer | Yes | Unique ID of the attribute |
| value_id | Integer | Yes | Unique ID of the attribute value |
Example Requests
1import requests
2
3# Retrieve a specific attribute value
4response = requests.get('http://www.example.com/api/products/attributes/123/values/456',
5 headers={'Authorization': 'Token <your_api_key>'}
6)
7print(response.json())
1# Retrieve a specific attribute value
2
3curl -X GET "http://www.example.com/api/products/attributes/123/values/456" -H "Authorization: Token <your_api_key>"
Status Codes
| Code | Description |
|---|
| 200 | Attribute value retrieved successfully |
| 401 | Unauthorized — authentication required |
| 403 | Forbidden — insufficient permissions |
| 404 | Not found — attribute value does not exist |
| 500 | Internal server error |
Response Fields
| Field | Type | Description |
|---|
| id | Integer | Unique ID of the attribute value |
| value | String | The value of the attribute |
| created_at | String (ISO 8601) | Timestamp when attribute value was created |
| updated_at | String (ISO 8601) | Timestamp when attribute value was last updated |