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

cURL examples

Here are some quick examples of interacting directly with the API using cURL, which you can use directly from your terminal. You can get an access token for an application from the Applications page.

Create a trigger

This command will create a geotrigger around Powell's Books in Portland, Oregon:

$ curl -H "Authorization: OAuth YOUR_APPLICATION\_ACCESS\_TOKEN" \
       https://api.geoloqi.com/1/trigger/create \
       -d "place_name=Powells+Books" \
       -d "key=powells_books" \
       -d "type=message" \
       -d "geocode=Powell%27s+Books%2C+Portland%2C+OR" \
       -d "radius=300" \
       -d "text=Welcome+to+Powell%27s+Books%21"

Which returns a response in JSON:

{
    "trigger_id"    : "12Df",
    "place_id"      : "2V3n",
    "key"           : "powells_books",
    "type"          : "message",
    "trigger_on"    : "enter",
    "trigger_after" : 0,
    "one_time"      : 0,
    "text"          : "Welcome to Powell's Books!",
    "extra"         : {},
    "place"         : {
        "place_id"       : "2V6n",
        "name"           : "Powells Books",
        "latitude"       : 45.523339205,
        "longitude"      : -122.6816458,
        "radius"         : 300,
        "map"            : "http:\/\/map.geoloqi.com\/45.523339205,-122.6816458?radius=300",
        "display_name"   : "Powells Books",
        "geocode_input"  : "Powell's Books, Portland, OR",
        "geocode_result" : "Powell's City of Books, building, Portland, Oregon, United States",
        "active"         : 1,
        "extra"          : {},
        "description"    : ""
    }
}

More API Methods

  • [API/Introduction|Introduction]
  • [API/Location Methods|Location Methods]
  • [API/Account Methods|Account Methods]
  • [API/Sharing Methods|Sharing Methods]
  • [API/Geonote and Trigger Methods|Geonote and Trigger Methods]
  • [API/Layer Methods|Layer Methods]
  • [API/Place Methods|Place Methods]
  • [API/Messaging Methods|Messaging Methods]
  • [API/Batch Methods|Batch Methods]
  • [API/OAuth 2.0|OAuth 2.0]