example-data.com
Menu
Browse docs and collections

Overview

categories / #19

Kitchen & Dining

Cookware, appliances, tableware, and kitchen gadgets.

Component variants

Related

References

Referenced by

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/categories/19"
);
const category = await res.json();

TypeScript example

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

const res = await fetch(
  "https://example-data.com/api/v1/categories/19"
);
const category = (await res.json()) as Category;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/categories/19"
)
categorie = res.json()

Response

{
  "id": 19,
  "name": "Kitchen & Dining",
  "slug": "kitchen-dining",
  "description": "Cookware, appliances, tableware, and kitchen gadgets.",
  "parentId": 3,
  "sortOrder": 2
}