Document toolboxDocument toolbox

Beacons API

This guide provides information about how to work with Beacons API. The beacons are necessary for your localization in twinzo digital twin.

Configuration

To connect beacons with twinzo digital twin, visit the course page and find out, how to set up the beacons:

The main information about how to use twinzo´s REST API and how to authorize your access:

Swagger Sector Section

The Swagger Sensors section provides a detailed description of the API for the beacons. For getting data we can use /beacons or /beacons/{id} for specific sectors to get information about sectors.

/beacons

  • use for getting a list of beacons in branche

/beacons/{id}

  • get specific beacon’s information according to the id

Example

There are examples for both /beacons and /beacons/{id} calls below. First is the response you get and then the image with the parameters you have to call for the correct answer. The whole request URL: https://api.twinzo.eu/v3.0/beacons / https://api.twinzo.eu/v3.0/beacons/33

/beacons

[ { "Id": 33, "SectorId": 14, "BranchId": 7, "Mac": "C2:92:1B:23:75:DB", "X": 5268.888, "Y": 8728.265, "Title": "1456", "Active": true, "TypeId": 23, "Position": true, "Geofence": false, "Cluster": "", "LastTimeOnline": 1684749465550, "UseGps": false }, { "Id": 34, "SectorId": 14, "BranchId": 7, "Mac": "CD:EE:35:05:E5:B8", "X": 19267.748, "Y": 8405.245, "Title": "1507", "Active": true, "TypeId": 23, "Position": true, "Geofence": false, "Cluster": "", "LastTimeOnline": 1684749390564, "UseGps": false } ]

 

/beacons/{id} (/beacons/33)

{ "Id": 33, "SectorId": 14, "BranchId": 7, "Mac": "C2:92:1B:23:75:DB", "X": 5268.888, "Y": 8728.265, "Title": "1456", "Active": true, "TypeId": 23, "Position": true, "Geofence": false, "Cluster": "", "LastTimeOnline": 1684749465550, "UseGps": false }

 

 

Data Properties

The request answer you get is JSON with the single beacon (one object) or a list of beacons (more objects) in the requested branch. Every object contains 14 parameters.

Id

An integer that represents beacon id.

SectorId

An integer that represents sector id.

BranchId

An integer that represents Branch id.

Mac

A string that represents the MAC address of the beacon.

X

A float that represents the position on X axis in the sector in millimetres (mm).

Y

A float that represents the position on Y axis in the sector in millimetres (mm).

Title

A string that represents the name of the beacon.

Active

A boolean that represents if the beacons is active or not.

TypeId

An integer that represents beacon´s type.

Position

A boolean that represents if the beacon´s position is static or not.

Geofence

A boolean that influences the final position calculation.

Cluster

Deprecated - will be deleted in future releases.

LastTimeOnline

A Unix timestamp in milliseconds that represents the time when the beacon was catched last time.

UseGps

A boolean that influences the final position calculation affected by GPS coordinates.

More information about parameters is available here: Beacons settings explained.

TypeId

BLE

23

BLE-C

85

UWB

24

PRECOG

93

 

If you encounter any issues or need assistance with using this product, please do not hesitate to reach out for support. Our team is here to help you resolve any problems and answer any questions you may have.
To create a support ticket, visit our support portal at https://partner.twinzo.eu/helpdesk/customer-care-1