example-data.com
Menu
Browse docs and collections

Overview

tickets / #245

Apr
11
Sun

National Kihn Championship

8:41 PM

Lake Reecechester Auditorium

From AUD 172.51

Component variants

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/tickets/245"
);
const ticket = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/tickets.d.ts https://example-data.com/types/tickets.d.ts
import type { Ticket } from "./types/tickets";

const res = await fetch(
  "https://example-data.com/api/v1/tickets/245"
);
const ticket = (await res.json()) as Ticket;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/tickets/245"
)
ticket = res.json()

Response

{
  "id": 245,
  "eventName": "National Kihn Championship",
  "venue": "Lake Reecechester Auditorium",
  "eventAt": "2027-04-11T20:41:40.561Z",
  "type": "vip",
  "price": 172.51,
  "currency": "AUD",
  "sectionCode": "D2",
  "seatCode": "M41",
  "isSold": true,
  "createdAt": "2027-03-30T20:41:40.561Z"
}