Geozones API
API methods to manage Geozones
getNearestZone
Called internally from the SDK. Gets the parameters of the nearest geozone and a distance to it. Also records the device location for geo push notifications.
POST
https://api.pushwoosh.com/json/1.3/getNearestZone
Called internally from the SDK. Gets the parameters of the nearest geozone and a distance to it. Also records the device location for geo push notifications.
Request Body
Name | Type | Description |
---|---|---|
application* | string | Pushwoosh application code. |
hwid* | string | Hardware device id used in /registerDevice request. |
lat* | string | Latitude of the device. |
lng* | string | Longitude of the device. |
addGeoZone
Adds a Geozone to an app.
POST
https://api.pushwoosh.com/json/1.3/addGeoZone
Adds a Geozone to a particular app.
Request Body
Name | Type | Description |
---|---|---|
auth* | string | API access token from Pushwoosh Control Panel. |
application* | string | Pushwoosh application code. |
geozones* | array | Geozone parameters. Can be a JSON array. See details in a request example below. |
geozones.name* | string | Geozone name. |
geozones.lat* | string | Geozone latitude. |
geozones.lng* | string | Geozone longitude. |
geozones.cooldown* | integer | Silent period after sending a notification (in seconds). |
geozones.range* | integer | in meters, from 50 to 1000. Range of the geozone. |
geozones.content* | string or object | Geozone message's content. Required if 'presetCode' field is empty. |
geozones.presetCode | string | Push preset could be used instead of content field. Note: REQUIRED if content field is empty. |
geozones.cluster | string | Specify null to unbind cluster from GeoZone. |
geozones.campaign | string | Specify null to unbind Campaign from GeoZone. If omit then Campaign value will not be changed. Has higher priority than Campaign from preset |
geozones.timetable | object | Sets timetable intervals. |
updateGeoZone
Updates Geozone properties.
POST
https://api.pushwoosh.com/json/1.3/updateGeoZone
Updates Geozone properties.
Request Body
Name | Type | Description |
---|---|---|
auth* | string | API access token from Pushwoosh Control Panel. |
geoZoneId* | string | Geozone ID from /addGeoZone request. |
name | string | New Geozone name. |
cooldown | integer | Cooldown to update, in seconds. |
status | integer | 0 - deactivated, 1 - activated. |
content | string | Content for Geozone push notification. Cannot be used with presetCode. |
cluster | string | New cluster name. Specify 'null' to unbind cluster from Geozone. |
campaign | string | New campaign ID. Specify 'null' to unbind Campaign from Geozone. If omitted, Campaign value won't be changed. Has higher priotiy than a Campaign from a preset. |
lat | number | Geozone latitude. |
lng | number | Geozone longitude. |
range | integer | New range in meters. |
timetable | object | Geozone timetable. See more info below. |
For Custom Plan subscriptions only. For more details, please contact our Sales team.
deleteGeoZone
Removes Geozones from the app.
POST
https://api.pushwoosh.com/json/1.3/deleteGeoZone
Removes Geozones from the app.
Request Body
Name | Type | Description |
---|---|---|
auth* | string | API access token from Pushwoosh Control Panel. |
application* | string | Pushwoosh application code. |
geozones* | string | Array of IDs or a single ID of a Geozone to remove. |
For Custom Plan subscriptions only. For more details, please contact our Sales team.
addGeoZoneCluster
Adds Geozone Cluster to the app.
POST
https://api.pushwoosh.com/json/1.3/addGeoZoneCluster
Adds Geozone Cluster to the app.
Request Body
Name | Type | Description |
---|---|---|
auth* | string | API access token from Pushwoosh Control Panel. |
application* | string | Pushwoosh application code. |
name* | string | Cluster name. |
cooldown* | integer | A delay before a single user can receive the same message from the Geozone Cluster, in seconds. |
For Custom Plan subscriptions only. For more details, please contact our Sales team.
deleteGeoZoneCluster
Removes a Geozone Cluster from the app.
POST
https://api.pushwoosh.com/json/1.3/deleteGeoZoneCluster
Removes a Geozone Cluster from the app.
Request Body
Name | Type | Description |
---|---|---|
auth* | string | API access token from Pushwoosh Control Panel. |
application* | string | Pushwoosh application code. |
geoZoneCluster* | string | ID of the Geozone cluster to remove. |
For Custom Plan subscriptions only. For more details, please contact our Sales team.
listGeoZones
Retrieves a list of Geozones for the app.
POST
https://api.pushwoosh.com/json/1.3/listGeoZones
Retrieves a list of Geozones for the app.
Request Body
Name | Type | Description |
---|---|---|
auth* | string | API access token from Pushwoosh Control Panel. |
application* | string | Pushwoosh application code. |
For Custom Plan subscriptions only. For more details, please contact our Sales team.
listGeoZoneClusters
Retrieves a list of Geozone clusters for the app.
POST
https://api.pushwoosh.com/json/1.3/listGeoZoneClusters
Retrieves a list of Geozone clusters for the app.
Request Body
Name | Type | Description |
---|---|---|
auth | string | API access token from Pushwoosh Control Panel. |
application | string | Pushwoosh application code. |
For Custom Plan subscriptions only. For more details, please contact our Sales team.
Last updated