Butikker

Butikkene husholdningen handler i, og prisene Bryti har sett der.7 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}/loyalty-programs

List the loyalty programs available in the household's country

Any member (#579).

Parametre

NavnHvorTypePåkrevdBeskrivelse
householdIdpathstring (uuid)Påkrevd—

Svar

200OK
application/jsonLoyaltyProgramResponse[]
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 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
Hoder
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.

Eksempel

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

Eksempel på svar

200application/json
[
  {
    "code": "string",
    "displayName": "string"
  }
]
GET/api/v1/households/{householdId}/stores

List the stores the household shops at

Any member. Sorted by name, in display form (#1174).

Parametre

NavnHvorTypePåkrevdBeskrivelse
householdIdpathstring (uuid)Påkrevd—

Svar

200OK
application/jsonHouseholdStoreResponse[]
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 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
Hoder
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.

Eksempel

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

Eksempel på svar

200application/json
[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "externalStoreId": "string",
    "chainCode": "string",
    "name": "string",
    "address": "string",
    "fromReceipt": false
  }
]
PUT/api/v1/households/{householdId}/stores

Replace the household's stores with the given set

Adults only; a Junior member gets 403. The whole set is replaced on every save — send every store to keep, not just the new one. Safe to retry.

Parametre

NavnHvorTypePåkrevdBeskrivelse
householdIdpathstring (uuid)Påkrevd—

Forespørselskropp

application/jsonPåkrevdPutHouseholdStoresRequest

Svar

200OK
application/jsonHouseholdStoreResponse[]
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 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
Hoder
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.

Eksempel

curl -b "bryti_session=…" \
  -X PUT \
  "https://bryti.app/api/v1/households/3fa85f64-5717-4562-b3fc-2c963f66afa6/stores" \
  -H "Content-Type: application/json" \
  -d '{"stores":[{"externalStoreId":"string","chainCode":"string","name":"string","address":"string"}]}'

Eksempel på svar

200application/json
[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "externalStoreId": "string",
    "chainCode": "string",
    "name": "string",
    "address": "string",
    "fromReceipt": false
  }
]
GET/api/v1/households/{householdId}/stores/nearby

Find stores near an address or a position

