Delete Attribute Value
Delete an existing attribute value.
HTTP Request
DELETE/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 to delete |
| value_id | Yes | Unique ID of the attribute value to delete |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# Delete a specific attribute value
4response = requests.delete('http://www.example.com/api/products/attributes/123/values/456',
5 headers={'Authorization': 'Token <your_api_key>'}
6)
7print(response.json())1# Delete a specific attribute value
2
3curl -X DELETE "http://www.example.com/api/products/attributes/123/values/456" -H "Authorization: Token <your_api_key>"Status Codes
| Code | Description |
|---|---|
| 204 | Attribute value deleted successfully |
| 401 | Unauthorized — authentication required |
| 403 | Forbidden — insufficient permissions |
| 404 | Not found — attribute or value does not exist |
| 500 | Internal server error |
Response Fields
| Field | Type | Description |
|---|---|---|
| None | None | No response body returned |