example-data.com
Menu
Browse docs and collections

Overview

coupons / #26

coupons #26

code
E3XF116K
discountType
fixed
value
3.33
minOrderAmount
81.3
maxRedemptions
866
redemptionCount
213
validFrom
validUntil
isActive
false
createdAt

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 26,
  "code": "E3XF116K",
  "discountType": "fixed",
  "value": 3.33,
  "minOrderAmount": 81.3,
  "maxRedemptions": 866,
  "redemptionCount": 213,
  "validFrom": "2025-10-18T23:24:40.611Z",
  "validUntil": "2027-04-26T11:16:47.669Z",
  "isActive": false,
  "createdAt": "2025-10-17T13:07:01.884Z"
}