π Ecommerce
Get coupon by id
The API endpoint allows a logged-in user to retrieve a coupon by providing the couponId as a path variable.
By making a request to the API with the appropriate couponId, the server will return the corresponding coupon details, such as its code, discount amount, expiration date, or any other relevant information associated with that specific coupon.
get/ecommerce/coupons/{couponId}
Request
- Base URLhttps://api.freeapi.app/api/v1
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Response
Get coupon by id
Example response
{
"data": {
"_id": "649e792a64e7dba29b7266ae",
"couponCode": "IPSAM813",
"createdAt": "2023-06-30T06:41:46.410Z",
"discountValue": 813,
"expiryDate": "2025-07-06T05:37:19.370Z",
"isActive": true,
"minimumCartValue": 1113,
"name": "excepturi",
"owner": "649e792964e7dba29b72634a",
"startDate": "2022-10-29T15:51:08.574Z",
"type": "FLAT",
"updatedAt": "2023-06-30T06:41:46.410Z"
},
"message": "Coupon deleted successfully",
"statusCode": 200,
"success": true
}Changes
No recorded changes to this operation across all 1 revision of this API.