example-data.com

coupons / #5

code
YIG3DSSRVG
discountType
percent
value
17
minOrderAmount
50.07
maxRedemptions
redemptionCount
211
validFrom
validUntil
isActive
true
createdAt

Component variants

Medium

#5

#5

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

res = requests.get(
    "https://example-data.com/api/v1/coupons/5"
)
coupon = res.json()
{
  "id": 5,
  "code": "YIG3DSSRVG",
  "discountType": "percent",
  "value": 17,
  "minOrderAmount": 50.07,
  "maxRedemptions": null,
  "redemptionCount": 211,
  "validFrom": "2025-08-05T04:03:23.270Z",
  "validUntil": "2027-04-17T07:50:19.879Z",
  "isActive": true,
  "createdAt": "2025-08-02T08:34:05.748Z"
}
Draftbit