example-data.com
Menu
Browse docs and collections

Overview

coupons / #16

coupons #16

code
UX02FHW7
discountType
fixed
value
43.33
minOrderAmount
maxRedemptions
976
redemptionCount
681
validFrom
validUntil
isActive
false
createdAt

Component variants

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/coupons/16" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/coupons/16"
);
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/16"
);
const coupon = (await res.json()) as Coupon;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/coupons/16"
)
coupon = res.json()

Response

{
  "id": 16,
  "code": "UX02FHW7",
  "discountType": "fixed",
  "value": 43.33,
  "minOrderAmount": null,
  "maxRedemptions": 976,
  "redemptionCount": 681,
  "validFrom": "2026-03-07T14:56:47.222Z",
  "validUntil": "2026-11-04T06:44:48.236Z",
  "isActive": false,
  "createdAt": "2026-03-07T14:41:34.613Z"
}