example-data.com
Menu
Browse docs and collections

Overview

tickets / #198

Feb
27
Sat

Ultimate Hauck Open

11:22 AM

Anchorage Convention Center

From CAD 306.41

Component variants

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/tickets/198"
);
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/198"
);
const ticket = (await res.json()) as Ticket;

Python example

import requests

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

Response

{
  "id": 198,
  "eventName": "Ultimate Hauck Open",
  "venue": "Anchorage Convention Center",
  "eventAt": "2027-02-27T11:22:00.069Z",
  "type": "reserved",
  "price": 306.41,
  "currency": "CAD",
  "sectionCode": "B1",
  "seatCode": "A23",
  "isSold": false,
  "createdAt": "2027-01-01T11:22:00.069Z"
}