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