Drinks
Beverages including hot drinks, cold drinks, and cocktails.
Overview
food-categories / #4
Beverages including hot drinks, cold drinks, and cocktails.
Request
curl example
curl -sS \ "https://example-data.com/api/v1/food-categories/4" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/food-categories/4" ); 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/4"
);
const foodCategory = (await res.json()) as FoodCategory; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/food-categories/4"
)
food_categorie = res.json() Response
{
"id": 4,
"name": "Drinks",
"slug": "drinks",
"description": "Beverages including hot drinks, cold drinks, and cocktails.",
"parentId": null,
"sortOrder": 4
}