1
0
-1
2 answers
- 210
Brandon,
Couple issues with your query - first, the location and distance field names should be locationPostalcode and locationDistance.
Also, you have "criteria" spelled wrong in your filters.
Here's an updated query that works (notice that there are no future events within 25 miles of 47201 at the moment):
{ "apikey":"{{apikey}}", "objectType":"events", "objectAction":"publicSearch", "search":{ "resultStart":0, "resultLimit":15, "resultSort":"eventStart", "resultOrder":"asc", "calcFoundRows":"Yes", "filters":[ { "fieldName":"eventStart", "operation":"greaterthanorequal", "criteria":"rg:today" }, { "fieldName":"locationPostalcode", "operation":"equal", "criteria":"47201" }, { "fieldName":"locationDistance", "operation":"radius", "criteria":"250" } ], "fields":[ "eventID", "eventName", "eventStart", "eventSpecies", "eventDescription", "locationName", "locationAddress", "locationCity", "locationState", "locationPostalcode", "locationPhone" ] } }
Add your comment... - 10-1
Last question, is there a wiki link that shows date ranges?
eventStart rg:today
eventEnd rg: Next week or whatever?
Add your comment...
When searching for events, I cannot use the filter: "eventLocationDistance": according to https://userguide.rescuegroups.org/display/APIDG/Object+definitions#Objectdefinitions-events it should be an option to use.