Geolocation campaign

Send push campaign to subscribers from a specific geolocation

Create and send geolocation campaign

Campaign will be sent to all matched in requested polygons[] subscribers

POSThttps://api.pushpushgo.com/core/projects/{project}/pushes/geolocation
Authorization
Path parameters
project*string
Header parameters
Body
messageobject
optionsobject
Response
Body
idstring
Request
const response = await fetch('https://api.pushpushgo.com/core/projects/{project}/pushes/geolocation', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "id": "text"
}

Create draft geolocation campaign

After created - campaign must be accept by /accept endpoint to send

POSThttps://api.pushpushgo.com/core/projects/{project}/pushes/geolocation/draft
Authorization
Path parameters
project*string
Header parameters
Body
messageobject
optionsobject
Response
Body
idstring
Request
const response = await fetch('https://api.pushpushgo.com/core/projects/{project}/pushes/geolocation/draft', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "id": "text"
}

Create and send geolocation campaign

Campaign will be sent to all matched in requested polygons[] subscribers

GEThttps://api.pushpushgo.com/core/projects/{project}/pushes/geolocation/{campaign}
Authorization
Path parameters
project*string
campaign*string
Header parameters
Response
Body
idstring
campaignTypeenum
rocketmasssegmentationtemporary_labelsgeolocation
stateenum
readydeleteddraftsendinginqueuestoppedsentfailedblocked
messageobject
optionsobject
projectstring
metadataobject
Request
const response = await fetch('https://api.pushpushgo.com/core/projects/{project}/pushes/geolocation/{campaign}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "id": "text",
  "campaignType": "rocket",
  "state": "ready",
  "message": {
    "actions": [
      {
        "link": "text",
        "title": "text"
      }
    ],
    "content": "text",
    "delayTime": 0,
    "direction": "text",
    "expireDate": "text",
    "icon": "text",
    "image": "text",
    "redirectLink": "text",
    "sendDate": "text",
    "title": "text"
  },
  "options": {
    "omitCapping": false,
    "requireInteraction": false,
    "polygons": [
      [
        0
      ]
    ]
  },
  "project": "text",
  "metadata": {
    "fromAPI": false,
    "sentBy": "text"
  }
}

Update draft or ready geolocation campaign

Action is available only on draft or ready state

PUThttps://api.pushpushgo.com/core/projects/{project}/pushes/geolocation/{campaign}
Authorization
Path parameters
project*string
campaign*string
Header parameters
Body
messageobject
optionsobject
Response
Body
idstring
Request
const response = await fetch('https://api.pushpushgo.com/core/projects/{project}/pushes/geolocation/{campaign}', {
    method: 'PUT',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "id": "text"
}

Accept rocket campaign to send

Accept campaign - send campaign to sender - available only on draft state

POSThttps://api.pushpushgo.com/core/projects/{project}/pushes/geolocation/{campaign}/accept
Authorization
Path parameters
project*string
campaign*string
Header parameters
Body
any
Response
Body
idstring
Request
const response = await fetch('https://api.pushpushgo.com/core/projects/{project}/pushes/geolocation/{campaign}/accept', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
});
const data = await response.json();
Response
{
  "id": "text"
}

Cancel sending of campaign

This is available only on "ready / sending" state, also this action cancel process of "sending" if campaign is actually on sender, in ready state just change state to cancel to prevent send them to sender.

POSThttps://api.pushpushgo.com/core/projects/{project}/pushes/geolocation/{campaign}/cancel
Authorization
Path parameters
project*string
campaign*string
Header parameters
Body
any
Response
Body
idstring
Request
const response = await fetch('https://api.pushpushgo.com/core/projects/{project}/pushes/geolocation/{campaign}/cancel', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
});
const data = await response.json();
Response
{
  "id": "text"
}

Last updated