Scheduling
route
5 endpoints. Start at search to collect IDs, then resolve them through get.
Read operations
search route
Provide a set of parameters which will return a list of ids. There is no limit to the number of IDs this will return. You can then supply these ids to the get endpoint in order to retrieve bulk data. Every parameter available supports a simple value OR a powerful query object that gives you access to all basic comparators.
Example
dateAdded={"operator":">","value":"2016-01-01"}Example
dateAdded={"operator\":\"BETWEEN\",\"value\":[\"2016-05-12\",\"2016-05-13\"]}Available operators
><>=<==!=INBETWEENLIKESTARTSWITHENDSWITHCONTAINSEach of the search endpoints allows for an optional parameter 'includeData'. When sent, the API will additionally send the resolved objects for the first 1000 IDs.
Keep in mind when using 'includeData' that if there are more than 1000 items an additional property '{entity}IDsNoDataExported' will specify the items that are not included in the resolved data array. If the includeData flag is set the additional parameters from getData (latitude, longitude) can be used.
Parameters
officeIDsintegerNo description in the upstream reference.
routeIDsintegerNo description in the upstream reference.
datestringNo description in the upstream reference.
dateStartstringNo description in the upstream reference.
dateEndstringNo description in the upstream reference.
assignedTechintegerNo description in the upstream reference.
apiCanSchedulebooleanSend as 1 to retrieve only routes that the API can schedule for.
lastUpdatedstringNo description in the upstream reference.
Returns
routeIDsarrayNo description in the upstream reference.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/route/search' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'officeIDs=1' \
--data-urlencode 'routeIDs=1' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
get route
Get Bulk data for route. Accepts an array of routeIDs. Returns a max of 1000 records. This function has additional non-standard filters Latitude and Longitude for distance calculation. If these are not specified the office location will be used.
Parameters
routeIDsarrayNo description in the upstream reference.
latitudedoubleLatitude for distance calculcations. If not specified, the office longitude will be used
longitudedoubleLongitude for distance calculcations. If not specified, the office longitude will be used
maxDistanceintegerMaximum number of miles from the route average to return.
Returns
routeIDintegerUnique Identifier
titleintegerNo description in the upstream reference.
templateIDintegerNo description in the upstream reference.
dateAddedstringNo description in the upstream reference.
addedByintegerID of employee who added this route
officeIDintegerNo description in the upstream reference.
groupTitleintegerNo description in the upstream reference.
datestringdate of this route
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/route/get' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'routeIDs=value' \
--data-urlencode 'latitude=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
Fetch by id route
Get route data for single ID -- please provide a specific record ID in the URL structure. This function has additional non-standard filters Latitude and Longitude for distance calculation. If these are not specified the office location will be used.
Parameters
latitudedoubleLatitude for distance calculcations. If not specified, the office longitude will be used
longitudedoubleLongitude for distance calculcations. If not specified, the office longitude will be used
maxDistanceintegerMaximum number of miles from the route average to return.
Returns
routeIDintegerUnique Identifier
titleintegerNo description in the upstream reference.
templateIDintegerNo description in the upstream reference.
dateAddedstringNo description in the upstream reference.
addedByintegerID of employee who added this route
officeIDintegerNo description in the upstream reference.
groupTitleintegerNo description in the upstream reference.
datestringdate of this route
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/route/{id}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'latitude=value' \
--data-urlencode 'longitude=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
Write operations
create route
create a group
Parameters
datestringDayID to create for
templateIDintegertemplateID from office software
assignedTechintegeremployeeID
autoCreateGroupintegerset as 1 if the group should be auto-created with the template title, set as 0 to reject on missing group
Returns
Returns a success acknowledgement.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/route/create' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'date=value' \
--data-urlencode 'templateID=1' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
update route
Update route details
Parameters
datestringDayID to create for
assignedTechintegeremployeeID
autoCreateGroupintegerset as 1 if the group should be auto-created with the template title, set as 0 to reject on missing group routeID - integer - required Primary key to the route table.
Returns
Returns a success acknowledgement.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/route/update' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'date=value' \
--data-urlencode 'assignedTech=1' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response