example-data.com
Menu
Browse docs and collections

Overview

stores / #6

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 6,
  "name": "Terry Inc",
  "slug": "terry-inc-6",
  "description": "Operative fresh-thinking migration",
  "address": "3913 Stoltenberg Rest",
  "city": "Estefaniamouth",
  "region": "Oklahoma",
  "countryAlpha2": "KE",
  "postalCode": "38705",
  "phone": "+1 202-555-0105 ext 1",
  "website": "https://example.com/stores/terry-inc",
  "hours": "Mon-Thu 9am-7pm, Fri-Sat 9am-9pm, Sun Closed",
  "createdAt": "2021-11-15T14:58:15.475Z"
}