v1

latestOpenAPI 3.0.3raw.githubusercontent.com2024-10-2916802.4 MB
🛒 Ecommerce

Get available coupon codes for customer

The API allows a logged-in user to retrieve a list of coupons based on their total shopping cart amount.

The API takes into account the user's current cart total and returns a list of valid coupon codes that the user is eligible to apply.

This functionality helps users find applicable discounts for their purchases, enhancing their shopping experience.

get/ecommerce/coupons/customer/available

Query parameters

pagestring
Example:1
limitstring
Example:5

Response

Get available coupon codes for customer

messagestring
statusCodenumber
successboolean

Example response

{
  "data": {
    "coupons": [
      {
        "__v": 0,
        "_id": "64987eb51a31fd5ee84f01f7",
        "couponCode": "GET600",
        "createdAt": "2023-06-25T17:51:49.316Z",
        "discountValue": 600,
        "expiryDate": "2024-06-13T11:07:10.693Z",
        "isActive": true,
        "minimumCartValue": 700,
        "name": "Season sale",
        "owner": "64986542297b287175aec1b4",
        "startDate": "2023-02-13T11:07:10.693Z",
        "type": "FLAT",
        "updatedAt": "2023-06-25T17:51:49.316Z"
      },
      {
        "__v": 0,
        "_id": "64987eb91a31fd5ee84f01fc",
        "couponCode": "GET700",
        "createdAt": "2023-06-25T17:51:53.617Z",
        "discountValue": 600,
        "expiryDate": "2024-06-13T11:07:10.693Z",
        "isActive": true,
        "minimumCartValue": 700,
        "name": "Season sale",
        "owner": "64986542297b287175aec1b4",
        "startDate": "2023-02-13T11:07:10.693Z",
        "type": "FLAT",
        "updatedAt": "2023-06-25T17:51:53.617Z"
      },
      {
        "__v": 0,
        "_id": "64987ebe1a31fd5ee84f0204",
        "couponCode": "GET800",
        "createdAt": "2023-06-25T17:51:58.468Z",
        "discountValue": 600,
        "expiryDate": "2024-06-13T11:07:10.693Z",
        "isActive": true,
        "minimumCartValue": 700,
        "name": "Season sale",
        "owner": "64986542297b287175aec1b4",
        "startDate": "2023-02-13T11:07:10.693Z",
        "type": "FLAT",
        "updatedAt": "2023-06-25T17:51:58.468Z"
      },
      {
        "__v": 0,
        "_id": "64987ec11a31fd5ee84f0209",
        "couponCode": "GET900",
        "createdAt": "2023-06-25T17:52:01.795Z",
        "discountValue": 600,
        "expiryDate": "2024-06-13T11:07:10.693Z",
        "isActive": true,
        "minimumCartValue": 700,
        "name": "Season sale",
        "owner": "64986542297b287175aec1b4",
        "startDate": "2023-02-13T11:07:10.693Z",
        "type": "FLAT",
        "updatedAt": "2023-06-25T17:52:01.795Z"
      },
      {
        "__v": 0,
        "_id": "64987ec41a31fd5ee84f020e",
        "couponCode": "GET9900",
        "createdAt": "2023-06-25T17:52:04.328Z",
        "discountValue": 600,
        "expiryDate": "2024-06-13T11:07:10.693Z",
        "isActive": true,
        "minimumCartValue": 700,
        "name": "Season sale",
        "owner": "64986542297b287175aec1b4",
        "startDate": "2023-02-13T11:07:10.693Z",
        "type": "FLAT",
        "updatedAt": "2023-06-25T17:52:04.328Z"
      }
    ],
    "hasNextPage": true,
    "limit": 5,
    "nextPage": 2,
    "page": 1,
    "serialNumberStartFrom": 1,
    "totalCoupons": 10,
    "totalPages": 2
  },
  "message": "Customer coupons fetched successfully",
  "statusCode": 200,
  "success": true
}