coupons #8
- code
- 7PMV9VY
- discountType
- fixed
- value
- 31.03
- minOrderAmount
- 15.75
- maxRedemptions
- 875
- redemptionCount
- 799
- validFrom
- validUntil
- isActive
- true
- createdAt
Overview
Request
curl example
curl -sS \ "https://example-data.com/api/v1/coupons/8" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/coupons/8" ); 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/8"
);
const coupon = (await res.json()) as Coupon; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/coupons/8"
)
coupon = res.json() Response
{
"id": 8,
"code": "7PMV9VY",
"discountType": "fixed",
"value": 31.03,
"minOrderAmount": 15.75,
"maxRedemptions": 875,
"redemptionCount": 799,
"validFrom": "2026-01-30T00:00:48.041Z",
"validUntil": "2026-12-31T16:17:24.109Z",
"isActive": true,
"createdAt": "2026-01-27T04:19:03.546Z"
}