Billing
product
5 endpoints. Start at search to collect IDs, then resolve them through get.
Read operations
search product
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
productIDintegerPrimary Key
officeIDsintegerOfficeID of the product; -1 is available to all offices.
codestringProduct Code (up to 25 characters)
categorystringProduct category
visibleintegerWhether or not the product is visible in lists when creating a new addon
salesVisibleintegerWhether or not the product is visible on SalesRoutes
descriptionstringDescription of the product
includeDatainteger{0,1} Sends the resolved objects for the first 1000 IDs. If there are more than 1000 items an additional property productIDsNoDataExported will specify the items that are not included in the resolved product array.
Returns
productIDsarrayNo description in the upstream reference.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/product/search' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'productID=1' \
--data-urlencode 'officeIDs=1' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
get product
Get Bulk data for product. Accepts an array of productIDs. Returns a max of 1000 records.
Parameters
productIDsarrayNo description in the upstream reference.
Returns
productIDintegerPrimary Key
officeIDintegerOfficeID of the product; -1 is available to all offices.
descriptionstringDescription of the product
glAccountIDstringglAccountID of the product
amountdoubleCost of each product
taxableintegerSet as 1 if the product is taxable
codestringProduct Code (up to 10 characters)
categorystringProduct category
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/product/get' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'productIDs=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
Fetch by id product
Get product data for single ID -- please provide a specific record ID in the URL structure.
Parameters
No parameters beyond authentication.
Returns
productIDintegerPrimary Key
officeIDintegerOfficeID of the product; -1 is available to all offices.
descriptionstringDescription of the product
glAccountIDstringglAccountID of the product
amountdoubleCost of each product
taxableintegerSet as 1 if the product is taxable
codestringProduct Code (up to 10 characters)
categorystringProduct category
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/product/{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 product
Parameters
officeIDintegerOfficeID of the product; -1 is available to all offices. description - string - required Description of the product amount - number - required Cost of each product taxable - integer - required Set as 1 if the product is taxable code - string - required Product Code (up to 25 characters) category - string - required Product category visible - integer - required Whether or not the product is visible in lists when creating a new addon salesVisible - integer - required Whether or not the product is visible on SalesRoutes recurring - integer - required 0 means it shows up only on the service it was added to, 1 means it shows up on every service
Returns
Returns a success acknowledgement.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/product/create' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'officeID=1' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
update product
Parameters
officeIDintegerOfficeID of the product; -1 is available to all offices.
descriptionstringDescription of the product
amountdoubleCost of each product
taxableintegerSet as 1 if the product is taxable
codestringProduct Code (up to 25 characters)
categorystringProduct category
visibleintegerWhether or not the product is visible in lists when creating a new addon
salesVisibleintegerWhether or not the product is visible on SalesRoutes
Returns
Returns a success acknowledgement.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/product/update' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'officeID=1' \
--data-urlencode 'description=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response