🛒 Ecommerce
Get all coupons
The API endpoint allows a logged-in user to retrieve all the available coupons in an ecommerce app before proceeding with the checkout process.
This API provides a list of coupons that users can apply to their purchase, potentially offering discounts or special offers.
get/ecommerce/coupons
Query parameters
pagestring
Example:1
limitstring
Example:5
Response
Get all coupons
Example response
{
"data": {
"coupons": [
{
"__v": 0,
"_id": "64a5511887ac52a3c0252194",
"couponCode": "VITAE229",
"createdAt": "2023-07-05T11:16:40.860Z",
"discountValue": 229,
"expiryDate": "2024-05-22T18:34:22.207Z",
"isActive": true,
"minimumCartValue": 529,
"name": "adipisci",
"owner": "64a3daee2aaac053bc597261",
"startDate": "2022-12-03T18:15:01.369Z",
"type": "FLAT",
"updatedAt": "2023-07-05T11:16:40.860Z"
},
{
"__v": 0,
"_id": "64a5511887ac52a3c0252195",
"couponCode": "APERIAM143",
"createdAt": "2023-07-05T11:16:40.860Z",
"discountValue": 143,
"expiryDate": "2026-01-28T01:54:45.191Z",
"isActive": true,
"minimumCartValue": 443,
"name": "provident",
"owner": "64a3daee2aaac053bc597261",
"startDate": "2023-04-07T19:55:34.925Z",
"type": "FLAT",
"updatedAt": "2023-07-05T11:16:40.860Z"
},
{
"__v": 0,
"_id": "64a5511887ac52a3c0252196",
"couponCode": "COMMODI474",
"createdAt": "2023-07-05T11:16:40.861Z",
"discountValue": 474,
"expiryDate": "2026-03-03T20:13:47.325Z",
"isActive": false,
"minimumCartValue": 774,
"name": "accusamus",
"owner": "64a3daee2aaac053bc597261",
"startDate": "2024-01-27T12:42:30.753Z",
"type": "FLAT",
"updatedAt": "2023-07-05T11:16:40.861Z"
},
{
"__v": 0,
"_id": "64a5511887ac52a3c0252197",
"couponCode": "OFFICIIS255",
"createdAt": "2023-07-05T11:16:40.861Z",
"discountValue": 255,
"expiryDate": "2024-03-21T02:34:46.369Z",
"isActive": true,
"minimumCartValue": 555,
"name": "quisquam",
"owner": "64a3daee2aaac053bc597261",
"startDate": "2023-11-16T19:28:43.982Z",
"type": "FLAT",
"updatedAt": "2023-07-05T11:16:40.861Z"
},
{
"__v": 0,
"_id": "64a5511887ac52a3c0252198",
"couponCode": "EVENIET806",
"createdAt": "2023-07-05T11:16:40.861Z",
"discountValue": 806,
"expiryDate": "2025-03-12T22:24:22.821Z",
"isActive": false,
"minimumCartValue": 1106,
"name": "necessitatibus",
"owner": "64a3daee2aaac053bc597261",
"startDate": "2022-07-20T13:23:13.885Z",
"type": "FLAT",
"updatedAt": "2023-07-05T11:16:40.861Z"
}
],
"hasNextPage": true,
"limit": 5,
"nextPage": 2,
"page": 1,
"serialNumberStartFrom": 1,
"totalCoupons": 15,
"totalPages": 3
},
"message": "Coupons fetched successfully",
"statusCode": 200,
"success": true
}