Any member. Send ?address= or ?lat=&lng= — coordinates win when both are sent (#1244). Within 2.5 km, nearest first; AddressFound is false when the address did not geocode, so ask for a better one. 400 when neither is sent, or the point is not on Earth. Each call goes to Kartverket, so it is rate-limited per household — ten map lookups a minute, in one bucket with geocode/reverse (#1619, ADR-127): over the ceiling answers 429 with a Retry-After header.

Parametre

NavnHvorTypePåkrevdBeskrivelse
householdIdpathstring (uuid)Påkrevd—
addressquerystring——
latquerynumber (double)——
lngquerynumber (double)——

Svar

200OK
application/jsonNearbyStoresResponse
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
Hoder
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
Hoder
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.

Problemkoder

`code` i problemkroppen er den du forgreiner på. `detail` er engelsk, skrevet for loggen.

store_search_bad_point
store_search_needs_place
— Oppgi en adresse, eller bruk posisjonen din, for å lete etter butikker.

Eksempel

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

Eksempel på svar

200application/json
{
  "addressFound": false,
  "stores": [
    {
      "externalStoreId": "string",
      "chainCode": "string",
      "name": "string",
      "address": "string",
      "distanceMeters": 0
    }
  ]
}
GET/api/v1/households/{householdId}/stores/geocode/reverse

Turn a position into a street address the household can correct before saving

Any member. The way back from «use my position» on the web (#1265, ADR-113); Address is null when nothing is near the point. 400 when lat or lng is missing or off the globe. Same per-household bucket as nearby — ten lookups a minute (#1619, ADR-127): over the ceiling answers 429 with a Retry-After header.

Parametre

NavnHvorTypePåkrevdBeskrivelse
householdIdpathstring (uuid)Påkrevd—
latquerynumber (double)——
lngquerynumber (double)——

Svar

200OK
application/jsonReverseGeocodeResponse
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
Hoder
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
Hoder
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.

Problemkoder

`code` i problemkroppen er den du forgreiner på. `detail` er engelsk, skrevet for loggen.

store_search_bad_point

Eksempel

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

Eksempel på svar

200application/json
{
  "address": "string"
}
GET/api/v1/households/{householdId}/stores/address-suggestions

Suggest addresses while the household types one

Any member. ?query= shorter than three characters answers an empty list without asking the provider.

Parametre

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

Svar

200OK
application/jsonAddressSuggestionResponse[]
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 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
Hoder
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.

Eksempel

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

Eksempel på svar

200application/json
[
  {
    "text": "string"
  }
]
GET/api/v1/households/{householdId}/insights/dinner-spend

Read what the household's cooked dinners cost per month, from its own receipts

months defaults to 6 and is 1 to 24; the months come oldest first and the last is the household's current month. Any member, a Junior included. Per month: dinner is the receipt lines whose food went into a dinner marked cooked that month, a shared line counted by the share the recipes used; uncertain is a used line whose amount cannot be compared with what was bought; other is the rest of the receipts' totals. A month with fewer than two receipts has null amounts, not zero. Amounts are in the household's currency, and a receipt in another currency is left out (ADR-471).

Parametre

NavnHvorTypePåkrevdBeskrivelse
householdIdpathstring (uuid)Påkrevd—
monthsqueryinteger (int32)——

Svar

200OK
application/jsonDinnerSpendResponse
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 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
Hoder
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.

Eksempel

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

Eksempel på svar

200application/json
{
  "currency": "string",
  "minimumReceipts": 0,
  "months": [
    {
      "month": "string",
      "dinner": 0,
      "other": 0,
      "uncertain": 0,
      "receiptCount": 0,
      "perDinner": [
        {}
      ]
    }
  ]
}

Skjema

AddressSuggestionResponse

FeltTypePåkrevd
textstringPåkrevd

DinnerSpendDinner

FeltTypePåkrevd
datestring (date)Påkrevd
titlestringPåkrevd
portionsinteger (int32)Påkrevd
paidnumber (double) | nullPåkrevd
perPortionnumber (double) | nullPåkrevd

DinnerSpendMonth

FeltTypePåkrevd
monthstringPåkrevd
dinnernumber (double) | nullPåkrevd
othernumber (double) | nullPåkrevd
uncertainnumber (double) | nullPåkrevd
receiptCountinteger (int32)Påkrevd
perDinnerDinnerSpendDinner[]Påkrevd

DinnerSpendResponse

FeltTypePåkrevd
currencystringPåkrevd
minimumReceiptsinteger (int32)Påkrevd
monthsDinnerSpendMonth[]Påkrevd

HouseholdStoreResponse

FeltTypePåkrevd
idstring (uuid)Påkrevd
externalStoreIdstring | nullPåkrevd
chainCodestringPåkrevd
namestringPåkrevd
addressstring | nullPåkrevd
fromReceiptboolean—

LoyaltyProgramResponse

FeltTypePåkrevd
codestringPåkrevd
displayNamestringPåkrevd

NearbyStoreResponse

FeltTypePåkrevd
externalStoreIdstring | nullPåkrevd
chainCodestringPåkrevd
namestringPåkrevd
addressstring | nullPåkrevd
distanceMetersnumber (double) | nullPåkrevd

NearbyStoresResponse

FeltTypePåkrevd
addressFoundbooleanPåkrevd
storesNearbyStoreResponse[]Påkrevd

ProblemDetails

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

PutHouseholdStoresRequest

FeltTypePåkrevd
storesStoreSelection[]Påkrevd

ReverseGeocodeResponse

FeltTypePåkrevd
addressstring | nullPåkrevd

StoreSelection

FeltTypePåkrevd
externalStoreIdstring | nullPåkrevd
chainCodestringPåkrevd
namestringPåkrevd
addressstring | nullPåkrevd