Esri's Geotrigger Service is replacing Geoloqi! Learn More | FAQ

Trigger Callback Example

If you have registered a callback URL for a trigger, Geoloqi will notify your server with a JSON document whenever the trigger is fired. The document is sent in the POST body of the request in JSON format. It has information about the user who triggered the message, which layer and place the trigger is associated with, as well as information about the triggered event.

You do not need to include anything in the response to this request, whatever you send back will be ignored. After you get this request, you can take any actions necessary for your application, such as sending an SMS, storing information in your local database, turning on and off house lights, etc.

{
  "layer":{
    "bounds":{
      "center":{
        "latitude":45.521740823313,
        "longitude":-122.68043538074
      },
      "map":"http://map.geoloqi.com/45.521752557438,-122.68041864527?radius=546.45073462403",
      "ne":{
        "latitude":45.524569933375,
        "longitude":-122.6764
      },
      "sw":{
        "latitude":45.5165,
        "longitude":-122.68448239021
      },
      "radius":548.7265
    },
    "description":"This is not the layer you're looking for.",
    "extra":{
    },
    "icon":"https://s3.amazonaws.com/geoloqi/layers/logo-57px.png",
    "layer_id":"7ky",
    "name":"Test Layer",
    "public":1,
    "public_userlist":0,
    "settings":false,
    "subscription":false,
    "trigger_rate_limit":30,
    "type":"normal",
    "user_id":"Gf"
  },
  "place":{
    "active":1,
    "description":"",
    "display_name":"Portland, OR",
    "extra":{
    },
    "latitude":45.5165,
    "longitude":-122.6764,
    "radius":200,
    "map":"http://map.geoloqi.com/45.5165,-122.6764?radius=200",
    "locality":{
       "name":"Portland"
    },
    "region":{
       "name":"OR"
    }
    "name":"",
    "place_id":"2Np_",
    "time_from":"00:00:00",
    "time_to":"00:00:00"
  },
  "trigger":{
    "callback_url":"http://requestb.in/1gt47ek1",
    "extra":{
    },
    "one_time":"0",
    "place_id":"2Np_",
    "trigger_after":"0",
    "trigger_id":"2iav",
    "trigger_on":"enter",
    "type":"callback"
  },
  "triggered_delay":"0",
  "triggered_on":"enter",
  "user":{
    "bio":"CTO, Esri R&D Center, Portland",
    "devices":{
      "apns_dev":[
      ],
      "apns_live":[
      ],
      "c2dm":[
      ],
      "gcm":[
      ]
    },
    "display_name":"Aaron Parecki",
    "extra":{},
    "has_custom_username":"1",
    "has_push_token":"1",
    "is_anonymous":"0",
    "name":"Aaron Parecki",
    "profile_image":"http://aaronparecki.com/images/aaronpk.png",
    "public_geonote_email":"1",
    "public_geonotes":"1",
    "public_location":"0",
    "timezone":"America/Los_Angeles",
    "timezone_offset":"-0700",
    "twitter":"aaronpk",
    "user_id":"Gf",
    "username":"aaronpk",
    "website":"http://aaronparecki.com/"
  }
}