Skip to main content

Delete Product Attribute

Deletes an existing product attribute.

HTTP Request

DELETE/api/products/:product_id/attributes/:product_attribute_id

Authorization

Authorization

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

Path Parameters

ParameterTypeRequiredDescription
product_idIntegerYesUnique ID of the product
product_attribute_idIntegerYesUnique ID of the product attribute

Example Requests

1import requests
2
3url = "/api/products/{product_id}/attributes/{product_attribute_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/123/attributes/456', 
13  headers={'Authorization': 'Token <your_api_key>'}
14)
15print(response.status_code)  # Should be 200 for successful deletion

Status Codes

CodeDescription
200Product attribute deleted successfully
400Bad request — invalid input
401Unauthorized — authentication required
403Forbidden — insufficient permissions
404Not found — product or attribute does not exist
500Internal server error

Response Fields

FieldTypeDescription
No contentNoneNo content returned on successful deletion