Configuration & Audit
document
6 endpoints. Start at search to collect IDs, then resolve them through get.
Read operations
search document
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
uploadIDsintegerNo description in the upstream reference.
officeIDsintegerNo description in the upstream reference.
officeIDintegerNo description in the upstream reference.
customerIDsintegercustomerID associated with the document
customerIDintegercustomerID associated with the document
appointmentIDsintegerappointmentID associated with the document
appointmentIDintegerappointmentID associated with the document
formTemplateIDintegerformTemplateID for pulling specific form types
Returns
documentIDsarrayNo description in the upstream reference.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/document/search' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'uploadIDs=1' \
--data-urlencode 'officeIDs=1' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
get document
Get Bulk data for document. Accepts an array of uploadIDs. Returns a max of 1000 records.
Parameters
uploadIDsarrayNo description in the upstream reference.
includeDocumentLinkintegerSend as 1 to retrieve a link to the document on AWS with a 15 day TTL.
Returns
uploadIDintegerUnique Identifier
officeIDintegerNo description in the upstream reference.
customerIDintegerCustomer ID
dateAddedstringdate this upload was added
addedByintegerEmployee ID that added this
descriptionstringDescription for this upload
showCustomerintegerSet to 1 if this upload is visible to the customer
showTechintegerSet to 1 if this upload is visible to the technician through TechRoutes.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/document/get' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'uploadIDs=value' \
--data-urlencode 'includeDocumentLink=1' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
Fetch by id document
Get document data for single ID -- please provide a specific record ID in the URL structure.
Parameters
includeDocumentLinkintegerSend as 1 to retrieve a link to the document on AWS with a 15 day TTL.
Returns
uploadIDintegerUnique Identifier
officeIDintegerNo description in the upstream reference.
customerIDintegerCustomer ID
dateAddedstringdate this upload was added
addedByintegerEmployee ID that added this
descriptionstringDescription for this upload
showCustomerintegerSet to 1 if this upload is visible to the customer
showTechintegerSet to 1 if this upload is visible to the technician through TechRoutes.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/document/{id}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'includeDocumentLink=1' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
Write operations
create document
Upload file as multipart/form-data with parameter name uploadFile
Parameters
appointmentIDintegerAppointment ID this document relates to
showCustomerbooleanIf set true this document will be accessable to the customer it is attached to.
showTechbooleanIf set true this document will be accessable to technicians servicing this customer.
Returns
Returns a success acknowledgement.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/document/create' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'appointmentID=1' \
--data-urlencode 'showCustomer=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
update document
Update the attributes of a customer upload.
Parameters
appointmentIDintegerAppointment ID this document relates to
showCustomerbooleanIf set true this document will be accessable to the customer it is attached to.
showTechbooleanIf set true this document will be accessable to technicians servicing this customer. uploadID - integer - required ID of upload to update
Returns
Returns a success acknowledgement.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/document/update' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'appointmentID=1' \
--data-urlencode 'showCustomer=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
createEncoded document
Allows file upload using a Base64 representation submitted through POST, GET or query string parameters
Parameters
appointmentIDintegerAppointment ID this document relates to
showCustomerbooleanIf set true this document will be accessable to the customer it is attached to.
showTechbooleanIf set true this document will be accessable to technicians servicing this customer. encodedFile - string - required Base64 representation of a file. filename - string - required Name of encoded file
Returns
Returns a success acknowledgement.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/document/createEncoded' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'appointmentID=1' \
--data-urlencode 'showCustomer=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response