Delete Attribute Value
Deletes an existing attribute value
HTTP Request
DELETE/api/products/attributes/:attr_id/values/:id
Authorization
Authorization
- Required: Yes
- Permission: Staff with AttributeValuePermission or Admin
- Permission Code: 1834
- Authentication: Token-based (Authorization: Token <your_api_key>)
Path Parameters
Response Fields
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the attribute value |
| value | String | The value name (unique over 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 |
Example Response
{
"id": 10,
"value": "brown",
"created_at": "2025-12-24T16:38:42.699563Z",
"updated_at": "2025-12-24T16:38:42.699570Z"
}
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3url = "/api/products/attributes/{attrid}/values/{id}"
4headers = {
5 "Authorization": "Token <your_api_key>"
6}
7
8response = requests.delete(url, headers=headers)
9print(response.status_code)
10
11# Specific example
12response = requests.delete('http://www.example.com/api/products/attributes/1/values/15',
13 headers={'Authorization': 'Token <your_api_key>'}
14)
15print(response.status_code) # Should be 200 for successful deletion1# Delete a specific product attribute
2curl -X DELETE "http://www.example.com/api/products/attributes/1/values/15" \
3-H "Authorization: Token <your_api_key>"Response Fields
| Field | Type | Description |
|---|---|---|
| No content | None | No content returned on successful deletion |