Sublocations

Get Info about Sublocation

Returns information about the selected sublocation. Support requests: GET & POST

GET SERVER_URL/sublocation/get?userHash={userHash}&sublocationId={sublocationId}

Request Parameters

Parameter Value
{userHash} Hash of the registered user
{sublocationId} Id of the sublocation, which info you want 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
    {
       "zoneId":2648,
       "id":2648,
       "title":"testapi1_sub",
       "map_id":1440,
       "beacons":{

       },
       "w":"19.00000",
       "h":"76.00000",
       "lat":"32.000000000000",
       "lon":"34.000000000000",
       "hor":"45.00000",
       "pw":"295.00000",
       "ph":"160.00000",
       "map":{
              "id":1440,
              "user_id":744,
              "title":"testapi1_1",
              "description":"4sdsadsdsadsds",
              "active":true,
              "state":1
       },
       "files":[
              {
                     "id":40612,
                     "object":"Svo\\CommonBundle\\Entity\\Zone",
                     "objectId":2648,
                     "path":"\/files\/",
                     "name":"testapi1_1.testapi1_sub_1461594173.png",
                     "w":"295.00000",
                     "h":"160.00000",
                     "lat":"32",
                     "lon":"34",
                     "hor":45,
                     "type":"image\/png",
                     "state":null,
                     "fullPath":"http:\/\/api.navigine.com\/files\/testapi1_1.testapi1_sub_1461594173.png"
              }
       ]
    }

Create New Sublocation

Creates new sublocation according to parameters specified. Support requests: only POST;

POST SERVER_URL/sublocation/add?userHash={userHash}&locationId={locationId}

Request Parameters

Parameter Value
{userHash} Hash of the registered user
{locationId} Id of the location, in which you want to create a new sublocation.

Body form-data parameters

Parameter Value
{title} Name of the new sublocation.
{hor}

Angle between the North and the direction corresponding to the vertical axis of the picture you attach while creating the sublocation. The angle is measured in degrees clockwise from the North direction.

Default value is 0.

{timezone} Timezone value.
{lat}

GPS location latitude parameter corresponding to bottom left corner of the picture you add while creating the sublocation

Default value is 0.

{lon}

GPS location longitude parameter corresponding to bottom left corner of the picture you add while creating the sublocation

Default value is 0.

{filewidth} Width of the input image file. (optional)
{filehight} Hight of the input image file. (optional)
{files} Image file used as the sublocation map. Consider using actual location blueprints.

JSON Response Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
    {
       "response":"ok",
       "zoneId":2648,
       "id":2648,
       "title":"testapi1_sub",
       "map_id":1440,
       "beacons":{

       },
       "w":"19",
       "h":"76",
       "lat":32,
       "lon":34,
       "hor":45,
       "pw":295,
       "ph":160,
       "creatVersion":0
    }

Editing Sublocations

Enables you to edit an existing sublocation. Support requests: only POST;

POST SERVER_URL/locations/edit?userHash={userHash}&sublocationId={locationId}

Request Parameters

Parameter Value
{userHash} Hash of the registered user
{sublocationId} Id of the sublocation that you want to modify.

Body form-data parameters

Parameter Value
{userHash} Hash of the registered user
{sublocationId} Id of the sublocation that you want to modify.
{title} Name of the new sublocation.
{hor}

Angle between the North and the direction corresponding to the vertical axis of the picture you attach while creating the sublocation. The angle is measured in degrees clockwise from the North direction.

Default value is 0.

{timezone} Timezone value.
{lat}

GPS location latitude parameter corresponding to bottom left corner of the picture you add while creating the sublocation

Default value is 0.

{lon}

GPS location longitude parameter corresponding to bottom left corner of the picture you add while creating the sublocation

Default value is 0.

{filewidth} Width of the input image file. (optional)
{filehight} Hight of the input image file. (optional)
{files} Image file used as the sublocation map. Consider using actual location blueprints.

JSON Response Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
    {
       "response":"ok",
       "zoneId":2648,
       "id":2648,
       "title":"testapi1_sub2",
       "map_id":1440,
       "beacons":{

       },
       "w":19,
       "h":76,
       "lat":32,
       "lon":34,
       "hor":45,
       "pw":295,
       "ph":160
    }

Deleting Sublocations

Enables you to delete a sublocation. Support requests: GET & POST;

POST SERVER_URL/sublocation/delete?userHash={userHash}&sublocationId={locationId}

Request Parameters

Parameter Value
{userHash} Hash of the registered user
{sublocationId} Id of the sublocation that you want to remove.

JSON Response Example

1
2
3
    {
       "response":"ok"
    }

Changing Sublocation Size

Enables you to change sublocation width and height. Support requests: only POST;

POST SERVER_URL/sublocation/updateMeasure?userHash={userHash}&sublocationId={locationId}

Request Parameters

Parameter Value
{userHash} Hash of the registered user
{sublocationId} Id of the sublocation that you want to remove.

Body form-data parameters

Parameter Value
{height} height of sublocation
{width} width of sublocation

JSON Response Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
    {
       "response":"ok",
       "zoneId":2648,
       "id":2648,
       "title":"testapi1_sub2",
       "map_id":1440,
       "beacons":{

       },
       "w":"13",
       "h":"43",
       "lat":"32.000000000000",
       "lon":"34.000000000000",
       "hor":"45.00000",
       "pw":"295.00000",
       "ph":"160.00000"
    }