Skip to main content

Get week plan by week

Returns the week header (if it exists) and its items. Does not create the header; lazy creation happens when writing items. weekStartDateKey must be a Monday (YYYY-MM-DD).
1 min read
get/week-plan/profiles/{studioId}/by-week
Request example
Response
get/week-plan/profiles/{studioId}/by-week

Authorization

Authorizationstringheaderrequired#
Better Auth session token. Go resolves the token in the session table and maps it to users.id via auth_user_id. The profile is taken from the path param :studioId when applicable.

Path parameters

studioIdstringrequired#

Query parameters

weekStartDateKeystringrequired#
Monday of the week as YYYY-MM-DD (weekStartsOn 1).

Pattern: ^\d{4}-\d{2}-\d{2}$

Responses

application/json
OK.
dataobjectrequired#
Show child attributes
idstring#
Absent when no header exists yet for the week.
studioIdstringrequired#
weekStartDateKeystringrequired#
intentstring#
Weekly intent (optional short text).
createdBystring#
itemsobject[]required#
Show child attributes
idstringrequired#
planIdstringrequired#
studioIdstringrequired#
dateKeystring#
Day YYYY-MM-DD. Null = Later (no day) for that week.
titlestringrequired#
notesstring#
doneAtstring#
sortOrderintegerrequired#
calendarReminderIdstring#
Linked Calendar reminder (optional).
sourceTaskIdstring#
Source task when added from Tasks (optional).
sourceActivityIdstring#
Linked habit (optional; XOR with sourceTaskId).
seriesIdstring#
Active weekly series (omitted if the series is paused).
repeatWeekdayinteger#
Series weekday (0 = Sunday … 6 = Saturday) if active.

Range: 0–6

createdBystringrequired#
createdAtstringrequired#
updatedAtstringrequired#
createdAtstring#
updatedAtstring#
request_idstring#