example-data.com
Menu
Browse docs and collections

Overview

coupons / #33

coupons #33

code
790HS0S
discountType
fixed
value
13.92
minOrderAmount
maxRedemptions
928
redemptionCount
611
validFrom
validUntil
isActive
false
createdAt

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 33,
  "code": "790HS0S",
  "discountType": "fixed",
  "value": 13.92,
  "minOrderAmount": null,
  "maxRedemptions": 928,
  "redemptionCount": 611,
  "validFrom": "2026-05-06T02:00:21.743Z",
  "validUntil": "2026-10-07T22:53:05.365Z",
  "isActive": false,
  "createdAt": "2026-05-01T04:45:36.739Z"
}