Create a nutrition plan (async meal generation)
Schedules an asynchronous job that builds the first full week of meals from supplied preferences and constraints. Subsequent weeks are generated on a rolling cadence. Returns `202 Accepted` with a `job_id` partners can poll.
Authorization
MemberBearer Member-scoped JWT minted by POST /v1/auth/token. Required on every /v1/users/{user_id}/... route; the token's sub claim must match the path user_id.
In: header
Path Parameters
uuidHeader Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://loading/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/nutrition-plans" \ -H "Content-Type: application/json" \ -d '{ "title": "string" }'{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"job_id": "453bd7d7-5355-4d6d-a38e-d9e7eb218c3f",
"status": "accepted"
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}List nutrition plans for the member
Paginated list of nutrition plans. Filter by `status` (`active`, `inactive`). Returns thin summaries; for the full plan body call `GET /nutrition-plans/{plan_id}`.
Read nutrition plan details
Returns the full plan body: status, summary, meal rhythm, daily calorie/macro targets, preferences/constraints, and the `weeks[]` calendar. To read the meals inside a week, call `GET /nutrition-plans/{id}/weeks/{week_index}` with the zero-based index of the entry in `weeks[]`.