curl -sS \
"https://example-data.com/api/v1/coupons/8" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/coupons/8"
);
const coupon = await res.json();import type { Coupon } from "https://example-data.com/types/coupons.d.ts";
const res = await fetch(
"https://example-data.com/api/v1/coupons/8"
);
const coupon = (await res.json()) as Coupon;import requests
res = requests.get(
"https://example-data.com/api/v1/coupons/8"
)
coupon = res.json() {
"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"
}