FieldRoutes API docs logoFieldRoutes API

Field Operations

employee

6 endpoints. Start at search to collect IDs, then resolve them through get.

Write · 2

Destructive · 1

Read operations

get/employee/getTry it

get employee

Get Bulk data for employee. Accepts an array of employeeIDs. Returns a max of 1000 records.

Parameters

employeeIDsarray

No description in the upstream reference.

Returns

employeeIDinteger

Unique Identifier

officeIDinteger

Office ID this employee belongs to

activeinteger

0: Inactive account, 1: Active account

fnamestring

Employee's first name

lnamestring

Employee's last name

initialsstring

Employee's name initials -- user defined in case of duplicate's

nicknamestring

Employee's nickname

typeinteger

Employee type. 0: Office Staff, 1: Technician, 2: Sales Rep

Request

/employee/get
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

success:true
]
count:2
}
by id/employee/{id}Try it

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

employeeIDinteger

Unique Identifier

officeIDinteger

Office ID this employee belongs to

activeinteger

0: Inactive account, 1: Active account

fnamestring

Employee's first name

lnamestring

Employee's last name

initialsstring

Employee's name initials -- user defined in case of duplicate's

nicknamestring

Employee's nickname

typeinteger

Employee type. 0: Office Staff, 1: Technician, 2: Sales Rep

Request

/employee/{id}
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

success:true
employeeID:5916
officeID:2602
active:1
fname:"Dana"
lname:"Reyes"
initials:"sample-initials"
nickname:"Quarterly Perimeter"
type:0
phone:"5558675309"
email:0
username:"Quarterly Perimeter"
experience:1
pic:"sample-pic"
linkedEmployeeIDs:1
employeeLink:"sample-employeeLink"
licenseNumber:"sample-licenseNumber"
supervisorID:6454
roamingRep:2
teamIDs:0
primaryTeam:0
}
}

Write operations

create/employee/createTry it

create employee

Create a new employee.

Parameters

typeinteger

0: office staff, 1: technician, 2: salesman fname - string - required Employee first name. lname - string - required Employee last name.

phonestring

Employee phone.

emailstring

Employee email.

usernamestring

Login username, required for a roaming rep.

passwordstring

Login password, required for a roaming rep.

roamingRepinteger

EmployeeID of the master account. If a non-master account is selected, that account's master rep will be used instead.

roamingMasterinteger

Set as 1 to specify that the user is a roaming master account. This setting will override roamingRep.

employeeLinkstring

Employee's Link

Returns

Returns a success acknowledgement.

Request

/employee/create
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

success:true
employeeID:4821
}
update/employee/updateTry it

update employee

Update an employee.

Parameters

typeinteger

0: office staff, 1: technician, 2: salesman

fnamestring

Employee first name.

lnamestring

Employee last name.

phonestring

Employee phone.

emailstring

Employee email.

usernamestring

Login username, required for a roaming rep.

passwordstring

Login password, required for a roaming rep.

roamingRepinteger

EmployeeID 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

/employee/update
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

success:true
employeeID:4821
}

Destructive operations

dealias/employee/dealiasTry it

dealias employee

Find the employeeIDs associated with this employeeID or link

Parameters

employeeIDinteger

Primary key of the employee

employeeLinkinteger

External key of the employee

activeinteger

active property of the employee 0: inactive 1: active

useBothKeysinteger

Send as 1 to join on both roamingRep and employeeLink relationship

Returns

Returns a success acknowledgement.

Request

/employee/dealias
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

success:true
employeeID:4821
}