Happklaar API
string · minLength: 1 · maxLength: 120 · requiredLocalization.SupportedLocale · enum · required
POST /v1/households — create a new household + attach caller as Owner + auto-switch
POST
https://api.happklaar.nl/v1
/households
POST /v1/households — create a new household + attach caller as Owner + auto-switch › Request Body
Request body for POST /v1/households, D-34).
Validation contract:
- `name` REQUIRED string, 1–120 chars (Postgres-friendly bound,
matches RenameHouseholdRequestData)
- `locale` REQUIRED, must be a {@see SupportedLocale} value (D-34
single source of truth — `{nl, en}` today)
D-32: locale is REQUIRED at the SDK contract layer; the SPA always
sends it. The server-side User.locale fallback is intentionally NOT
applied — defense-in-depth means rejecting requests that omit locale
rather than silently picking one for non-SPA callers.
namelocaleCanonical set of supported UI locales for Happklaar. Use this enum wherever a value is constrained to one of the supported locales — Command DTOs, Query DTOs, validation attributes, repository filters. Backed string enum ensures the scalar value is preserved at the database/serialisation boundary (ADR 0034 convention). Add a new case here when a new locale is introduced; all #[In(SupportedLocale::Nl, SupportedLocale::En)] call-sites automatically benefit.
Enum values:
nl
en
POST /v1/households — create a new household + attach caller as Owner + auto-switch › Responses
Created