Medlemmer

Folkene ved bordet: voksne, barn, babyer og gjester.4 operasjoner

Hoder på hvert svar

Hvert svar på denne siden har disse hodene.
X-Trace-Id
— The W3C trace id of this request — the same id in the log and in the traceId of a problem. Quote it when reporting.
Server-Timing
— Where the time went: total, db;dur=…;desc="N queries", and every step the handler named (ADR-163).
X-Diagnostics
— Only when the request asked with X-Diagnostics: 1 or ?diagnostics=1: the same breakdown as one JSON object, with the trace id (ADR-163).

Operasjoner

GET/api/v1/households/{householdId}/members

List the household's people with today's age and nutrition targets

Guests and inactive people are included. A person is not an account, and may have none.

Parametre

NavnHvorTypePåkrevdBeskrivelse
householdIdpathstring (uuid)Påkrevd—

Svar

200OK
application/jsonHouseholdMemberResponse[]
401No session, or the session is no longer valid.
application/problem+jsonProblemDetails
426The build named in X-App-Version is below its platform's version floor (ADR-070). Problem type app-version-unsupported; the only way forward is the store. Callers without the header are never turned away.
application/problem+jsonProblemDetails
429Too many calls in the window; Retry-After says how long.
application/problem+jsonProblemDetails
Hoder
Retry-After
— Seconds to wait when a rate limit answered, or an HTTP date when the household's AI is paused. Absent when the household's AI quota for the period is used up — that resets by itself.

Eksempel

curl -b "bryti_session=…" \
  "https://bryti.app/api/v1/households/3fa85f64-5717-4562-b3fc-2c963f66afa6/members"

Eksempel på svar

200application/json
[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "householdId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "string",
    "birthDate": "2026-09-07",
    "ageYears": 0,
    "ageMonths": 0,
    "defaultDinnerParticipant": false,
    "isActive": false,
    "isBreastfed": false,
    "createdAt": "2026-09-07T16:30:00Z",
    "updatedAt": "2026-09-07T16:30:00Z",
    "isGuest": false,
    "isPregnant": false,
    "safetyAdviceOnly": false
  }
]
POST/api/v1/households/{householdId}/members

Add a person to the household — adult, child, baby or usual guest

Adults only; a Junior member gets 403. A person is not an account: link one through Memberships. Without a birthDate the person is planned for as an adult (#599). Adding someone who eats dinner by default resizes every dinner still ahead and marks the shopping list stale (#340). 409 with code consent_required when isBreastfed or isPregnant is set and the household has given no explicit yes to storing health data (GDPR art. 9(2)(a), #2932) — add the person without it, then ask.

Parametre

NavnHvorTypePåkrevdBeskrivelse
householdIdpathstring (uuid)Påkrevd—

Forespørselskropp

application/jsonPåkrevdCreateHouseholdMemberRequest

Svar

201Created
application/jsonHouseholdMemberResponse
400Bad Request
application/problem+jsonProblemDetails
401No session, or the session is no longer valid.
application/problem+jsonProblemDetails
404Not Found
application/problem+jsonProblemDetails
409Conflict
application/problem+jsonProblemDetails
426The build named in X-App-Version is below its platform's version floor (ADR-070). Problem type app-version-unsupported; the only way forward is the store. Callers without the header are never turned away.
application/problem+jsonProblemDetails
429Too many calls in the window; Retry-After says how long.
application/problem+jsonProblemDetails
Hoder
Retry-After
— Seconds to wait when a rate limit answered, or an HTTP date when the household's AI is paused. Absent when the household's AI quota for the period is used up — that resets by itself.

Problemkoder

`code` i problemkroppen er den du forgreiner på. `detail` er engelsk, skrevet for loggen.

consent_required
— Bryti trenger et uttrykkelig ja før den kan lagre helseopplysninger. Det ja-et gir du på personens kort under Husholdning.

Eksempel

curl -b "bryti_session=…" \
  -X POST \
  "https://bryti.app/api/v1/households/3fa85f64-5717-4562-b3fc-2c963f66afa6/members" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","birthDate":"2026-09-07","defaultDinnerParticipant":true,"isBreastfed":false,"isGuest":false}'

Eksempel på svar

201application/json
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "householdId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "string",
  "birthDate": "2026-09-07",
  "ageYears": 0,
  "ageMonths": 0,
  "defaultDinnerParticipant": false,
  "isActive": false,
  "isBreastfed": false,
  "createdAt": "2026-09-07T16:30:00Z",
  "updatedAt": "2026-09-07T16:30:00Z",
  "isGuest": false,
  "isPregnant": false,
  "safetyAdviceOnly": false
}
PATCH/api/v1/households/{householdId}/members/{memberId}

Update a person's details, appetite, activity or nutrition overrides

