Health
Update measurement
Updates an existing measurement (must belong to authenticated user)
ProductionStagingUAT
PUThttps://ankiren.com/api/me/health/{id}
Parameters
Path Parameters
- idintegerpathRequired
Measurement ID
Request Body
Bắt buộc.
- valuenumber
Updated measurement value
- unitstring
Updated unit
- measuredAtstring<date-time>
Updated measurement time
- notestring?
Updated note
application/json
{ "value": 71, "note": "Updated measurement" }
Responses
200 · Measurement updated
- measurementHealthMeasurement
- idintegerRequired
Measurement ID
- userIdstringRequired
User ID (CUID)
- type"height" | "weight"Required
Type of health measurement
- valuenumberRequired
Measurement value
- unitstringRequired
Unit of measurement (kg, lb, cm, in)
- measuredAtstring<date-time>Required
When the measurement was taken
- notestring?
Optional note
- createdAtstring<date-time>Required
Record creation timestamp
application/json
{ "measurement": { "id": 0, "userId": "string", "type": "height", "value": 0, "unit": "string", "measuredAt": "2026-01-01T00:00:00.000Z", "note": "string", "createdAt": "2026-01-01T00:00:00.000Z" } }
Sample Code
Đổi ngôn ngữ ở ô Language trên thanh Documentation.
cURL
curl -X PUT 'https://ankiren.com/api/me/health/{id}' \
-H 'Authorization: Bearer <token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"value": 71,
"note": "Updated measurement"
}'