Butikker

Butikkene husholdningen handler i, og prisene Bryti har sett der.6 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 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 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"
  }
]
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 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"
  }
]
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 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 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 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"
  }
]

Skjema

AddressSuggestionResponse

FeltTypePåkrevd
textstringPåkrevd

HouseholdStoreResponse

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

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