example-data.com

coupons / #1

code
0V9WU1MP5
discountType
percent
value
37
minOrderAmount
maxRedemptions
705
redemptionCount
459
validFrom
validUntil
isActive
true
createdAt

Component variants

Medium

#1

#1

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

res = requests.get(
    "https://example-data.com/api/v1/coupons/1"
)
coupon = res.json()
{
  "id": 1,
  "code": "0V9WU1MP5",
  "discountType": "percent",
  "value": 37,
  "minOrderAmount": null,
  "maxRedemptions": 705,
  "redemptionCount": 459,
  "validFrom": "2025-06-06T05:46:20.110Z",
  "validUntil": "2026-12-19T09:53:50.275Z",
  "isActive": true,
  "createdAt": "2025-06-04T22:00:40.253Z"
}
Draftbit