Utfall

Hva som skjedde etter en middag: laget, hoppet over eller rester til senere.5 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

POST/api/v1/households/{householdId}/plan-entries/{entryId}/outcome

Record how a day's dinner went: cooked, changed, not cooked or ate elsewhere

A cooked dinner consumes its ingredients from the pantry as estimates, leftovers become pantry items, and the answer teaches a weak like or dislike for the dish. source "CookMode" records only that the dinner happened and leaves «hvordan gikk det?» to the week (#1836, ADR-158). 409 with code outcome_already_recorded when the day already has an outcome (#567) — refresh instead of retrying.

Parametre

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

Forespørselskropp

application/jsonPåkrevdRecordOutcomeRequest

Svar

200OK
application/jsonMealOutcomeResponse
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 the server is down for maintenance, 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.
503The server is down for maintenance (#4693). Retry-After says when to try again; problem type maintenance. Every call under /api answers this while maintenance mode is on, the version floor included.
application/problem+jsonProblemDetails
Hoder
Retry-After
— Seconds to wait when a rate limit answered or the server is down for maintenance, 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 POST \
  "https://bryti.app/api/v1/households/3fa85f64-5717-4562-b3fc-2c963f66afa6/plan-entries/3fa85f64-5717-4562-b3fc-2c963f66afa6/outcome" \
  -H "Content-Type: application/json" \
  -d '{"status":"Cooked","reason":"UnexpectedEvent","notes":"string","leftovers":[{"description":"string","portionCount":0,"quantity":0,"unit":"string","storageLocation":{}}]}'

Eksempel på svar

200application/json
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "planEntryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "Cooked",
  "reason": "UnexpectedEvent",
  "notes": "string",
  "leftovers": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "description": "string",
      "portionCount": 0,
      "quantity": 0,
      "unit": "string",
      "storageLocation": {}
    }
  ],
  "recordedAt": "2026-09-07T16:30:00Z",
  "source": "Form"
}
PUT/api/v1/households/{householdId}/plan-entries/{entryId}/outcome

Answer the follow-up: change what a recorded outcome says

Replaces status, reason and notes; leftovers are added only if the outcome had none, and source never changes (#1836, ADR-158). 409 with code outcome_cannot_be_undone when the change would un-cook a cooked dinner — delete the outcome («Angre») instead.

Parametre

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

Forespørselskropp

application/jsonPåkrevdRecordOutcomeRequest

Svar

200OK
application/jsonMealOutcomeResponse
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 the server is down for maintenance, 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.
503The server is down for maintenance (#4693). Retry-After says when to try again; problem type maintenance. Every call under /api answers this while maintenance mode is on, the version floor included.
application/problem+jsonProblemDetails
Hoder
Retry-After
— Seconds to wait when a rate limit answered or the server is down for maintenance, 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 PUT \
  "https://bryti.app/api/v1/households/3fa85f64-5717-4562-b3fc-2c963f66afa6/plan-entries/3fa85f64-5717-4562-b3fc-2c963f66afa6/outcome" \
  -H "Content-Type: application/json" \
  -d '{"status":"Cooked","reason":"UnexpectedEvent","notes":"string","leftovers":[{"description":"string","portionCount":0,"quantity":0,"unit":"string","storageLocation":{}}]}'

Eksempel på svar

200application/json
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "planEntryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "Cooked",
  "reason": "UnexpectedEvent",
  "notes": "string",
  "leftovers": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "description": "string",
      "portionCount": 0,
      "quantity": 0,
      "unit": "string",
      "storageLocation": {}
    }
  ],
  "recordedAt": "2026-09-07T16:30:00Z",
  "source": "Form"
}
DELETE/api/v1/households/{householdId}/plan-entries/{entryId}/outcome

Undo a recorded outcome and everything it caused

