example-data.com
Menu
Browse docs and collections

Overview

coupons / #37

coupons #37

code
EG401CP
discountType
fixed
value
49.25
minOrderAmount
45.34
maxRedemptions
redemptionCount
194
validFrom
validUntil
isActive
true
createdAt

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 37,
  "code": "EG401CP",
  "discountType": "fixed",
  "value": 49.25,
  "minOrderAmount": 45.34,
  "maxRedemptions": null,
  "redemptionCount": 194,
  "validFrom": "2026-02-11T03:39:05.894Z",
  "validUntil": "2027-04-24T12:02:19.629Z",
  "isActive": true,
  "createdAt": "2026-02-06T03:24:02.035Z"
}