coupons #6
- code
- EHGUGR
- discountType
- fixed
- value
- 29.32
- minOrderAmount
- 89.42
- maxRedemptions
- —
- redemptionCount
- 384
- validFrom
- validUntil
- isActive
- true
- createdAt
Overview
Request
curl example
curl -sS \ "https://example-data.com/api/v1/coupons/6" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/coupons/6" ); const coupon = await res.json();
TypeScript example
// Download once: mkdir -p types && curl -o types/coupons.d.ts https://example-data.com/types/coupons.d.ts
import type { Coupon } from "./types/coupons";
const res = await fetch(
"https://example-data.com/api/v1/coupons/6"
);
const coupon = (await res.json()) as Coupon; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/coupons/6"
)
coupon = res.json() Response
{
"id": 6,
"code": "EHGUGR",
"discountType": "fixed",
"value": 29.32,
"minOrderAmount": 89.42,
"maxRedemptions": null,
"redemptionCount": 384,
"validFrom": "2025-08-23T20:55:22.668Z",
"validUntil": "2027-01-03T12:35:23.813Z",
"isActive": true,
"createdAt": "2025-08-21T15:17:16.835Z"
}