Water & Vitamins

Movement trend (logged minutes/day) for sharing

Changed on

Daily series for the shareable trend card, shaped like GET /journey/weight-trend. window = month (30 days) | 6months (180) | year (365); one point per logged day, empty days omitted. Headline stats (starting/current/goal/change/average/goal_progress_pct) sit beside the points. Manually logged movement only — synced steps/active minutes live on GET /health/{steps|active_minutes}/trend/me.

get/api/log/movement/trend

Request

  • Base URL
    https://api.rewritelifestyle.ai (the document declares no server; this is the origin it was published from)
  • URL
    https://api.rewritelifestyle.ai/api/log/movement/trend
  • Auth
    HTTP bearer

Query parameters

window'month' | '6months' | 'year'

Same windows as GET /journey/weight-trend: month = last 30 days, 6months = last 180, year = last 365. Defaults to "month".

datestring
Example:2026-10-26

End-date anchor in YYYY-MM-DD (inclusive). Defaults to today in the user's timezone.

Headers

x-timezonestring required

Response

metric'water' | 'movement' | 'vitamins' required
window'month' | '6months' | 'year' required
unitstring required

water→oz, movement→minutes, vitamins→count.

starting_valueobject nullable required

First logged day in the window.

current_valueobject nullable required

Latest logged day in the window.

goalobject nullable required

Daily goal. water = the user's water_goal_oz; null otherwise.

changeobject nullable required

current_value − starting_value.

averageobject nullable required

Average across logged days.

days_loggednumber required

Days in the window with at least one entry.

goal_progress_pctobject nullable required

Percent of logged days at or above goal. Null without a goal.

Example response

{
  "unit": "oz",
  "points": [
    {
      "date": "2026-10-24",
      "value": 56
    }
  ]
}

Changes