coupons #2
- code
- BI6HEL
- discountType
- percent
- value
- 37
- minOrderAmount
- 16.98
- maxRedemptions
- —
- redemptionCount
- 90
- validFrom
- validUntil
- isActive
- true
- createdAt
Overview
Request
curl example
curl -sS \ "https://example-data.com/api/v1/coupons/2" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/coupons/2" ); const coupon = await res.json();
TypeScript example
// Download once: mkdir -p types && curl -o types/coupons.d.ts https://example-data.com/types/coupons.d.ts
import type { Coupon } from "./types/coupons";
const res = await fetch(
"https://example-data.com/api/v1/coupons/2"
);
const coupon = (await res.json()) as Coupon; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/coupons/2"
)
coupon = res.json() Response
{
"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"
}