curl -sS \
"https://example-data.com/api/v1/coupons/3" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/coupons/3"
);
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/3"
);
const coupon = (await res.json()) as Coupon;import requests
res = requests.get(
"https://example-data.com/api/v1/coupons/3"
)
coupon = res.json() {
"id": 3,
"code": "XZ437MJ3",
"discountType": "fixed",
"value": 36.16,
"minOrderAmount": 44,
"maxRedemptions": 808,
"redemptionCount": 489,
"validFrom": "2026-03-03T23:21:16.401Z",
"validUntil": "2027-02-15T07:58:28.855Z",
"isActive": true,
"createdAt": "2026-02-27T07:23:13.420Z"
}