Pushes

Get All Push Notifications

Enables you to get all push notifications for a specific location. Support requests: GET & POST;

GET SERVER_URL/pushes/getAll?userHash={userHash}&locationId={locationId}&format={format}

Parameters

Empty request returns all pushes, beacons, zones

Parameter Return Value
{userHash} hash of the registered user
{locationId} ID of the specific location, for which you want to get the full list of push notifications.
{format} json

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
56
57
58
59
60
61
62
63
64
65
{
   "output":{
      "data":{
         "success":true,
         "location":{
            "id":1568,
            "user_id":2057,
            "title":"All_pushes",
            "description":"All pushes in the sublocation",
            "active":true,
            "state":1,
            "sublocations":[
               {
                  "zoneId":2766,
                  "id":2766,
                  "title":"Sublocation1",
                  "map_id":1568,
                  "beacons":[
                     {
                        "id":131969,
                        "oldId":null,
                        "actions":[
                           {
                              "id":1558,
                              "active":1,
                              "title":"beacon1",
                              "content":"desc",
                              "creationDate":"2016-06-03 14:07:12",
                              "frequency":1,
                              "priority":1,
                              "proximity":"Immediate",
                              "when":"On enter",
                              "duration":1,
                              "image":"http://client2.navigine.com"
                           }
                        ],
                        "zoneId":2766,
                        "kx":"0.15533635",
                        "ky":"0.72757697",
                        "description":"first_beacon",
                        "uuid":"JKJHLKJG-LKJG-KUGK-YUGL-IUYGLIUYGKUY",
                        "major":1,
                        "minor":1,
                        "pw":"-1",
                        "bt":"unavailable",
                        "txPower":null,
                        "pathlostExponent":null,
                        "height":null,
                        "isUsed":1
                     }
                  ],
                  "w":"67.00000",
                  "h":"60.00000",
                  "lat":"59.894372694905",
                  "lon":"30.264313817024",
                  "hor":"-27.04000",
                  "pw":"1200.00000",
                  "ph":"873.00000"
               }
            ]
         }
      },
      "code":200
   }
}

Get Push

Enables you to get a specific push notification. Support requests: GET & POST;

GET SERVER_URL/pushes/getPush?actionId={actionId}&userHash={userHash}&format={format}

Request Parameters

Parameter Return Value
{format} JSON
{userHash} hash of the registered user
{actionId} ID of the specific push, for which you want to get information.

JSON Request Example

1
2
3
4
5
{
    "userHash": "A50D-D205-425C-8A5B",
    "format": "json",
    "actionId": "1558"
}

Add New Push Notification

POST SERVER_URL/pushes/addPush?userHash={userHash}&sublocationId={sublocationId}&format={format}

Enables you to add new push notification.

Request Parameters

Parameter Return Value
{userHash} hash of the registered user
{sublocationId} ID of the sublocation, for which you are adding the push notification
{format} JSON

Body form-data parameters

Parameter Return Value
{actionbeacons} Comma-separated list of attached (related) beacons.
{title} Name (title) of the push notification.
{content} Description of the push notification.
{frequency} Push broadcasting frequency.
{when} Condition for showing the push.
{duration} Push activity duration.
{proximity} Push appearance condition: distance between user and venue.
{active} Push activeness (enabled/diabled status).
{imageExist} Message shown with the push notification.
{schedule_monday_is_open} Toggles push activeness for the specified day (Monday in this example).
{schedule_monday_start} Sets working hours START value.
{schedule_monday_end} Sets working hours END value.

JSON Request 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
{
   "format": "json",
   "userHash": "A50D-D205-425C-8A5B",
   "sublocationId": "2769"
   "actionbeacons":131972,
   "title":"title",
   "content":"content",
   "frequency":1,
   "priority":1,
   "when":"on enter",
   "duration":1,
   "proximity":"immediate",
   "active":1,
   "imageExist":0,
   "schedule_monday_is_open":1,
   "schedule_monday_start":"11:00",
   "schedule_monday_end":"12:00",
   "schedule_tuesday_is_open":1,
   "schedule_tuesday_start":"11:00",
   "schedule_tuesday_end":"12:00",
   "schedule_wednesday_is_open":1,
   "schedule_wednesday_start":"11:00",
   "schedule_wednesday_end":"12:00",
   "schedule_thursday_is_open":1,
   "schedule_thursday_start":"11:00",
   "schedule_thursday_end":"12:00",
   "schedule_friday_is_open":1,
   "schedule_friday_start":"11:00",
   "schedule_friday_end":"12:00",
   "schedule_saturday_is_open":1,
   "schedule_saturday_start":"11:00",
   "schedule_saturday_end":"12:00",
   "schedule_sunday_is_open":1,
   "schedule_sunday_start":"11:00",
   "schedule_sunday_end":"12:00"
}

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
{
   "output":{
      "action":{
         "id":"",
         "active":true,
         "title":"title",
         "content":"content",
         "creationDate":"",
         "frequency":1,
         "priority":1,
         "proximity":"immediate",
         "when":"on enter",
         "duration":1,
         "image":"http://client2.navigine.com",
         "schedule":{
            "monday":{
               "is_open":1,
               "start":"11:00",
               "end":"12:00"
            },
            "tuesday":{
               "is_open":1,
               "start":"11:00",
               "end":"12:00"
            },
            "wednesday":{
               "is_open":1,
               "start":"11:00",
               "end":"12:00"
            },
            "thursday":{
               "is_open":1,
               "start":"11:00",
               "end":"12:00"
            },
            "friday":{
               "is_open":1,
               "start":"11:00",
               "end":"12:00"
            },
            "saturday":{
               "is_open":1,
               "start":"11:00",
               "end":"12:00"
            },
            "sunday":{
               "is_open":1,
               "start":"11:00",
               "end":"12:00"
            }
         }
      }
   }
}

