Forbruk

Kreditter brukt og kreditter igjen i denne perioden.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}/usage

Get the household's AI credits for the current billing period

Any household member. Credits, never tokens or cost (SUBS.md §23–24): used, limit, remaining and bonus, the soft/allowance-spent/hard flags the apps warn on, and what one chat turn costs (#418). Reading rolls the period forward when it has ended but never spends anything.

Parametre

NavnHvorTypePåkrevdBeskrivelse
householdIdpathstring (uuid)Påkrevd—

Svar

200OK
application/jsonUsageResponse
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=…" \
  "https://bryti.app/api/v1/households/3fa85f64-5717-4562-b3fc-2c963f66afa6/usage"

Eksempel på svar

200application/json
{
  "period": {
    "startsAt": "2026-09-07T16:30:00Z",
    "endsAt": "2026-09-07T16:30:00Z"
  },
  "credits": {
    "used": 0,
    "limit": 0,
    "remaining": 0,
    "percentage": 0,
    "bonus": 0,
    "bonusGranted": 0,
    "welcomeRemaining": 0,
    "monthlyRemaining": 0,
    "drawsFrom": {}
  },
  "limits": {
    "softLimitReached": false,
    "allowanceSpent": false,
    "hardLimitReached": false
  },
  "plan": {
    "code": "string",
    "name": "string"
  },
  "chatTurnCredits": 0
}
GET/api/v1/households/{householdId}/milestones

Get the household's first-week milestones and where the first week stands

Any household member. Each milestone (first plan, first list opened, first trip completed, first receipt read, first swap, first useful week) is written once, by the server, when the work happens. FirstWeek is the phase in the order plan, list, receipt, swap, and the step Bryti suggests next (ADR-391 (#3342)).

Parametre

NavnHvorTypePåkrevdBeskrivelse
householdIdpathstring (uuid)Påkrevd—

Svar

200OK
application/jsonHouseholdMilestonesResponse
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=…" \
  "https://bryti.app/api/v1/households/3fa85f64-5717-4562-b3fc-2c963f66afa6/milestones"

Eksempel på svar

200application/json
{
  "milestones": [
    {
      "kind": {},
      "reachedAt": "2026-09-07T16:30:00Z",
      "source": "string"
    }
  ],
  "firstWeek": {
    "phase": {},
    "next": {},
    "done": false
  }
}
GET/api/v1/households/{householdId}/upgrade-prompts

List the upgrade moments that are active for the household right now

Any household member. The server decides (ADR-391 (#3342)): Introduction after the first plan and list on the free plan, QuotaHigh at 80 % of the period with five days left, SustainedHighUse for Familie at 80 % two periods running, never both of the last two. Moment 4 is the 429 quota_exceeded itself and is never listed. The clients draw what they get, never in a chat reply.

Parametre

NavnHvorTypePåkrevdBeskrivelse
householdIdpathstring (uuid)Påkrevd—

Svar

200OK
application/jsonUpgradePromptsResponse
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=…" \
  "https://bryti.app/api/v1/households/3fa85f64-5717-4562-b3fc-2c963f66afa6/upgrade-prompts"

Eksempel på svar

200application/json
{
  "prompts": [
    {
      "moment": {},
      "showOnHome": false,
      "currentPlanCode": "string",
      "suggestedPlanCode": "string",
      "suggestedMonthlyCredits": 0,
      "suggestedPriceMinor": 0,
      "creditsUsed": 0,
      "creditsLimit": 0,
      "resetsAt": "2026-09-07T16:30:00Z",
      "recentPeriods": [
        {}
      ]
    }
  ]
}
POST/api/v1/households/{householdId}/upgrade-prompts

Record that an upgrade moment was shown, dismissed or opened

Any household member. Kept on the household, not in the browser, so «Ikke nå» holds on every device: Dismissed hides Introduction from Home for good, QuotaHigh for the period and SustainedHighUse for 90 days. OverQuota may be posted too, only to be counted. Idempotent per moment and window.

Parametre

NavnHvorTypePåkrevdBeskrivelse
householdIdpathstring (uuid)Påkrevd—

Forespørselskropp

application/jsonPåkrevdRecordUpgradePromptRequest

Svar

204No Content
400The request could not be read as the route needs it: a body that is not the documented shape (a required field left out, a null where none is allowed, a value too long for its field), a parameter that does not parse, or a NUL character anywhere (#3540, #3541, #3543). Code validation_failed or value_too_long.
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/upgrade-prompts" \
  -H "Content-Type: application/json" \
  -d '{"moment":"Introduction","action":"Shown"}'

Skjema

CreditPot

Type

Verdier

WelcomeMonthlyNone

Standard "Monthly"

FirstWeekPhase

Type

Verdier

EmptyPlannedShoppedReceiptReadSwappedDone

FirstWeekResponse

FeltTypePåkrevd
phaseFirstWeekPhasePåkrevd
nextFirstWeekStep | nullPåkrevd
donebooleanPåkrevd

FirstWeekStep

Type

Verdier

PlanOpenListReceiptSwap

eller null

HouseholdMilestoneKind

Type

Verdier

FirstPlanFirstListOpenedFirstTripCompletedFirstReceiptReadFirstSwapFirstUsefulWeek

HouseholdMilestoneResponse

FeltTypePåkrevd
kindHouseholdMilestoneKindPåkrevd
reachedAtstring (date-time)Påkrevd
sourcestringPåkrevd

HouseholdMilestonesResponse

FeltTypePåkrevd
milestonesHouseholdMilestoneResponse[]Påkrevd
firstWeekFirstWeekResponsePåkrevd

ProblemDetails

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

RecordUpgradePromptRequest

FeltTypePåkrevd
momentUpgradeMomentPåkrevd
actionUpgradePromptActionPåkrevd

UpgradeMoment

Type

Verdier

IntroductionQuotaHighSustainedHighUseOverQuota

UpgradePromptAction

Type

Verdier

ShownDismissedOpened

UpgradePromptPeriodResponse

FeltTypePåkrevd
startsAtstring (date-time)Påkrevd
endsAtstring (date-time)Påkrevd
creditsUsedinteger (int32)Påkrevd
creditsLimitinteger (int32)Påkrevd

UpgradePromptResponse

FeltTypePåkrevd
momentUpgradeMomentPåkrevd
showOnHomebooleanPåkrevd
currentPlanCodestringPåkrevd
suggestedPlanCodestringPåkrevd
suggestedMonthlyCreditsinteger (int32)Påkrevd
suggestedPriceMinorinteger (int32) | nullPåkrevd
creditsUsedinteger (int32)Påkrevd
creditsLimitinteger (int32)Påkrevd
resetsAtstring (date-time)Påkrevd
recentPeriodsUpgradePromptPeriodResponse[] | nullPåkrevd

UpgradePromptsResponse

FeltTypePåkrevd
promptsUpgradePromptResponse[]Påkrevd

UsageCreditsResponse

FeltTypePåkrevd
usedinteger (int32)Påkrevd
limitinteger (int32)Påkrevd
remaininginteger (int32)Påkrevd
percentagenumber (double)Påkrevd
bonusinteger (int32)Påkrevd
bonusGrantedinteger (int32)Påkrevd
welcomeRemaininginteger (int32)—
monthlyRemaininginteger (int32)—
drawsFromCreditPot—

UsageLimitsResponse

FeltTypePåkrevd
softLimitReachedbooleanPåkrevd
allowanceSpentbooleanPåkrevd
hardLimitReachedbooleanPåkrevd

UsagePeriodResponse

FeltTypePåkrevd
startsAtstring (date-time)Påkrevd
endsAtstring (date-time)Påkrevd

UsagePlanResponse

FeltTypePåkrevd
codestringPåkrevd
namestringPåkrevd

UsageResponse

FeltTypePåkrevd
periodUsagePeriodResponsePåkrevd
creditsUsageCreditsResponsePåkrevd
limitsUsageLimitsResponsePåkrevd
planUsagePlanResponsePåkrevd
chatTurnCreditsinteger (int32)Påkrevd