Delete Product
This endpoint deletes a product and all its associated variants from the system.
🔹 Endpoint Details
DELETE /api/v1/products/{productId}
🔒 Authentication
Header | Required | Description |
---|---|---|
Content-Type | Yes | Must be application/json |
Authorization | Yes | Format: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature |
🧩 Request Example
curl -X DELETE "https://openapi.onlive.site/api/v1/products/{productId}" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature"
📤 Response Format
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Premium T-Shirt",
"deleted": true,
"deletedAt": "2025-05-22T10:30:00Z"
}
📘 Notes
- Deleting a product will also delete all its variants
- This operation cannot be undone
- Associated images are not physically deleted
- Historical orders will maintain their product data
- Deletion is permanent and removes the product from all listings
✅ Common Use Cases
- 🗑️ Product Discontinuation: Remove discontinued products
- 🔄 Catalog Cleanup: Remove obsolete products
- 🎯 Version Management: Remove old product versions
- 🏷️ Category Restructuring: Remove products during reorganization
- ⚡ Data Management: Clean up test or duplicate products
⚠️ Pre-deletion Checklist
-
Ensure the product is not:
- Part of active orders
- Referenced in active promotions
- Listed in active collections
- Required for inventory records
-
Consider:
- Archiving instead of deleting
- Backing up product data
- Notifying relevant stakeholders
- Updating related catalogs
❌ Error Responses
401 Unauthorized
{
"statusCode": 401,
"message": "Invalid or missing authorization credentials"
}
403 Forbidden
{
"statusCode": 403,
"message": "Insufficient permissions to delete this product"
}
404 Not Found
{
"statusCode": 404,
"message": "Product not found"
}
409 Conflict
{
"statusCode": 409,
"message": "Product cannot be deleted while in use by active orders"
}