curl -sS \
"https://example-data.com/api/v1/coupons/2" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/coupons/2"
);
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/2"
);
const coupon = (await res.json()) as Coupon;import requests
res = requests.get(
"https://example-data.com/api/v1/coupons/2"
)
coupon = res.json() {
"id": 2,
"code": "BI6HEL",
"discountType": "percent",
"value": 37,
"minOrderAmount": 16.98,
"maxRedemptions": null,
"redemptionCount": 90,
"validFrom": "2026-05-07T10:12:27.611Z",
"validUntil": "2027-02-20T02:26:15.043Z",
"isActive": true,
"createdAt": "2026-05-01T13:35:16.251Z"
}