coupons #7
- code
- E5521CJWRP
- discountType
- fixed
- value
- 3.62
- minOrderAmount
- 43.18
- maxRedemptions
- 793
- redemptionCount
- 442
- validFrom
- validUntil
- isActive
- true
- createdAt
Overview
Request
curl example
curl -sS \ "https://example-data.com/api/v1/coupons/7" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/coupons/7" ); 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/7"
);
const coupon = (await res.json()) as Coupon; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/coupons/7"
)
coupon = res.json() Response
{
"id": 7,
"code": "E5521CJWRP",
"discountType": "fixed",
"value": 3.62,
"minOrderAmount": 43.18,
"maxRedemptions": 793,
"redemptionCount": 442,
"validFrom": "2026-05-17T10:55:44.815Z",
"validUntil": "2027-02-21T11:14:44.321Z",
"isActive": true,
"createdAt": "2026-05-11T21:22:10.588Z"
}