Scheduling
task
5 endpoints. Start at search to collect IDs, then resolve them through get.
Read operations
search task
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.
Parameters
taskIDsintegerPrimary key.
officeIDintegerNo description in the upstream reference.
officeIDsintegerNo description in the upstream reference.
customerIDintegerCustomerID the task relates to.
assignedTointegerEmployeeID the task is assigned to
completedByintegerEmployeeID who completed the task
typeintegerType of task: 0 - Task, 1 - Alert
dueDatestringTime the task or alert is due.
Returns
taskIDsarrayNo description in the upstream reference.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/task/search' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'taskIDs=1' \
--data-urlencode 'officeID=1' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
get task
Get Bulk data for task. Accepts an array of taskIDs. Returns a max of 1000 records.
Parameters
taskIDsarrayNo description in the upstream reference.
Returns
taskIDsintegerPrimary key.
officeIDintegerofficeID of the task
customerIDintegercustomerID the task is related to
assignedTointegerEmployeeID the task is assigned to
completedByintegerEmployeeID who completed the task
typeintegerType of task: 0 - Alert, 1 - Task
dueDatestringTime the task or alert is due.
dateAddedstringTime the task or alert was added.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/task/get' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'taskIDs=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
Fetch by id task
Get task data for single ID -- please provide a specific record ID in the URL structure.
Parameters
No parameters beyond authentication.
Returns
taskIDsintegerPrimary key.
officeIDintegerofficeID of the task
customerIDintegercustomerID the task is related to
assignedTointegerEmployeeID the task is assigned to
completedByintegerEmployeeID who completed the task
typeintegerType of task: 0 - Alert, 1 - Task
dueDatestringTime the task or alert is due.
dateAddedstringTime the task or alert was added.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/task/{id}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
Write operations
create task
Create a new task or alert.
Parameters
referenceIDintegerSubscriptionID the task pertains to
phonestringPhone number for the task
categoryintegercategoryID of the task values: Appt Status (15), Billing (1), Customer Care (10), Customer Status (13), Feedback (7), Follow Up (5), Office (6), Reminder Reply (9), Sales (11), Scheduling (2), Service (4), SMS Reply (12), Subscription Status (14), Tech Flag (8), Voice Mail (3)
addedByintegerEmployeeID who added the task or alert
assignedTointegerEmployeeID the task is assigned to
dueDatestringDate the task is due
taskstringText description of the task
statusinteger0: Pending, 1: Completed, 2: In Use, 3: Urgent, -1: Deleted
Returns
Returns a success acknowledgement.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/task/create' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'referenceID=1' \
--data-urlencode 'phone=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
update task
Update a task.
Parameters
typeinteger0: task, 1: alert
customerIDintegerCustomerID the task pertains to
referenceIDintegerSubscriptionID the task pertains to
phonestringPhone number for the task
categoryintegercategoryID of the task values: Appt Status (15), Billing (1), Customer Care (10), Customer Status (13), Feedback (7), Follow Up (5), Office (6), Reminder Reply (9), Sales (11), Scheduling (2), Service (4), SMS Reply (12), Subscription Status (14), Tech Flag (8), Voice Mail (3)
addedByintegerEmployeeID who added the task or alert
assignedTointegerEmployeeID the task is assigned to
dueDatestringDate the task is due
Returns
Returns a success acknowledgement.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/task/update' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'type=1' \
--data-urlencode 'customerID=1' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response