Field Operations
employee
6 endpoints. Start at search to collect IDs, then resolve them through get.
Read operations
search employee
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
officeIDsintegerNo description in the upstream reference.
activeinteger'Active': 1 or 'Inactive': 0
employeeIDsintegerUnique Identifier
employeeIDintegerUnique Identifier
yearsExperienceintegerHow many years this employee has in experience. Typically used for sales reps to distinguish between rookies and seasoned.
lnamestringEmployee's last name
fnamestringEmployee's first name
typeintegerEmployee type. 0: Office Staff, 1: Technician, 2: Sales Rep
Returns
employeeIDsarrayNo description in the upstream reference.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/employee/search' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'officeIDs=1' \
--data-urlencode 'active=1' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
get employee
Get Bulk data for employee. Accepts an array of employeeIDs. Returns a max of 1000 records.
Parameters
employeeIDsarrayNo description in the upstream reference.
Returns
employeeIDintegerUnique Identifier
officeIDintegerOffice ID this employee belongs to
activeinteger0: Inactive account, 1: Active account
fnamestringEmployee's first name
lnamestringEmployee's last name
initialsstringEmployee's name initials -- user defined in case of duplicate's
nicknamestringEmployee's nickname
typeintegerEmployee type. 0: Office Staff, 1: Technician, 2: Sales Rep
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/employee/get' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'employeeIDs=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
Fetch by id employee
Get employee data for single ID -- please provide a specific record ID in the URL structure.
Parameters
No parameters beyond authentication.
Returns
employeeIDintegerUnique Identifier
officeIDintegerOffice ID this employee belongs to
activeinteger0: Inactive account, 1: Active account
fnamestringEmployee's first name
lnamestringEmployee's last name
initialsstringEmployee's name initials -- user defined in case of duplicate's
nicknamestringEmployee's nickname
typeintegerEmployee type. 0: Office Staff, 1: Technician, 2: Sales Rep
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/employee/{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 employee
Create a new employee.
Parameters
typeinteger0: office staff, 1: technician, 2: salesman fname - string - required Employee first name. lname - string - required Employee last name.
phonestringEmployee phone.
emailstringEmployee email.
usernamestringLogin username, required for a roaming rep.
passwordstringLogin password, required for a roaming rep.
roamingRepintegerEmployeeID of the master account. If a non-master account is selected, that account's master rep will be used instead.
roamingMasterintegerSet as 1 to specify that the user is a roaming master account. This setting will override roamingRep.
employeeLinkstringEmployee's Link
Returns
Returns a success acknowledgement.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/employee/create' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'type=1' \
--data-urlencode 'phone=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
update employee
Update an employee.
Parameters
typeinteger0: office staff, 1: technician, 2: salesman
fnamestringEmployee first name.
lnamestringEmployee last name.
phonestringEmployee phone.
emailstringEmployee email.
usernamestringLogin username, required for a roaming rep.
passwordstringLogin password, required for a roaming rep.
roamingRepintegerEmployeeID of the master account. If a non-master account is selected, that account's master rep will be used instead.
Returns
Returns a success acknowledgement.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/employee/update' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'type=1' \
--data-urlencode 'fname=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
Destructive operations
dealias employee
Find the employeeIDs associated with this employeeID or link
Parameters
employeeIDintegerPrimary key of the employee
employeeLinkintegerExternal key of the employee
activeintegeractive property of the employee 0: inactive 1: active
useBothKeysintegerSend as 1 to join on both roamingRep and employeeLink relationship
Returns
Returns a success acknowledgement.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/employee/dealias' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'employeeID=1' \
--data-urlencode 'employeeLink=1' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response