FieldRoutes API docs logoFieldRoutes API

Billing

product

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

Write · 2

Read operations

get/product/getTry it

get product

Get Bulk data for product. Accepts an array of productIDs. Returns a max of 1000 records.

Parameters

productIDsarray

No description in the upstream reference.

Returns

productIDinteger

Primary Key

officeIDinteger

OfficeID of the product; -1 is available to all offices.

descriptionstring

Description of the product

glAccountIDstring

glAccountID of the product

amountdouble

Cost of each product

taxableinteger

Set as 1 if the product is taxable

codestring

Product Code (up to 10 characters)

categorystring

Product category

Request

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

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

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

productIDinteger

Primary Key

officeIDinteger

OfficeID of the product; -1 is available to all offices.

descriptionstring

Description of the product

glAccountIDstring

glAccountID of the product

amountdouble

Cost of each product

taxableinteger

Set as 1 if the product is taxable

codestring

Product Code (up to 10 characters)

categorystring

Product category

Request

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

success:true
productID:1821
officeID:2602
description:"Sample value returned by the mock engine."
glAccountID:"sample-glAccountID"
amount:21.5
taxable:1
code:"sample-code"
category:"sample-category"
visible:0
salesVisible:0
recurring:0
}
}

Write operations

create/product/createTry it

create product

Parameters

officeIDinteger

OfficeID 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

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

success:true
productID:4821
}
update/product/updateTry it

update product

Parameters

officeIDinteger

OfficeID of the product; -1 is available to all offices.

descriptionstring

Description of the product

amountdouble

Cost of each product

taxableinteger

Set as 1 if the product is taxable

codestring

Product Code (up to 25 characters)

categorystring

Product category

visibleinteger

Whether or not the product is visible in lists when creating a new addon

salesVisibleinteger

Whether or not the product is visible on SalesRoutes

Returns

Returns a success acknowledgement.

Request

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

success:true
productID:4821
}