curl -sS \
"https://example-data.com/api/v1/coupons/4" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/coupons/4"
);
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/4"
);
const coupon = (await res.json()) as Coupon;import requests
res = requests.get(
"https://example-data.com/api/v1/coupons/4"
)
coupon = res.json() {
"id": 4,
"code": "P92EKXW2WD",
"discountType": "percent",
"value": 28,
"minOrderAmount": 59.75,
"maxRedemptions": null,
"redemptionCount": 170,
"validFrom": "2025-12-13T13:17:33.277Z",
"validUntil": "2027-02-19T05:21:14.975Z",
"isActive": true,
"createdAt": "2025-12-08T05:46:02.947Z"
}