Scheduling
serviceType
3 endpoints. Start at search to collect IDs, then resolve them through get.
Read operations
search serviceType
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
officeIDsintegerOffice Unique Identifier
typeIDsintegerService Type Unique Identifier
descriptionstringDescription of the Service Type
categorystringCategory of the Service Type
reserviceintegerService is a reservice type
includeDatainteger{0,1} Sends the resolved objects for the first 1000 IDs. If there are more than 1000 items an additional property serviceTypeIDsNoDataExported will specify the items that are not included in the resolved serviceType array.
Returns
serviceTypeIDsarrayNo description in the upstream reference.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/serviceType/search' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'officeIDs=1' \
--data-urlencode 'typeIDs=1' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
get serviceType
Get Bulk data for serviceType. Accepts an array of typeIDs. Returns a max of 1000 records.
Parameters
typeIDsarrayNo description in the upstream reference.
Returns
typeIDintegerUnique Identifier
officeIDintegerOffice ID this service type belongs to, it will be -1 if it is a Global service type
descriptionstringService type description
frequencyintegerService Type Frequecy. (-1 when it is As need, 0 when it is One Time, -3 when it is Custom Schedule)
defaultChargedoubleService type default charge
categorystringService type category
reserviceintegerService is a reservice type
defaultLengthintegerDefault appointment duration in minutes
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/serviceType/get' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'typeIDs=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
Fetch by id serviceType
Get serviceType data for single ID -- please provide a specific record ID in the URL structure.
Parameters
No parameters beyond authentication.
Returns
typeIDintegerUnique Identifier
officeIDintegerOffice ID this service type belongs to, it will be -1 if it is a Global service type
descriptionstringService type description
frequencyintegerService Type Frequecy. (-1 when it is As need, 0 when it is One Time, -3 when it is Custom Schedule)
defaultChargedoubleService type default charge
categorystringService type category
reserviceintegerService is a reservice type
defaultLengthintegerDefault appointment duration in minutes
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/serviceType/{id}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response