example-data.com
Menu
Browse docs and collections

Overview

stores / #28

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 28,
  "name": "Smith Group",
  "slug": "smith-group-28",
  "description": "Cross-platform impactful architecture",
  "address": "1835 McLaughlin Falls",
  "city": "Hollywood",
  "region": "Florida",
  "countryAlpha2": "PK",
  "postalCode": "24311",
  "phone": "+1 202-555-0127 ext 1",
  "website": "https://example.com/stores/smith-group",
  "hours": "Daily 10am-9pm",
  "createdAt": "2024-10-18T13:47:52.264Z"
}