example-data.com
Menu
Browse docs and collections

Overview

stores / #12

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 12,
  "name": "Kuhlman and Sons",
  "slug": "kuhlman-and-sons-12",
  "description": "Balanced impactful database",
  "address": "9534 Maple Close",
  "city": "Letaport",
  "region": "New York",
  "countryAlpha2": "AR",
  "postalCode": "94493-7214",
  "phone": "+1 202-555-0111 ext 1",
  "website": "https://example.com/stores/kuhlman-and-sons",
  "hours": "24/7",
  "createdAt": "2022-02-03T22:28:48.940Z"
}