Geozones API
getNearestZone
Anchor link toWird intern vom SDK aufgerufen. Ruft die Parameter der nächstgelegenen Geozone und die Entfernung zu ihr ab. Zeichnet auch den Gerätestandort für Geo-Push-Benachrichtigungen auf.
POST https://api.pushwoosh.com/json/1.3/getNearestZoneRequest body parameters
Anchor link to| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
| application | string | Ja | Pushwoosh-Anwendungscode |
| hwid | string | Ja | Hardware-Geräte-ID, die in der Anfrage /registerDevice verwendet wird. |
| lat | string | Ja | Breitengrad des Geräts. |
| lng | string | Ja | Längengrad des Geräts. |
Request example
Anchor link to{ "request": { "application": "APPLICATION_CODE", "hwid": "HWID", "lat": 10.12345, "lng": 28.12345 }}PHP example
Anchor link to// See http://gomoob.github.io/php-pushwoosh/get-nearest-zone.html
use Gomoob\Pushwoosh\Model\Request\GetNearestZoneRequest;
// Creates the request instance$request = GetNearestZoneRequest::create() ->setHwid('HWID') ->setLat(10.12345) ->setLng(28.12345);
// Call the '/getNearestZone' Web Service$response = $pushwoosh->getNearestZone($request);
if ($response->isOk()) { print 'Zone name : ' . $response->getResponse()->getName(); print 'Latitude : ' . $response->getResponse()->getLat(); print 'Longitude : ' . $response->getResponse()->getLng(); print 'Range : ' . $response->getResponse()->getRange(); print 'Distance : ' . $response->getResponse()->getDistance();} else { print 'Oops, the operation failed :-('; print 'Status code : ' . $response->getStatusCode(); print 'Status message : ' . $response->getStatusMessage();}addGeoZone
Anchor link toFügt einer bestimmten App eine Geozone hinzu.
POST https://api.pushwoosh.com/json/1.3/addGeoZoneRequest body parameters
Anchor link to| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
| auth | string | Ja | API-Zugriffstoken aus dem Pushwoosh Control Panel. |
| application | string | Ja | Pushwoosh-Anwendungscode |
| geozones | array | Ja | Geozone-Parameter als JSON-Array. |
| geozones.name | string | Ja | Name der Geozone. |
| geozones.lat | string | Ja | Breitengrad der Geozone. |
| geozones.lng | string | Ja | Längengrad der Geozone. |
| geozones.cooldown | integer | Ja | Ruhezeit nach dem Senden einer Benachrichtigung (in Sekunden). |
| geozones.range | integer | Ja | Reichweite der Geozone (in Metern, von 50 bis 1000). |
| geozones.content | string or object | Erforderlich, wenn presetCode leer ist. | Inhalt der Geozone-Nachricht. |
| geozones.presetCode | string | Erforderlich, wenn content leer ist. | Push-Preset, das anstelle von content verwendet werden soll. |
| geozones.cluster | string | Nein | Geben Sie null an, um die Verknüpfung eines Clusters mit der Geozone aufzuheben. |
| geozones.campaign | string | Nein | Geben Sie null an, um die Verknüpfung einer Kampagne mit der Geozone aufzuheben. Wenn weggelassen, bleibt der Kampagnenwert unverändert. Hinweis: Hat höhere Priorität als die Kampagne im Preset. |
| geozones.timetable | object | Nein | Legt Zeitplanintervalle fest. |
Request example
Anchor link to{ "request": { "auth": "yxoPUlwqm............pIyEX4H", // API access token from Pushwoosh Control Panel "application": "XXXXX-XXXXX", // Pushwoosh application code "geozones": [{ "name": "Statue of George", // required. Geozone name. "lat": "40.70087797", // required. Geozone latitude. "lng": "-73.931851387", // required. Geozone longitude. "cooldown": 60, // in seconds, required. Silent period after sending a notification "range": 50, // in meters, from 50 to 1000, required. Range of the geozone. "content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", // or object "presetCode": "AAAAA-BBBBB", // optional. Push preset could be used instead of content "cluster": "GEOZONE CLUSTER CODE", // optional. Cluster's cooldown period will be applied "campaign": "CAMPAIGN_CODE", // optional. Specify null to unbind Campaign from Geozone "timetable": { // optional "timezone": 1234, // in seconds "Mon": [ // available days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. Push sending { "start": "04:11", "stop": "12:00" } ], "Sun": [ { // one or two intervals "start": "01:11", "stop": "17:00" }, { "start": "18:01", "stop": "23:59" } ] } }] }}updateGeoZone
Anchor link toAktualisiert Geozone-Eigenschaften.
POST https://api.pushwoosh.com/json/1.3/updateGeoZoneRequest body parameters
Anchor link to| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
| auth | string | Ja | API-Zugriffstoken aus dem Pushwoosh Control Panel. |
| geoZoneId | string | Ja | Geozone-ID aus der Anfrage /addGeoZone. |
| name | string | Nein | Neuer Name der Geozone. |
| cooldown | integer | Nein | Zu aktualisierende Ruhezeit (Cooldown), in Sekunden. |
| status | integer | Nein | 0 - deaktiviert, 1 - aktiviert. |
| content | string | Nein | Inhalt für die Geozone-Push-Benachrichtigung. Kann nicht zusammen mit presetCode verwendet werden. |
| cluster | string | Nein | Neuer Cluster-Name. Geben Sie null an, um die Verknüpfung des Clusters mit der Geozone aufzuheben. |
| campaign | string | Nein | Neue Kampagnen-ID. Geben Sie null an, um die Verknüpfung der Kampagne mit der Geozone aufzuheben. Wenn weggelassen, wird der Kampagnenwert nicht geändert. Hat höhere Priorität als eine Kampagne aus einem Preset. |
| lat | number | Nein | Breitengrad der Geozone. |
| lng | number | Nein | Längengrad der Geozone. |
| range | integer | Nein | Neue Reichweite in Metern. |
| timetable | object | Nein | Geozone-Zeitplan. Siehe weitere Informationen unten. |
Request example
Anchor link to{ "request": { "auth": "yxoPUlwqm............pIyEX4H", // required, API access token from Pushwoosh Control "geoZoneId": 100016750, // required, from /addGeoZone method "name": "new geozone name", // optional "cooldown": 222, // in seconds, optional "status": 0, // optional, 0 - deactivated, 1 - activated "presetCode": "BBBBB-AAAAA", // optional, cannot be used along with "content" "content": "new geozone content", // optional, cannot be used along with "presetCode" "cluster": "GEOZONE CLUSTER CODE", // optional. Specify null to unbind cluster from Geozone "campaign": "CAMPAIGN_CODE", // optional. Specify null to unbind Campaign from Geozone "lat": 10.56, // optional, geozone latitude "lng": 12.523, // optional, geozone longitude "range": 500, // optional, geozone range "timetable": { // optional "timezone": 1234, // in seconds "Mon": [ // available days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. Push sending { "start": "04:11", "stop": "12:00" } ], "Sun": [ { // one or two intervals "start": "01:11", "stop": "17:00" }, { "start": "18:01", "stop": "23:59" } ] } }}deleteGeoZone
Anchor link toEntfernt Geozones aus der App.
POST https://api.pushwoosh.com/json/1.3/deleteGeoZoneRequest body parameters
Anchor link to| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
| auth | string | Ja | API-Zugriffstoken aus dem Pushwoosh Control Panel. |
| application | string | Ja | Pushwoosh-Anwendungscode |
| geozones | string | Ja | Array von IDs oder eine einzelne ID einer zu entfernenden Geozone. |
Request example
Anchor link to{ "request": { "auth": "yxoPUlwqm............pIyEX4H", // required, API access token from Pushwoosh Control "application": "XXXXX-XXXXX", // required, Pushwoosh application code "geozones": [550, 526] // required, geozones IDs }}addGeoZoneCluster
Anchor link toFügt der App einen Geozone-Cluster hinzu.
POST https://api.pushwoosh.com/json/1.3/addGeoZoneClusterRequest body parameters
Anchor link to| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
| auth | string | Ja | API-Zugriffstoken aus dem Pushwoosh Control Panel. |
| application | string | Ja | Pushwoosh-Anwendungscode |
| name | string | Ja | Name des Clusters. |
| cooldown | integer | Ja | Eine Verzögerung, bevor ein einzelner Benutzer dieselbe Nachricht vom Geozone-Cluster erhalten kann, in Sekunden. |
Request example
Anchor link to{ "request": { "auth": "yxoPUlwqm............pIyEX4H", // required, API access token from Pushwoosh Control "application": "XXXXX-XXXXX", // required, Pushwoosh application code "name": "Raccoon city", // required, cluster name "cooldown": 3210 // required, in seconds }}deleteGeoZoneCluster
Anchor link toEntfernt einen Geozone-Cluster aus der App.
POST https://api.pushwoosh.com/json/1.3/deleteGeoZoneClusterRequest body parameters
Anchor link to| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
| auth | string | Ja | API-Zugriffstoken aus dem Pushwoosh Control Panel. |
| application | string | Ja | Pushwoosh-Anwendungscode |
| geoZoneCluster | string | Ja | ID des zu entfernenden Geozone-Clusters. |
Request example
Anchor link to{ "request": { "auth": "yxoPUlwqm............pIyEX4H", // required, API access token from Pushwoosh Control "application": "XXXXX-XXXXX", // required, Pushwoosh application code "geoZoneCluster": "EA1CE-69405" // required, cluster ID obtained from the /addGeoZoneCluster request }}listGeoZones
Anchor link toRuft eine Liste der Geozones für die App ab.
POST https://api.pushwoosh.com/json/1.3/listGeoZonesRequest body parameters
Anchor link to| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
| auth | string | Ja | API-Zugriffstoken aus dem Pushwoosh Control Panel. |
| application | string | Ja | Pushwoosh-Anwendungscode |
Request example
Anchor link to{ "request": { "auth": "yxoPUlwqm............pIyEX4H", // required, API access token from Pushwoosh Control "application": "XXXXX-XXXXX" // required, Pushwoosh application code }}listGeoZoneClusters
Anchor link toRuft eine Liste der Geozone-Cluster für die App ab.
POST https://api.pushwoosh.com/json/1.3/listGeoZoneClustersRequest body parameters
Anchor link to| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
| auth | string | Ja | API-Zugriffstoken aus dem Pushwoosh Control Panel. |
| application | string | Ja | Pushwoosh-Anwendungscode |
Request example
Anchor link to{ "request": { "auth": "yxoPUlwqm............pIyEX4H", // required, API access token from Pushwoosh Control "application": "XXXXX-XXXXX" // required, Pushwoosh application code }}