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"
}