coupons #12
- code
- IQNHHY4
- discountType
- fixed
- value
- 15.12
- minOrderAmount
- 89.87
- maxRedemptions
- —
- redemptionCount
- 204
- validFrom
- validUntil
- isActive
- true
- createdAt
Overview
coupons / #12
#12
#12
Request
curl example
curl -sS \ "https://example-data.com/api/v1/coupons/12" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/coupons/12" ); 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/12"
);
const coupon = (await res.json()) as Coupon; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/coupons/12"
)
coupon = res.json() Response
{
"id": 12,
"code": "IQNHHY4",
"discountType": "fixed",
"value": 15.12,
"minOrderAmount": 89.87,
"maxRedemptions": null,
"redemptionCount": 204,
"validFrom": "2025-12-27T16:56:30.035Z",
"validUntil": "2027-05-12T01:23:52.855Z",
"isActive": true,
"createdAt": "2025-12-27T01:51:50.515Z"
}