Stores

The stores the household shops at and the prices Bryti has seen.6 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 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 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"
  }
]
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 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"
  }
]
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 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 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 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"
  }
]

Schemas

AddressSuggestionResponse

PropertyTypeRequired
textstringRequired

HouseholdStoreResponse

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

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