Desserts
Sweet treats, pastries, and after-meal indulgences.
Overview
food-categories / #3
Sweet treats, pastries, and after-meal indulgences.
Request
curl example
curl -sS \ "https://example-data.com/api/v1/food-categories/3" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/food-categories/3" ); const foodCategory = await res.json();
TypeScript example
// Download once: mkdir -p types && curl -o types/food-categories.d.ts https://example-data.com/types/food-categories.d.ts
import type { FoodCategory } from "./types/food-categories";
const res = await fetch(
"https://example-data.com/api/v1/food-categories/3"
);
const foodCategory = (await res.json()) as FoodCategory; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/food-categories/3"
)
food_categorie = res.json() Response
{
"id": 3,
"name": "Desserts",
"slug": "desserts",
"description": "Sweet treats, pastries, and after-meal indulgences.",
"parentId": null,
"sortOrder": 3
}