Beacons

Get all Beacons in a Sublocation

Enables you to get all beacons for the selected sublocation in a list. Support requests: GET & POST;

GET SERVER_URL/beacon/getAll?userHash={userHash}&sublocationId={sublocationId}

Requesy Parameters

Parameter Value
{userHash}

hash of the registered user

0000-0000-0000-0000 - for locations with the public_location flag

{sublocationId} ID of the sublocation, for which you want to get a list of beacons.

JSON Response Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
   "response":"ok",
   "beacons":[
      {
         "id":130514,
         "oldId":null,
         "actions":[

         ],
         "zoneId":2666,
         "x":"650.478",
         "y":"1418.623",
         "kx":"0.31303069",
         "ky":"0.68170267",
         "description":"test beacon 1",
         "uuid":"562G2IU2-387B-NSSG-YU38-93GBBVJJNSDB",
         "major":32,
         "minor":32,
         "realX":650.47777382,
         "realY":1418.62325627,
         "pw":"-74",
         "bt":"unavailable",
         "txPower":null,
         "pathlostExponent":null,
         "height":null,
         "isUsed":1,
         "objectType":8
      },
      {
         "id":130515,
         "oldId":null,
         "actions":[

         ],
         "zoneId":2666,
         "x":"1780.230",
         "y":"339.382",
         "kx":"0.85670379",
         "ky":"0.16308594",
         "description":"test beacon 2",
         "uuid":"KH88H4KJ-FMSL-DJF9-23UH-B32JKL4N32KJ",
         "major":43,
         "minor":23,
         "realX":1780.23047562,
         "realY":339.38184114,
         "pw":"-15",
         "bt":"unavailable",
         "txPower":null,
         "pathlostExponent":null,
         "height":null,
         "isUsed":1,
         "objectType":8
      }
   ]
}

Get Info about a Beacon

Enables you to get information about a particular beacon. Support requests: GET & POST;

GET SERVER_URL/beacon/get?userHash={userHash}&beaconId={beaconId}

Request Parameters

Parameter Value
{userHash}

hash of the registered user

0000-0000-0000-0000 - for locations with the public_location flag

{beaconId} ID of the beacon, which information you need to get.

JSON Response Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
   "response":"ok",
   "id":130514,
   "oldId":null,
   "actions":[

   ],
   "zoneId":2666,
   "x":"650.478",
   "y":"1418.623",
   "kx":"0.31303069",
   "ky":"0.68170267",
   "description":"test beacon 1",
   "uuid":"562G2IU2-387B-NSSG-YU38-93GBBVJJNSDB",
   "major":32,
   "minor":32,
   "realX":650.47777382,
   "realY":1418.62325627,
   "pw":"-74",
   "bt":"unavailable",
   "txPower":null,
   "pathlostExponent":null,
   "height":null,
   "isUsed":1
}

Creating a Beacon

Enables you to create a new beacon. Support requests: only POST;

POST SERVER_URL/beacon/add?userHash={userHash}&sublocationId={sublocationId}

Request Parameters

Parameter Value
{userHash}

hash of the registered user

0000-0000-0000-0000 - for locations with the public_location flag

{sublocationId} ID of the specific sublocation (map), for which you create the beacon.

Body form-data parameters

Parameter Value
{title} Name of the new beacon.
{description} Description of the new beacon.
{uuid} The kontakt.io beacon identifier (keep default).
{major} Beacon major identifier (keep default).
{minor} Beacon minor identifier (keep default).
{pw} Transmission power.
{kx} X coefficient
{ky} Y coefficient
{isUsed} Beacon status: used or not (1 or 0)

You can find information on configuring iBeacons on the official kontakt.io website, specifically

JSON Response Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
{
   "response":"ok",
   "id":130526,
   "oldId":null,
   "actions":[

   ],
   "zoneId":2693,
   "kx":0.42,
   "ky":0.107,
   "description":"testbeacon",
   "uuid":"8763YGBM-HDEI-2308-9U4H-B23LKK3LKV3L",
   "major":22,
   "minor":32,
   "pw":-3,
   "bt":"unavailable",
   "txPower":null,
   "pathlostExponent":null,
   "height":null,
   "isUsed":1
}

Editing a Beacon

Enables you to modify an existing beacon's parameters. Support requests: only POST;

POST SERVER_URL/beacon/edit?userHash={userHash}&beaconId={beaconId}

Request Parameters

Parameter Value
{userHash}

hash of the registered user

0000-0000-0000-0000 - for locations with the public_location flag

{beaconId} ID of the specific beacon that you want to modify.

Body form-data parameters

Parameter Value
{title} Name of the new beacon.
{description} Description of the new beacon.
{uuid} The kontakt.io beacon identifier (keep default).
{major} Beacon major identifier (keep default).
{minor} Beacon minor identifier (keep default).
{pw} Transmission power.
{kx} X coefficient
{ky} Y coefficient
{isUsed} Beacon status: used or not (1 or 0)

You can find information on configuring iBeacons on the official kontakt.io website, specifically

JSON Response Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
{
   "response":"ok",
   "id":130538,
   "oldId":null,
   "actions":[

   ],
   "zoneId":2693,
   "kx":0.24,
   "ky":0.701,
   "description":"new_description",
   "uuid":"8763YGBM-HDEI-xxxx-9U4H-B23LKK3LKV3L",
   "major":23,
   "minor":27,
   "pw":-9,
   "bt":"unavailable",
   "txPower":null,
   "pathlostExponent":null,
   "height":null,
   "isUsed":1
}

Delete a Beacon

Enables you to remove existing beacons. Support requests: only POST;

POST SERVER_URL/beacon/delete?userHash={userHash}&beaconId={beaconId}

Request Parameters

Parameter Value
{userHash} hash of the registered user
{beaconId} | ID of the beacon that you want to delete.

JSON Response Example

1
2
3
4
{
   "response":"ok",
   "msg":"the beacon deleted"
}