Rules

Household meal rules the planner plans around.6 operations

Headers on every response

Every response on this page carries these headers.
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).

Operations

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

List the household's meal rules

Parameters

NameInTypeRequiredDescription
householdIdpathstring (uuid)Required—

Responses

200OK
application/jsonMealRuleResponse[]
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
Headers
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.

Example

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

Example response

200application/json
[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "householdId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "kind": "CategoryFrequency",
    "strength": "Hard",
    "scope": "Permanent",
    "startDate": "2026-09-07",
    "endDate": "2026-09-07",
    "source": "UserDeclared",
    "payload": {},
    "createdAt": "2026-09-07T16:30:00Z",
    "updatedAt": "2026-09-07T16:30:00Z"
  }
]
POST/api/v1/households/{householdId}/rules

Add a meal rule

Adults only; a Junior member gets 403. payload is a union on kind: CategoryFrequency, CategoryExcludedDays, CategoryOnDay, MaximumActiveCookingTime, DinnerTimeOnWeekday, PriceClassOnDays or RepeatAfterDays.

Parameters

NameInTypeRequiredDescription
householdIdpathstring (uuid)Required—

Request body

application/jsonRequiredCreateMealRuleRequest

Responses

201Created
application/jsonMealRuleResponse
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
Headers
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.

Example

curl -b "bryti_session=…" \
  -X POST \
  "https://bryti.app/api/v1/households/3fa85f64-5717-4562-b3fc-2c963f66afa6/rules" \
  -H "Content-Type: application/json" \
  -d '{"payload":{},"strength":"Hard","scope":"Permanent","startDate":"2026-09-07","endDate":"2026-09-07"}'

Example response

201application/json
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "householdId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "kind": "CategoryFrequency",
  "strength": "Hard",
  "scope": "Permanent",
  "startDate": "2026-09-07",
  "endDate": "2026-09-07",
  "source": "UserDeclared",
  "payload": {},
  "createdAt": "2026-09-07T16:30:00Z",
  "updatedAt": "2026-09-07T16:30:00Z"
}
GET/api/v1/households/{householdId}/rules/defaults

Get the national-guideline default rules and whether they apply right now

Defaults for the household's country (source Helsedirektoratet), with synthetic ids and never stored. Active while the household has no frequency rules of its own.

Parameters

NameInTypeRequiredDescription
householdIdpathstring (uuid)Required—

Responses

200OK
application/jsonDefaultRulesResponse
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
Headers
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.

Example

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

Example response

200application/json
{
  "active": false,
  "source": "string",
  "rules": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "householdId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "kind": {},
      "strength": {},
      "scope": {},
      "startDate": "2026-09-07",
      "endDate": "2026-09-07",
      "source": {},
      "payload": {},
      "createdAt": "2026-09-07T16:30:00Z",
      "updatedAt": "2026-09-07T16:30:00Z"
    }
  ]
}
POST/api/v1/households/{householdId}/rules/parse

Turn a sentence into rule suggestions without saving anything

Adults only; a Junior member gets 403. «Fisk to ganger i uken, men ikke fredag» comes back as proposals, each with the CreateMealRuleRequest that files it — nothing is stored until the household POSTs it (#418). An empty sentence, or one with no rule in it, answers an empty list. Costs one chat turn of credits; 429 with code quota_exceeded when the household's AI allowance is used up.

Parameters

NameInTypeRequiredDescription
householdIdpathstring (uuid)Required—

Request body

application/jsonRequiredParseRulesRequest

Responses

200OK
application/jsonParseRulesResponse
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 Requests
application/problem+jsonProblemDetails
Headers
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.

Example

curl -b "bryti_session=…" \
  -X POST \
  "https://bryti.app/api/v1/households/3fa85f64-5717-4562-b3fc-2c963f66afa6/rules/parse" \
  -H "Content-Type: application/json" \
  -d '{"text":"string"}'

Example response

200application/json
{
  "proposals": [
    {
      "summary": "string",
      "request": {}
    }
  ],
  "leftoverDinners": {
    "summary": "string",
    "enabled": false,
    "askedEveryDays": 0
  },
  "unheard": [
    "string"
  ]
}
PATCH/api/v1/households/{householdId}/rules/{ruleId}

Replace a meal rule's payload, strength, scope and dates

Adults only; a Junior member gets 403. A full replacement despite the PATCH verb: every field is written.

Parameters

NameInTypeRequiredDescription
householdIdpathstring (uuid)Required—
ruleIdpathstring (uuid)Required—

Request body

application/jsonRequiredUpdateMealRuleRequest

Responses

200OK
application/jsonMealRuleResponse
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
Headers
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.

Example

curl -b "bryti_session=…" \
  -X PATCH \
  "https://bryti.app/api/v1/households/3fa85f64-5717-4562-b3fc-2c963f66afa6/rules/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
  -H "Content-Type: application/json" \
  -d '{"payload":{},"strength":"Hard","scope":"Permanent","startDate":"2026-09-07","endDate":"2026-09-07"}'

Example response

200application/json
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "householdId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "kind": "CategoryFrequency",
  "strength": "Hard",
  "scope": "Permanent",
  "startDate": "2026-09-07",
  "endDate": "2026-09-07",
  "source": "UserDeclared",
  "payload": {},
  "createdAt": "2026-09-07T16:30:00Z",
  "updatedAt": "2026-09-07T16:30:00Z"
}
DELETE/api/v1/households/{householdId}/rules/{ruleId}

