🛒 Ecommerce
Delete coupon
The API allows users with an ADMIN role to delete a coupon by providing the couponId as a path variable.
The API verifies the user's role before processing the request and deletes the coupon associated with the provided couponId.
delete/ecommerce/coupons/{couponId}
Response
Delete coupon
Example response
{
"data": {
"deletedCoupon": {
"_id": "648850c3718cdeb85439aefc",
"couponCode": "FIRST300",
"createdAt": "2023-06-13T11:19:31.227Z",
"discountValue": 400,
"expiryDate": "2024-06-13T11:07:10.693Z",
"minimumCartValue": 400,
"name": "First 300 new",
"owner": "648849ef0d88524a26bad487",
"startDate": "2023-12-13T11:07:10.693Z",
"type": "FLAT",
"updatedAt": "2023-06-13T11:42:56.421Z"
}
},
"message": "Coupon deleted successfully",
"statusCode": 200,
"success": true
}