Customers & Sales
customerFlag
3 endpoints. Start at search to collect IDs, then resolve them through get.
Read operations
search customerFlag
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
customerIDsintegerNo description in the upstream reference.
customerFlagsstringLimit using user-defined generic flags or system flags: paidInFull, switchOver, purpleDragon, pendingCancellation, prefersPaper, collectonsStage
includeDatainteger{0,1} Sends the resolved objects for the first 1000 IDs. If there are more than 1000 items an additional property customerFlagIDsNoDataExported will specify the items that are not included in the resolved customerFlag array.
Returns
customerFlagIDsarrayNo description in the upstream reference.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/customerFlag/search' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'customerIDs=1' \
--data-urlencode 'customerFlags=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
get customerFlag
Get Bulk data for customerFlag. Accepts an array of customerIDs. Returns a max of 1000 records. This function has an addition standard filter for customerFlags that will help squelch unnecessary flags.
Parameters
customerIDsarrayNo description in the upstream reference.
limitCustomerFlagsstringStandard search filter. E.G. "limitCustomerFlags": {"operator":"IN","value":["myFlag","yourflag"}
Returns
customerIDintegerCustomerID
flagstringFlag Code
flagValuestringFlag Value
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/customerFlag/get' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'customerIDs=value' \
--data-urlencode 'limitCustomerFlags=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
Fetch by id customerFlag
Get customerFlag data for single ID -- please provide a specific record ID in the URL structure. This function has an addition standard filter for customerFlags that will help squelch unnecessary flags.
Parameters
limitCustomerFlagsstringStandard search filter. E.G. "limitCustomerFlags": {"operator":"IN","value":["myFlag","yourflag"}
Returns
customerIDintegerCustomerID
flagstringFlag Code
flagValuestringFlag Value
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/customerFlag/{id}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'limitCustomerFlags=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response