Skip to main content

Store Verification

Store verification endpoint serves for validating the store where a device is present using EDDYSTONE Ephemeral Identifiers (EID) read from the installed BLE beacons. EID identifiers need to be provided (readings field) and the store (store field) will be returned if verification succeeds, else an error will be returned instead.

Resource [POST]

[/stores/verify/]

Request

{
  "readings": ["7ce21f44c8a30614","bc908667616da718","7ce21f44c8a30614"]
}

Response

{
  "store": "AHQ21000"
}

Errors

Bespot API uses HTTP status code 400 to communicate errors. A code, detail JSON structure is used. See below.

Multiple stores

{
  "error_code": "multiple_stores_for_eids",
  "detail": "Multiple stores found (X) for given readings/EIDs."
}

No stores

{
  "error_code": "no_stores_found",
  "detail": "No store found matching the provided identifiers."
}

Example cURL

curl --location --request POST 'https://blueprint.bespot.io/api/stores/verify/' \
--header 'Authorization: Basic afGeTREhfR72AkOlZqLGn4wBXvzVsHJyUI==' \
--header 'Content-Type: application/json' \
--data-raw '{
  "readings": ["bfc0d982cf74aa4c","effab4e23b0b5cdc","adcb8179af7aeb9c"]
}'