Remove a meal rule

Adults only; a Junior member gets 403.

Parameters

NameInTypeRequiredDescription
householdIdpathstring (uuid)Required—
ruleIdpathstring (uuid)Required—

Responses

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
Headers
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.

Example

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

Schemas

CreateMealRuleRequest

PropertyTypeRequired
payloadMealRulePayloadDtoRequired
strengthRuleStrengthRequired
scopeRuleScopeRequired
startDatestring (date) | nullRequired
endDatestring (date) | nullRequired

DefaultRulesResponse

PropertyTypeRequired
activebooleanRequired
sourcestringRequired
rulesMealRuleResponse[]Required

MealCategory

Type

Values

FishMeatPoultryVegetarianVeganSoupPastaTacoLeftoversOther

MealRuleKind

Type

Values

CategoryFrequencyCategoryExcludedDaysCategoryOnDayMaximumActiveCookingTimeDinnerTimeOnWeekdayPriceClassOnDaysRepeatAfterDays

MealRulePayloadDto

Type

MealRulePayloadDtoCategoryExcludedDaysRulePayload

PropertyTypeRequired
kind"CategoryExcludedDays"—
categoryMealCategoryRequired
excludedWeekdaysWeekday[]Required

MealRulePayloadDtoCategoryFrequencyRulePayload

PropertyTypeRequired
kind"CategoryFrequency"—
categoryMealCategoryRequired
minimumPerWeekinteger (int32)Required
maximumPerWeekinteger (int32)Required

MealRulePayloadDtoCategoryOnDayRulePayload

PropertyTypeRequired
kind"CategoryOnDay"—
categoryMealCategoryRequired
weekdayWeekday | nullRequired
specificDatestring (date) | nullRequired

MealRulePayloadDtoDinnerTimeOnWeekdayRulePayload

PropertyTypeRequired
kind"DinnerTimeOnWeekday"—
timestringRequired
weekdaysWeekday[]Required

MealRulePayloadDtoMaximumActiveCookingTimeRulePayload

PropertyTypeRequired
kind"MaximumActiveCookingTime"—
minutesinteger (int32)Required
weekdaysWeekday[]Required
specificDatestring (date) | nullRequired

MealRulePayloadDtoPriceClassOnDaysRulePayload

PropertyTypeRequired
kind"PriceClassOnDays"—
ceilingPriceCeilingRequired
weekdaysWeekday[]Required

MealRulePayloadDtoRepeatAfterDaysRulePayload

PropertyTypeRequired
kind"RepeatAfterDays"—
daysinteger (int32)Required

MealRuleResponse

PropertyTypeRequired
idstring (uuid)Required
householdIdstring (uuid)Required
kindMealRuleKindRequired
strengthRuleStrengthRequired
scopeRuleScopeRequired
startDatestring (date) | nullRequired
endDatestring (date) | nullRequired
sourceRuleSourceRequired
payloadMealRulePayloadDtoRequired
createdAtstring (date-time)Required
updatedAtstring (date-time)Required

ParsedLeftoverDinners

PropertyTypeRequired
summarystringRequired
enabledbooleanRequired
askedEveryDaysinteger (int32) | nullRequired

ParsedRuleProposal

PropertyTypeRequired
summarystringRequired
requestCreateMealRuleRequestRequired

ParseRulesRequest

PropertyTypeRequired
textstringRequired

ParseRulesResponse

PropertyTypeRequired
proposalsParsedRuleProposal[]Required
leftoverDinnersParsedLeftoverDinners | nullRequired
unheardstring[]Required

PriceCeiling

Type

Values

CheapCheapOrMid

ProblemDetails

PropertyTypeRequired
typestring | null—
titlestring | null—
statusinteger (int32) | null—
detailstring | null—
instancestring | null—
codestring | null—

RuleScope

Type

Values

PermanentDateRangeSpecificDate

RuleSource

Type

Values

UserDeclaredSystemDefaultLearned

RuleStrength

Type

Values

HardSoft

UpdateMealRuleRequest

PropertyTypeRequired
payloadMealRulePayloadDtoRequired
strengthRuleStrengthRequired
scopeRuleScopeRequired
startDatestring (date) | nullRequired
endDatestring (date) | nullRequired

Weekday

Type

Values

SundayMondayTuesdayWednesdayThursdayFridaySaturday