Skip to main content

Delete Related Product

Delete an existing product image.

HTTP Request

DELETE/api/products/:product_id/related/:related_product_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
related_product_idintegerYesThe unique identifier of the related product to delete

Example Requests

1import requests
2
3url = "/api/products/{product_id}/related/{related_product_id}"
4headers = {
5  "Authorization": "Token <your_token>"
6}
7response = requests.delete(url, headers=headers)
8print(response.status_code)  # Should be 204 for successful deletion

Status Codes

CodeDescription
204Related product deleted successfully
401Unauthorized - Invalid or missing API key
403Forbidden - Access denied
404Not Found - Product or related product not found
500Internal Server Error

Response Fields

FieldTypeDescription
No ContentemptyNo response body returned for successful deletion