Stores

The stores the household shops at and the prices Bryti has seen.7 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}/loyalty-programs

List the loyalty programs available in the household's country

Any member (#579).

Parameters

NameInTypeRequiredDescription
householdIdpathstring (uuid)Required—

Responses

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
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/loyalty-programs"

Example response

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

Parameters

NameInTypeRequiredDescription
householdIdpathstring (uuid)Required—

Responses

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
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/stores"

Example response

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.

Parameters

NameInTypeRequiredDescription
householdIdpathstring (uuid)Required—

Request body

application/jsonRequiredPutHouseholdStoresRequest

Responses

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
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 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"}]}'

Example response

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.

Parameters

NameInTypeRequiredDescription
householdIdpathstring (uuid)Required—
addressquerystring——
latquerynumber (double)——
lngquerynumber (double)——

Responses

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

store_search_bad_point
store_search_needs_place
— Give an address, or use your location, to look for shops.

Example

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

Example response

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.

Parameters

NameInTypeRequiredDescription
householdIdpathstring (uuid)Required—
latquerynumber (double)——
lngquerynumber (double)——

Responses

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

store_search_bad_point

Example

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

Example response

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.

Parameters

NameInTypeRequiredDescription
householdIdpathstring (uuid)Required—
queryquerystring——

Responses

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
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/stores/address-suggestions"

Example response

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

Parameters

NameInTypeRequiredDescription
householdIdpathstring (uuid)Required—
monthsqueryinteger (int32)——

Responses

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
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/insights/dinner-spend"

Example response

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

Schemas

AddressSuggestionResponse

PropertyTypeRequired
textstringRequired

DinnerSpendDinner

PropertyTypeRequired
datestring (date)Required
titlestringRequired
portionsinteger (int32)Required
paidnumber (double) | nullRequired
perPortionnumber (double) | nullRequired

DinnerSpendMonth

PropertyTypeRequired
monthstringRequired
dinnernumber (double) | nullRequired
othernumber (double) | nullRequired
uncertainnumber (double) | nullRequired
receiptCountinteger (int32)Required
perDinnerDinnerSpendDinner[]Required

DinnerSpendResponse

PropertyTypeRequired
currencystringRequired
minimumReceiptsinteger (int32)Required
monthsDinnerSpendMonth[]Required

HouseholdStoreResponse

PropertyTypeRequired
idstring (uuid)Required
externalStoreIdstring | nullRequired
chainCodestringRequired
namestringRequired
addressstring | nullRequired
fromReceiptboolean—

LoyaltyProgramResponse

PropertyTypeRequired
codestringRequired
displayNamestringRequired

NearbyStoreResponse

PropertyTypeRequired
externalStoreIdstring | nullRequired
chainCodestringRequired
namestringRequired
addressstring | nullRequired
distanceMetersnumber (double) | nullRequired

NearbyStoresResponse

PropertyTypeRequired
addressFoundbooleanRequired
storesNearbyStoreResponse[]Required

ProblemDetails

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

PutHouseholdStoresRequest

PropertyTypeRequired
storesStoreSelection[]Required

ReverseGeocodeResponse

PropertyTypeRequired
addressstring | nullRequired

StoreSelection

PropertyTypeRequired
externalStoreIdstring | nullRequired
chainCodestringRequired
namestringRequired
addressstring | nullRequired