Skip to main content

Delete Attribute

Delete an existing attribute.

HTTP Request

DELETE/api/products/attributes/:id

Authorization

Authorization

  • Required: Yes
  • Permission: Staff or Admin
  • Authentication: Token-based (Authorization: Token <your_api_key>)

Path Parameters

ParameterTypeRequiredDescription
idIntegerYesUnique ID of the attribute to delete

Example Requests

1import requests
2
3# Delete an existing attribute
4response = requests.delete('http://www.example.com/api/products/attributes/123',
5  headers={'Authorization': 'Token <your_api_key>'}
6)
7print(response.status_code)
8
9# Delete another attribute
10response = requests.delete('http://www.example.com/api/products/attributes/456',
11  headers={'Authorization': 'Token <your_api_key>'}
12)
13print(response.status_code)

Status Codes

CodeDescription
204Product deleted successfully
401Unauthorized — authentication required
403Forbidden — insufficient permissions
404Not found — product does not exist
500Internal server error

Response Fields

FieldTypeDescription
NoneNoneNo response body returned