coupons #31
- code
- J24BTSHV
- discountType
- fixed
- value
- 23.38
- minOrderAmount
- —
- maxRedemptions
- —
- redemptionCount
- 147
- validFrom
- validUntil
- isActive
- true
- createdAt
Overview
coupons / #31
#31
#31
Request
curl example
curl -sS \ "https://example-data.com/api/v1/coupons/31" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/coupons/31" ); 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/31"
);
const coupon = (await res.json()) as Coupon; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/coupons/31"
)
coupon = res.json() Response
{
"id": 31,
"code": "J24BTSHV",
"discountType": "fixed",
"value": 23.38,
"minOrderAmount": null,
"maxRedemptions": null,
"redemptionCount": 147,
"validFrom": "2025-10-22T11:07:52.895Z",
"validUntil": "2027-04-27T01:12:13.110Z",
"isActive": true,
"createdAt": "2025-10-21T17:42:24.250Z"
}