Ønsker

Ønskelisten: rettene husholdningen har lyst på, og tommel opp fra de andre.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}/wishes

List the dishes the household has wished for, most votes first

Any member, Junior included. A wish falls off the list once its dish has been recorded as eaten on or after the day it was wished.

Parametre

NavnHvorTypePåkrevdBeskrivelse
householdIdpathstring (uuid)Påkrevd—

Svar

200OK
application/jsonDishWishResponse[]
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/wishes"

Eksempel på svar

200application/json
[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "recipeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "title": "string",
    "wishedByName": "string",
    "createdAt": "2026-09-07T16:30:00Z",
    "votes": 0,
    "voterNames": [
      "string"
    ],
    "votedByMe": false,
    "canRemove": false
  }
]
POST/api/v1/households/{householdId}/wishes

Wish for a dish, by recipe or by name, for oneself or for a child

Any member, Junior included. Wishing for a dish already on the list is a vote for it, so the call is safe to retry. 404 when RecipeId names no dish the household can see; 400 for an empty name or a member outside the household.

Parametre

NavnHvorTypePåkrevdBeskrivelse
householdIdpathstring (uuid)Påkrevd—

Forespørselskropp

application/jsonPåkrevdCreateDishWishRequest

Svar

200OK
application/jsonDishWishResponse
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 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/wishes" \
  -H "Content-Type: application/json" \
  -d '{"recipeId":"3fa85f64-5717-4562-b3fc-2c963f66afa6","title":"string"}'

Eksempel på svar

200application/json
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "recipeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "title": "string",
  "wishedByName": "string",
  "createdAt": "2026-09-07T16:30:00Z",
  "votes": 0,
  "voterNames": [
    "string"
  ],
  "votedByMe": false,
  "canRemove": false
}
PUT/api/v1/households/{householdId}/wishes/{wishId}/vote

Give or take back a thumbs-up on a wished dish

Any member, Junior included; one vote per person per wish. Idempotent both ways. ForMemberId votes for a child in the household.

Parametre

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

Forespørselskropp

application/jsonPåkrevdSetDishWishVoteRequest

Svar

200OK
application/jsonDishWishResponse
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 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/wishes/3fa85f64-5717-4562-b3fc-2c963f66afa6/vote" \
  -H "Content-Type: application/json" \
  -d '{"vote":false}'

Eksempel på svar

200application/json
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "recipeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "title": "string",
  "wishedByName": "string",
  "createdAt": "2026-09-07T16:30:00Z",
  "votes": 0,
  "voterNames": [
    "string"
  ],
  "votedByMe": false,
  "canRemove": false
}
DELETE/api/v1/households/{householdId}/wishes/{wishId}

Take a wish off the household's list

An adult, or the Junior who made the wish; 403 for another Junior's wish.

Parametre

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

Svar

204No Content
401No session, or the session is no longer valid.
application/problem+jsonProblemDetails
403Forbidden
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/wishes/3fa85f64-5717-4562-b3fc-2c963f66afa6"

Skjema

CreateDishWishRequest

FeltTypePåkrevd
recipeIdstring (uuid) | nullPåkrevd
titlestring | nullPåkrevd
forMemberIdstring (uuid) | null—

DishWishResponse

FeltTypePåkrevd
idstring (uuid)Påkrevd
recipeIdstring (uuid) | nullPåkrevd
titlestringPåkrevd
wishedByNamestring | nullPåkrevd
createdAtstring (date-time)Påkrevd
votesinteger (int32)Påkrevd
voterNamesstring[]Påkrevd
votedByMebooleanPåkrevd
canRemovebooleanPåkrevd

ProblemDetails

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

SetDishWishVoteRequest

FeltTypePåkrevd
votebooleanPåkrevd
forMemberIdstring (uuid) | null—