Constraints

Allergies, intolerances and diets the planner filters dishes by.4 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}/constraints

List the household's allergies, intolerances, diets and avoidances

Parameters

NameInTypeRequiredDescription
householdIdpathstring (uuid)Required—

Responses

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

Example

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

Example response

200application/json
[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "householdId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "householdMemberId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "kind": "Allergy",
    "foodOrCategory": "string",
    "severity": "Hard",
    "notes": "string",
    "createdAt": "2026-09-07T16:30:00Z",
    "updatedAt": "2026-09-07T16:30:00Z",
    "foodKey": "string",
    "displayName": "string"
  }
]
POST/api/v1/households/{householdId}/constraints

Add a dietary constraint for the whole household or one person

Adults only; a Junior member gets 403. householdMemberId null means it applies to everyone at the table. 404 when the person is not in this household. 409 with code consent_required for an Allergy, Intolerance or DietaryPattern when the subject's explicit yes to storing health data is not on file (GDPR art. 9(2)(a), #2932). The yes is per person: the household's covers only a constraint that names nobody, and the refusal names whose yes is missing in householdMemberId (#4878). An Avoidance is a preference and needs none.

Parameters

NameInTypeRequiredDescription
householdIdpathstring (uuid)Required—

Request body

application/jsonRequiredCreateDietaryConstraintRequest

Responses

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

Problem codes

The `code` in the problem body is what to branch on. `detail` is English, written for a log.

consent_required
— Bryti needs an explicit yes before it can save health details. You give that yes on the person's card under Household.

Example

curl -b "bryti_session=…" \
  -X POST \
  "https://bryti.app/api/v1/households/3fa85f64-5717-4562-b3fc-2c963f66afa6/constraints" \
  -H "Content-Type: application/json" \
  -d '{"householdMemberId":"3fa85f64-5717-4562-b3fc-2c963f66afa6","kind":"Allergy","foodOrCategory":"string","severity":"Hard","notes":"string"}'

Example response

201application/json
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "householdId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "householdMemberId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "kind": "Allergy",
  "foodOrCategory": "string",
  "severity": "Hard",
  "notes": "string",
  "createdAt": "2026-09-07T16:30:00Z",
  "updatedAt": "2026-09-07T16:30:00Z",
  "foodKey": "string",
  "displayName": "string"
}
PATCH/api/v1/households/{householdId}/constraints/{constraintId}

Change a constraint's kind, food, severity or notes

Adults only; a Junior member gets 403. The person it applies to cannot be changed here — delete it and add a new one. 409 with code consent_required when the new kind is health data and the subject's explicit yes is not on file (#2932); the refusal names the subject in householdMemberId (#4878).

Parameters

NameInTypeRequiredDescription
householdIdpathstring (uuid)Required—
constraintIdpathstring (uuid)Required—

Request body

application/jsonRequiredUpdateDietaryConstraintRequest

Responses

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

Problem codes

The `code` in the problem body is what to branch on. `detail` is English, written for a log.

consent_required
— Bryti needs an explicit yes before it can save health details. You give that yes on the person's card under Household.

Example

curl -b "bryti_session=…" \
  -X PATCH \
  "https://bryti.app/api/v1/households/3fa85f64-5717-4562-b3fc-2c963f66afa6/constraints/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
  -H "Content-Type: application/json" \
  -d '{"kind":"Allergy","foodOrCategory":"string","severity":"Hard","notes":"string"}'

Example response

200application/json
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "householdId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "householdMemberId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "kind": "Allergy",
  "foodOrCategory": "string",
  "severity": "Hard",
  "notes": "string",
  "createdAt": "2026-09-07T16:30:00Z",
  "updatedAt": "2026-09-07T16:30:00Z",
  "foodKey": "string",
  "displayName": "string"
}
DELETE/api/v1/households/{householdId}/constraints/{constraintId}

Remove a dietary constraint

Adults only; a Junior member gets 403.

Parameters

NameInTypeRequiredDescription
householdIdpathstring (uuid)Required—
constraintIdpathstring (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 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
Headers
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.

Example

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

Schemas

ConstraintSeverity

Type

Values

HardSoft

CreateDietaryConstraintRequest

PropertyTypeRequired
householdMemberIdstring (uuid) | nullRequired
kindDietaryConstraintKindRequired
foodOrCategorystringRequired
severityConstraintSeverityRequired
notesstring | nullRequired

DietaryConstraintKind

Type

Values

AllergyIntoleranceDietaryPatternAvoidance

DietaryConstraintResponse

PropertyTypeRequired
idstring (uuid)Required
householdIdstring (uuid)Required
householdMemberIdstring (uuid) | nullRequired
kindDietaryConstraintKindRequired
foodOrCategorystringRequired
severityConstraintSeverityRequired
notesstring | nullRequired
createdAtstring (date-time)Required
updatedAtstring (date-time)Required
foodKeystring | nullRequired
displayNamestringRequired

ProblemDetails

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

UpdateDietaryConstraintRequest

PropertyTypeRequired
kindDietaryConstraintKindRequired
foodOrCategorystringRequired
severityConstraintSeverityRequired
notesstring | nullRequired