Beaconcoordinates API documentation

1. Introduction

This document gives you all the information necessary to connect external services with our system and gather beacon coordinate data.

Our Beaconcoordinates API offers a set of callable methods that you can send requests to. All of these requests should be POST.

As response you will get a JSON encoded object. In case of a non-successful response, you will get an error code and a message.

Timezone for requests and responses is UTC.

2. Authentification

All requests to the API must contain the parameter api_token. The API token is used to identify your user account.

  Please log in to see your personal API token here. 

Please make sure that your API token is handled with care. In case your token has been compromised, contact us immediately.

Note: As the API is optimised for performance, beacon permissions granted through the platform are not taken into account by the API. Therefore, please always use the API token of the user account that owns the relevant entities (beacons) (i.e. the user account which can grant permissions to other users).

3. Response codes

In the JSON encoded response object you will find the fields response.code and response.status. The possible values for these fields are:

  code 200 (OK) / status "success"
  code 401 (Unauthorized) / status "error"
  code 404 (Not found) / status "error"

In case of an error you will find further details in response.message.

4. Beacons

4.1. List beacons

  API endpoint: https://www.gps365.at/api/beacons/list

Returns a list of all beacons belonging to the given user.

Request parameters

Parameter Description
api_token
(required)
The API token belonging to your user account.
(e.g. 392ea8428d10b0392c399c93810045a9)

Request example

curl -X POST https://www.gps365.at/api/beacons/list \
     -d api_token="392ea8428d10b0392c399c93810045a9"

Response example

{
  "response": {
    "status": "success",
    "code": 200,
    "message": "OK"
  },
  "result": [
    {
      "id": 100000,
      "title": "Beacon #1",
      "description": "First beacon",
      "group": "Beacons",
      "beacon_address": "a12b34c56d78"
    },
    {
      "id": 100001,
      "title": "Beacon #2",
      "description": null,
      "group": "Beacons",
      "beacon_address": "a12b34c56d79"
    }
  ]
}

Response data

Field Description
id The unique ID of the beacon which is immutable.
title The title of the beacon which can be edited by the user.
description The description of the beacon which can be edited by the user. It is an optional field and thus can be null.
group The group of the beacon which can be edited by the user.
beacon_address The address of the beacon which is set by a technical administrator.

5. Beaconcoordinates

5.1. Get latest beaconcoordinates

  API endpoint: https://www.gps365.at/api/beaconcoordinates/live

Returns the most recent coordinate for every beacon belonging to the user (only one row per beacon). The returned data object is indexed by the beacon IDs.

Request parameters

Parameter Description
api_token
(required)
The API token belonging to your user account.
(e.g. 392ea8428d10b0392c399c93810045a9)
beacons
(optional)
Array of beacon IDs in case you only want to query certain beacons.

Request example
(only requesting data for beacons IDs 100000 and 100001)

curl -X POST https://www.gps365.at/api/beaconcoordinates/live \
     -d api_token="392ea8428d10b0392c399c93810045a9" \
     -d beacons[]="100000" \
     -d beacons[]="100001"

Response example

{
  "response": {
    "status": "success",
    "code": "200",
    "message":"OK"
  },
  "result": {
    "100": {
      "beacon_id": 100000, 
      "date": "2024-05-05 19:47:22",
      "latitude": 48.164235,
      "longitude": 16.189012
    },
    "101": {
      "beacon_id": 100001,
      "date": "2024-05-05 19:42:52",
      "latitude": 47.975134,
      "longitude": 15.824156
    }
  }
}

Response data

Field(s) Description
beacon_id The ID of the beacon which the coordinate belongs to.
date The date when the beaconcoordinate was saved, timezone is UTC.
latitude / longitude The latitude / longitude of the beaconcoordinate in Decimal Degrees format (WGS84).

› API overview

This site uses cookies. If you continue to use the website, we will assume your consent. You can find more information about our handling of personal data in our Data protection.