Skip to main content

Delete Product Image

Delete an existing product image.

HTTP Request

DELETE/api/products/:product_id/images/:image_id

Authorization

Authorization

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

Path Parameters

ParameterTypeRequiredDescription
product_idintegerYesThe unique identifier of the product
image_idintegerYesThe unique identifier of the image to delete

Example Requests

1import requests
2
3# Delete a specific product image
4response = requests.delete(
5  'http://www.example.com/api/products/123/images/456', 
6  headers={'Authorization': 'Token <your_api_key>'}
7)
8print(response.status_code)  # Should be 204 for successful deletion

Status Codes

CodeDescription
204Product image deleted successfully
401Unauthorized - Invalid or missing API key
403Forbidden - Access denied
404Not Found - Product or image not found

Response Fields

FieldTypeDescription
No ContentemptyNo response body returned for successful deletion