coupons #9
- code
- 7N72VZQWF
- discountType
- percent
- value
- 5
- minOrderAmount
- 97.65
- maxRedemptions
- 850
- redemptionCount
- 66
- validFrom
- validUntil
- isActive
- true
- createdAt
Overview
Request
curl example
curl -sS \ "https://example-data.com/api/v1/coupons/9" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/coupons/9" ); 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/9"
);
const coupon = (await res.json()) as Coupon; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/coupons/9"
)
coupon = res.json() Response
{
"id": 9,
"code": "7N72VZQWF",
"discountType": "percent",
"value": 5,
"minOrderAmount": 97.65,
"maxRedemptions": 850,
"redemptionCount": 66,
"validFrom": "2025-06-21T15:11:32.191Z",
"validUntil": "2026-07-29T09:44:25.630Z",
"isActive": true,
"createdAt": "2025-06-17T21:20:57.921Z"
}