Removes the consumption estimates, the leftovers it put in the pantry and the preference signal it taught (#110).

Parametre

NavnHvorTypePåkrevdBeskrivelse
householdIdpathstring (uuid)Påkrevd—
entryIdpathstring (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 the server is down for maintenance, 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.
503The server is down for maintenance (#4693). Retry-After says when to try again; problem type maintenance. Every call under /api answers this while maintenance mode is on, the version floor included.
application/problem+jsonProblemDetails
Hoder
Retry-After
— Seconds to wait when a rate limit answered or the server is down for maintenance, 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/plan-entries/3fa85f64-5717-4562-b3fc-2c963f66afa6/outcome"
POST/api/v1/households/{householdId}/plan-entries/{entryId}/outcome/confirm

Answer the follow-up with «as planned» and close the question

Stamps followedUpAt and changes nothing else (#1836, ADR-158). Finds the answer on the same evening in any version of the week, and records Cooked when none stands (#3263). Safe to retry: a second call answers 200 with the same outcome. 404 only when no plan holds the entry. 400 when the day has not come or holds no dinner (#4888).

Parametre

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

Svar

200OK
application/jsonMealOutcomeResponse
400Bad Request
application/problem+jsonProblemDetails
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 the server is down for maintenance, 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.
503The server is down for maintenance (#4693). Retry-After says when to try again; problem type maintenance. Every call under /api answers this while maintenance mode is on, the version floor included.
application/problem+jsonProblemDetails
Hoder
Retry-After
— Seconds to wait when a rate limit answered or the server is down for maintenance, 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 POST \
  "https://bryti.app/api/v1/households/3fa85f64-5717-4562-b3fc-2c963f66afa6/plan-entries/3fa85f64-5717-4562-b3fc-2c963f66afa6/outcome/confirm"

Eksempel på svar

200application/json
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "planEntryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "Cooked",
  "reason": "UnexpectedEvent",
  "notes": "string",
  "leftovers": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "description": "string",
      "portionCount": 0,
      "quantity": 0,
      "unit": "string",
      "storageLocation": {}
    }
  ],
  "recordedAt": "2026-09-07T16:30:00Z",
  "source": "Form"
}
GET/api/v1/households/{householdId}/outcomes

Read the household's recorded outcomes a page at a time, newest first

from and to filter on the day the outcome was recorded (UTC), not on the dinner's date; ?status= narrows to one kind of answer. ?limit= is 1–100, 50 by default. Each page hands back a nextCursor — give it back as ?cursor= for the next page; null on the last. A cursor nobody handed out is a 400. total is null: counting every dinner ever answered for would cost a second pass over rows nobody asked to see.

Parametre

NavnHvorTypePåkrevdBeskrivelse
householdIdpathstring (uuid)Påkrevd—
fromquerystring (date)——
toquerystring (date)——
statusqueryOutcomeStatus——
cursorquerystring——
limitqueryinteger (int32)——

Svar

200OK
application/jsonPagedMealOutcomeResponse
400Bad Request
application/problem+jsonProblemDetails
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 the server is down for maintenance, 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.
503The server is down for maintenance (#4693). Retry-After says when to try again; problem type maintenance. Every call under /api answers this while maintenance mode is on, the version floor included.
application/problem+jsonProblemDetails
Hoder
Retry-After
— Seconds to wait when a rate limit answered or the server is down for maintenance, 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/outcomes"

Eksempel på svar

200application/json
{
  "items": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "planEntryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "status": {},
      "reason": {},
      "notes": "string",
      "leftovers": [
        {}
      ],
      "recordedAt": "2026-09-07T16:30:00Z",
      "source": {}
    }
  ],
  "nextCursor": "string",
  "total": 0
}

Skjema

LeftoverRequest

FeltTypePåkrevd
descriptionstringPåkrevd
portionCountinteger (int32) | nullPåkrevd
quantitynumber (double) | nullPåkrevd
unitstring | nullPåkrevd
storageLocationStorageLocationPåkrevd

LeftoverResponse

FeltTypePåkrevd
idstring (uuid)Påkrevd
descriptionstringPåkrevd
portionCountinteger (int32) | nullPåkrevd
quantitynumber (double) | nullPåkrevd
unitstring | nullPåkrevd
storageLocationStorageLocationPåkrevd

MealOutcomeResponse

FeltTypePåkrevd
idstring (uuid)Påkrevd
planEntryIdstring (uuid)Påkrevd
statusOutcomeStatusPåkrevd
reasonOutcomeReason | nullPåkrevd
notesstring | nullPåkrevd
leftoversLeftoverResponse[]Påkrevd
recordedAtstring (date-time)Påkrevd
sourceOutcomeSource—
followedUpAtstring (date-time) | null—

OutcomeReason

Type

Verdier

UnexpectedEventMissingIngredientNotEnoughTimeTooTiredNotAppealingIllnessPlansChangedOtherDidNotLike

eller null

OutcomeSource

Type

Verdier

FormCookMode

Standard "Form"

OutcomeStatus

Type

Verdier

CookedCookedWithChangesNotCookedAteElsewhere

PagedMealOutcomeResponse

FeltTypePåkrevd
itemsMealOutcomeResponse[]Påkrevd
nextCursorstring | nullPåkrevd
totalinteger (int32) | nullPåkrevd

ProblemDetails

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

RecordOutcomeRequest

FeltTypePåkrevd
statusOutcomeStatusPåkrevd
reasonOutcomeReason | nullPåkrevd
notesstring | nullPåkrevd
leftoversLeftoverRequest[] | nullPåkrevd
sourceOutcomeSource | null—
frozenBabyPortionsinteger (int32) | null—

StorageLocation

Type

Verdier

FridgeFreezerPantryUnknown