example-data.com
Menu
Browse docs and collections

Overview

stores / #23

Component variants

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/stores/23"
);
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/23"
);
const store = (await res.json()) as Store;

Python example

import requests

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

Response

{
  "id": 23,
  "name": "Nikolaus - Gislason",
  "slug": "nikolaus-gislason-23",
  "description": "Persistent intangible knowledge user",
  "address": "85183 Hintz Harbor",
  "city": "Kirkshire",
  "region": "West Virginia",
  "countryAlpha2": "IE",
  "postalCode": "01568",
  "phone": "+1 202-555-0122 ext 1",
  "website": "https://example.com/stores/nikolaus-gislason",
  "hours": "Mon-Sat 8am-8pm, Sun 10am-6pm",
  "createdAt": "2021-07-29T05:48:50.785Z"
}