Adults only; a Junior member gets 403. name, birthDate, defaultDinnerParticipant, isActive, isGuest and portionFactor are always applied; isBreastfed, isPregnant and nutritionOverrides are «omit = leave it» (#707). A change in who eats, or how much, resizes every dinner still ahead and marks the shopping list stale (#340). 409 with code consent_required when isBreastfed, isPregnant or nutritionOverrides is set and this person's explicit yes to storing health data is not on file (GDPR art. 9(2)(a), #2932); clearing any of them is always allowed.

Parametre

NavnHvorTypePåkrevdBeskrivelse
householdIdpathstring (uuid)Påkrevd—
memberIdpathstring (uuid)Påkrevd—

Forespørselskropp

application/jsonPåkrevdUpdateHouseholdMemberRequest

Svar

200OK
application/jsonHouseholdMemberResponse
400Bad Request
application/problem+jsonProblemDetails
401No session, or the session is no longer valid.
application/problem+jsonProblemDetails
404Not Found
application/problem+jsonProblemDetails
409Conflict
application/problem+jsonProblemDetails
426The build named in X-App-Version is below its platform's version floor (ADR-070). Problem type app-version-unsupported; the only way forward is the store. Callers without the header are never turned away.
application/problem+jsonProblemDetails
429Too many calls in the window; Retry-After says how long.
application/problem+jsonProblemDetails
Hoder
Retry-After
— Seconds to wait when a rate limit answered, or an HTTP date when the household's AI is paused. Absent when the household's AI quota for the period is used up — that resets by itself.

Problemkoder

`code` i problemkroppen er den du forgreiner på. `detail` er engelsk, skrevet for loggen.

consent_required
— Bryti trenger et uttrykkelig ja før den kan lagre helseopplysninger. Det ja-et gir du på personens kort under Husholdning.

Eksempel

curl -b "bryti_session=…" \
  -X PATCH \
  "https://bryti.app/api/v1/households/3fa85f64-5717-4562-b3fc-2c963f66afa6/members/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","birthDate":"2026-09-07","defaultDinnerParticipant":false,"isActive":false,"isGuest":false}'

Eksempel på svar

200application/json
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "householdId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "string",
  "birthDate": "2026-09-07",
  "ageYears": 0,
  "ageMonths": 0,
  "defaultDinnerParticipant": false,
  "isActive": false,
  "isBreastfed": false,
  "createdAt": "2026-09-07T16:30:00Z",
  "updatedAt": "2026-09-07T16:30:00Z",
  "isGuest": false,
  "isPregnant": false,
  "safetyAdviceOnly": false
}
DELETE/api/v1/households/{householdId}/members/{memberId}

Remove a person from the household

Adults only; a Junior member gets 403. Removing someone who ate dinner by default resizes every dinner still ahead and marks the shopping list stale (#340).

Parametre

NavnHvorTypePåkrevdBeskrivelse
householdIdpathstring (uuid)Påkrevd—
memberIdpathstring (uuid)Påkrevd—

Svar

204No Content
401No session, or the session is no longer valid.
application/problem+jsonProblemDetails
404Not Found
application/problem+jsonProblemDetails
426The build named in X-App-Version is below its platform's version floor (ADR-070). Problem type app-version-unsupported; the only way forward is the store. Callers without the header are never turned away.
application/problem+jsonProblemDetails
429Too many calls in the window; Retry-After says how long.
application/problem+jsonProblemDetails
Hoder
Retry-After
— Seconds to wait when a rate limit answered, or an HTTP date when the household's AI is paused. Absent when the household's AI quota for the period is used up — that resets by itself.

Eksempel

curl -b "bryti_session=…" \
  -X DELETE \
  "https://bryti.app/api/v1/households/3fa85f64-5717-4562-b3fc-2c963f66afa6/members/3fa85f64-5717-4562-b3fc-2c963f66afa6"

Skjema

CreateHouseholdMemberRequest

FeltTypePåkrevd
namestringPåkrevd
birthDatestring (date) | nullPåkrevd
defaultDinnerParticipantboolean—
isBreastfedboolean—
isGuestboolean—
portionFactornumber (double) | null—
isPregnantboolean | null—
safetyAdviceOnlyboolean | null—

HouseholdMemberResponse

FeltTypePåkrevd
idstring (uuid)Påkrevd
householdIdstring (uuid)Påkrevd
namestringPåkrevd
birthDatestring (date) | nullPåkrevd
ageYearsinteger (int32)Påkrevd
ageMonthsinteger (int32)Påkrevd
defaultDinnerParticipantbooleanPåkrevd
isActivebooleanPåkrevd
isBreastfedbooleanPåkrevd
createdAtstring (date-time)Påkrevd
updatedAtstring (date-time)Påkrevd
isGuestboolean—
portionFactornumber (double) | null—
nutritionTargetsNutritionTargetsResponse | null—
nutritionOverridesNutritionOverridesDto | null—
isPregnantboolean—
safetyAdviceOnlyboolean—

NutritionOverridesDto

FeltTypePåkrevd
energyKcalinteger (int32) | null—
proteinGramsinteger (int32) | null—
fibreGramsinteger (int32) | null—
addedSugarMaxGramsinteger (int32) | null—
saltMaxGramsnumber (double) | null—
fruitVegPortionsinteger (int32) | null—

NutritionTargetsResponse

FeltTypePåkrevd
energyKcalinteger (int32)Påkrevd
proteinGramsinteger (int32)Påkrevd
fibreGramsinteger (int32)Påkrevd
addedSugarMaxGramsinteger (int32)Påkrevd
saltMaxGramsnumber (double)Påkrevd
fruitVegPortionsinteger (int32)Påkrevd

ProblemDetails

FeltTypePåkrevd
typestring | null—
titlestring | null—
statusinteger (int32) | null—
detailstring | null—
instancestring | null—
codestring | null—

UpdateHouseholdMemberRequest

FeltTypePåkrevd
namestringPåkrevd
birthDatestring (date) | nullPåkrevd
defaultDinnerParticipantbooleanPåkrevd
isActivebooleanPåkrevd
isBreastfedboolean | null—
isGuestboolean—
portionFactornumber (double) | null—
nutritionOverridesNutritionOverridesDto | null—
isPregnantboolean | null—
safetyAdviceOnlyboolean | null—