example-data.com
Menu
Browse docs and collections

Overview

stores / #15

Component variants

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/stores/15"
);
const store = await res.json();

TypeScript example

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

const res = await fetch(
  "https://example-data.com/api/v1/stores/15"
);
const store = (await res.json()) as Store;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/stores/15"
)
store = res.json()

Response

{
  "id": 15,
  "name": "Toy and Sons",
  "slug": "toy-and-sons-15",
  "description": "Organic system-worthy emulation",
  "address": "98488 Collins Vista",
  "city": "Taliaboro",
  "region": "New York",
  "countryAlpha2": "DK",
  "postalCode": "14056-8440",
  "phone": "+1 202-555-0114 ext 1",
  "website": "https://example.com/stores/toy-and-sons",
  "hours": "Mon-Fri 8am-5pm",
  "createdAt": "2024-09-06T18:49:57.995Z"
}