POST /external/v1/snapshot

Headers

  • x-api-key string Required

    Contact team@reelables.com to get an api key.

  • request-id string

    Unique identifier for the API request. Example: f7ecf495-ca1c-4468-a6c2-6ee3f723fa00

application/json

Body Required

Gateway snapshot events payload

  • providerDeviceId string Required

    Identifier of the Gateway device. Example: 'd290f1ee-6c54-4b01-90e6-d701748f0851'

    Maximum length is 50. Format should match the following pattern: ^[-_A-Za-z0-9]*$.

  • data object Required
    Hide data attributes Show data attributes object
    • totalPages integer(int32) Required

      Total number of pages of data. Example: 5

      Minimum value is 1, maximum value is 2147483647.

    • page integer(int32) Required

      Page number. Example: 2

      Minimum value is 1, maximum value is 2147483647.

    • labels array[object] Required

      Labels detected in the snapshot

      Not more than 1000 elements.

      One of:
  • signalStrength number(float)

    Cellular signal strength indicator, in decibels. Example: -30dBm

  • temperature number(float)

    Temperature reported by the Gateway device, in degrees centigrade. Example: -2.1

    Minimum value is -200, maximum value is 500.

  • location object

    Location of the Gateway when snapshot it taken

    Hide location attributes Show location attributes object
    • latitude number(float) Required

      Latitude value of the coordinate. Example: 51.123

      Minimum value is -90, maximum value is 90.

    • accuracy number(float) Required

      The horizontal accuracy of the coordinate, in metres. Example: 18.20

      Minimum value is 0, maximum value is 1000000.

    • longitude number(float) Required

      Longitude value of the coordinate. Example: -0.123

      Minimum value is -180, maximum value is 180.

  • timestamp string(date-time) Required

    Timestamp of the snapshot, in UTC ISO format. Example: '2019-07-21T17:32:28Z'. When the snapshot requires multiple pages to send the full set of Labels that are deteceted, the timestamp must be the same across all pages of data

  • batteryLevel number(float)

    Device battery charge level, as a percentage. Example: 42%

Responses

  • 202

    Events received and queued for processing

  • 400

    Invalid input, object invalid

POST /external/v1/snapshot
curl \
 --request POST 'https://api.reelables.com/gateway/external/v1/snapshot' \
 --header "Content-Type: application/json" \
 --header "x-api-key: string" \
 --header "request-id: string" \
 --data '{"providerDeviceId":"d290f1ee-6c54-4b01-90e6-d701748f0851","data":{"totalPages":1,"page":1,"labels":[{"bleId":34512,"macAddress":"80:EA:00:00:00:7B","rssi":-70,"beaconPayload":"db0a03140000df91645d130004000000aabbcc016a0a717c00000001","enterTimestamp":"2019-07-21T17:32:28Z","temperature":-2.1,"battery":2832,"rawTemperature":43558}]},"signalStrength":-30,"temperature":-2.1,"location":{"latitude":51.5074,"accuracy":18.5,"longitude":-0.1278},"timestamp":"2019-07-21T17:32:28Z","batteryLevel":42}'
Request examples
# Headers
x-api-key: string
request-id: string

# Payload
{
  "providerDeviceId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "data": {
    "totalPages": 1,
    "page": 1,
    "labels": [
      {
        "bleId": 34512,
        "macAddress": "80:EA:00:00:00:7B",
        "rssi": -70,
        "beaconPayload": "db0a03140000df91645d130004000000aabbcc016a0a717c00000001",
        "enterTimestamp": "2019-07-21T17:32:28Z",
        "temperature": -2.1,
        "battery": 2832,
        "rawTemperature": 43558
      }
    ]
  },
  "signalStrength": -30,
  "temperature": -2.1,
  "location": {
    "latitude": 51.5074,
    "accuracy": 18.5,
    "longitude": -0.1278
  },
  "timestamp": "2019-07-21T17:32:28Z",
  "batteryLevel": 42
}