example-data.com
Menu
Browse docs and collections

Overview

tickets / #46

May
3
Mon

Ultimate Tremblay Summit

12:02 PM

Rosalindastead Stadium

From AUD 337.09

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 46,
  "eventName": "Ultimate Tremblay Summit",
  "venue": "Rosalindastead Stadium",
  "eventAt": "2027-05-03T12:02:39.994Z",
  "type": "balcony",
  "price": 337.09,
  "currency": "AUD",
  "sectionCode": "D2",
  "seatCode": "J1",
  "isSold": false,
  "createdAt": "2027-02-02T12:02:39.994Z"
}