Lose weight
- userId
-
Aylin Sanford @aylin.sanford
- name
- Lose weight
- category
- weight
- targetValue
- 64.8
- currentValue
- 53.9
- unit
- kg
- deadline
- 2027-04-03
- isCompleted
- false
- createdAt
Overview
goals / #171
Lose weight
#171
Request
curl example
curl -sS \ "https://example-data.com/api/v1/goals/171" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/goals/171" ); const goal = await res.json();
TypeScript example
// Download once: mkdir -p types && curl -o types/goals.d.ts https://example-data.com/types/goals.d.ts
import type { Goal } from "./types/goals";
const res = await fetch(
"https://example-data.com/api/v1/goals/171"
);
const goal = (await res.json()) as Goal; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/goals/171"
)
goal = res.json() Response
{
"id": 171,
"userId": 173,
"name": "Lose weight",
"category": "weight",
"targetValue": 64.8,
"currentValue": 53.9,
"unit": "kg",
"deadline": "2027-04-03",
"isCompleted": false,
"createdAt": "2026-04-14T01:36:34.487Z"
}