Edit Push Notification

POST SERVER_URL/pushes/editPush?userHash={userHash}&actionId={actionId}&format={format}

Enables you to edit a push. Make sure you to the following

  1. Get information about the push. Refer to section Get Push for details.
  2. Then use the following request template:

Request Parameters

Parameter Return Value
{userHash} hash of the registered user
{actionId} Id of the push notification to modify.
{format} JSON

Body form-data parameters

Parameter Return Value
{actionbeacons} Comma-separated list of attached (related) beacons.
{title} Name (title) of the push notification.
{content} Description of the push notification.
{frequency} Push broadcasting frequency.
{when} Condition for showing the push.
{duration} Push activity duration.
{proximity} Push appearance condition: distance between user and venue.
{active} Push activeness (enabled/diabled status).
{imageExist} Message shown with the push notification.
{schedule_monday_is_open} Toggles push activeness for the specified day (Monday in this example).
{schedule_monday_start} Sets working hours START value.
{schedule_monday_end} Sets working hours END value.

JSON Request 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
{
   "format": "json",
   "userHash": "A50D-D205-425C-8A5B",
   "sublocationId": "2769"
   "actionbeacons":131972,
   "title":"titlesss",
   "content":"content",
   "frequency":1,
   "priority":1,
   "when":"on enter",
   "duration":1,
   "proximity":"immediate",
   "active":1,
   "imageExist":0,
   "schedule_monday_is_open":1,
   "schedule_monday_start":"11:00",
   "schedule_monday_end":"12:00",
   "schedule_tuesday_is_open":1,
   "schedule_tuesday_start":"11:00",
   "schedule_tuesday_end":"12:00",
   "schedule_wednesday_is_open":1,
   "schedule_wednesday_start":"11:00",
   "schedule_wednesday_end":"12:00",
   "schedule_thursday_is_open":1,
   "schedule_thursday_start":"11:00",
   "schedule_thursday_end":"12:00",
   "schedule_friday_is_open":1,
   "schedule_friday_start":"11:00",
   "schedule_friday_end":"12:00",
   "schedule_saturday_is_open":1,
   "schedule_saturday_start":"11:00",
   "schedule_saturday_end":"12:00",
   "schedule_sunday_is_open":1,
   "schedule_sunday_start":"11:00",
   "schedule_sunday_end":"12:00"
}

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
{
   "action":{
      "id":1585,
      "active":1,
      "title":"titlesss",
      "content":"content",
      "creationDate":"2016-06-06 17:07:06",
      "frequency":1,
      "priority":1,
      "proximity":"immediate",
      "when":"on enter",
      "duration":1,
      "image":"http://client2.navigine.com",
      "schedule":{
         "monday":{
            "is_open":1,
            "start":"11:00",
            "end":"12:00"
         },
         "tuesday":{
            "is_open":1,
            "start":"11:00",
            "end":"12:00"
         },
         "wednesday":{
            "is_open":1,
            "start":"11:00",
            "end":"12:00"
         },
         "thursday":{
            "is_open":1,
            "start":"11:00",
            "end":"12:00"
         },
         "friday":{
            "is_open":1,
            "start":"11:00",
            "end":"12:00"
         },
         "saturday":{
            "is_open":1,
            "start":"11:00",
            "end":"12:00"
         },
         "sunday":{
            "is_open":1,
            "start":"11:00",
            "end":"12:00"
         }
      }
   }
}

Delete Push Notification

GET SERVER_URL/pushes/deletePush?actionId={actionId}&userHash={userHash}&format={fornat}

Enables you to delete a push notification from the database.

Request Parameters

Parameter Return Value
{userHash} hash of the registered user
{format} JSON
{actionId} Id of the push notification to remove.

JSON Request Example

1
2
3
4
5
{
   "format": "json",
   "userHash": "A50D-D205-425C-8A5B",
   "actionId":1593,
}

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
{
   "action":{
      "id":1593,
      "active":1,
      "title":"titlesss",
      "content":"content",
      "creationDate":"2016-06-06 18:04:04",
      "frequency":1,
      "priority":1,
      "proximity":"immediate",
      "when":"on enter",
      "duration":1,
      "image":"http://client2.navigine.com",
      "schedule":{
         "monday":{
            "is_open":1,
            "start":"11:00",
            "end":"12:00"
         },
         "tuesday":{
            "is_open":1,
            "start":"11:00",
            "end":"12:00"
         },
         "wednesday":{
            "is_open":1,
            "start":"11:00",
            "end":"12:00"
         },
         "thursday":{
            "is_open":1,
            "start":"11:00",
            "end":"12:00"
         },
         "friday":{
            "is_open":1,
            "start":"11:00",
            "end":"12:00"
         },
         "saturday":{
            "is_open":1,
            "start":"11:00",
            "end":"12:00"
         },
         "sunday":{
            "is_open":1,
            "start":"11:00",
            "end":"12:00"
         }
      }
   },
   "success":"Push has been removed"
}