nutrition-logs #312
- userId
-
Brock Hackett @brock.hackett
- date
- 2026-03-04
- totalCalories
- 2251
- totalProteinGrams
- 181
- totalCarbsGrams
- 127.3
- totalFatGrams
- 113.1
- waterMl
- 696
- createdAt
Overview
nutrition-logs / #312
#312
#312
Request
curl example
curl -sS \ "https://example-data.com/api/v1/nutrition-logs/312" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/nutrition-logs/312" ); const nutritionLog = await res.json();
TypeScript example
// Download once: mkdir -p types && curl -o types/nutrition-logs.d.ts https://example-data.com/types/nutrition-logs.d.ts
import type { NutritionLog } from "./types/nutrition-logs";
const res = await fetch(
"https://example-data.com/api/v1/nutrition-logs/312"
);
const nutritionLog = (await res.json()) as NutritionLog; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/nutrition-logs/312"
)
nutrition_log = res.json() Response
{
"id": 312,
"userId": 161,
"date": "2026-03-04",
"totalCalories": 2251,
"totalProteinGrams": 181,
"totalCarbsGrams": 127.3,
"totalFatGrams": 113.1,
"waterMl": 696,
"createdAt": "2026-03-04T23:59:59.999Z"
}