Customers & Sales
paymentProfile
5 endpoints. Start at search to collect IDs, then resolve them through get.
Read operations
search paymentProfile
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
paymentProfileIDsintegerPrimary key for the paymentProfile
customerIDsintegercustomer that the paymentProfile belongs to.
officeIDsintegerOfficeID of the customer that the paymentProfile belongs to.
dateCreatedstringdate the payment profile was created
statusinteger-1 = soft deleted, 0 = empty, 1 = valid, 2 = invalid, 3 = expired, 4 = last transaction failed
billingStatestringState associated with the CC/Bank account
billingZipstringZip associated with the CC/Bank account
paymentMethodinteger1=cc, 2 = ach
Returns
paymentProfileIDsarrayNo description in the upstream reference.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/paymentProfile/search' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'paymentProfileIDs=1' \
--data-urlencode 'customerIDs=1' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
get paymentProfile
Get Bulk data for paymentProfile. Accepts an array of paymentProfileIDs. Returns a max of 1000 records.
Parameters
paymentProfileIDsarrayNo description in the upstream reference.
Returns
paymentProfileIDintegerPrimary key for the paymentProfile
customerIDintegercustomer that the paymentProfile belongs to.
officeIDintegerOfficeID of the customer that the paymentProfile belongs to.
createdByintegeremployeeID who created the paymentProfile
descriptionstringPayment profile description
dateCreatedstringdate the payment profile was created
statusinteger-1 = soft deleted, 0 = empty, 1 = valid, 2 = invalid, 3 = expired, 4 = last transaction failed
statusNotesstringNo description in the upstream reference.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/paymentProfile/get' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'paymentProfileIDs=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
Fetch by id paymentProfile
Get paymentProfile data for single ID -- please provide a specific record ID in the URL structure.
Parameters
No parameters beyond authentication.
Returns
paymentProfileIDintegerPrimary key for the paymentProfile
customerIDintegercustomer that the paymentProfile belongs to.
officeIDintegerOfficeID of the customer that the paymentProfile belongs to.
createdByintegeremployeeID who created the paymentProfile
descriptionstringPayment profile description
dateCreatedstringdate the payment profile was created
statusinteger-1 = soft deleted, 0 = empty, 1 = valid, 2 = invalid, 3 = expired, 4 = last transaction failed
statusNotesstringNo description in the upstream reference.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/paymentProfile/{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 paymentProfile
Create a payment profile using a CreditCardToken and CreditCardTokenID from braintree/element. This will become the active payment profile for cc/ach.
Parameters
billingNamestringBilling name associated with payment profile
billingAddress1stringBilling address associated with payment profile
billingAddress2stringBilling address associated with payment profile
billingCitystringBilling city associated with payment profile
billingStatestringBilling state associated with payment profile
billingZipintegerBilling zip code associated with payment profile
billingCountryIDstringBilling country code associated with payment profile paymentMethod - integer - required 1=cc, 2 = ach
gatewaystringACH or CC gateway E.G. authorize, nmi, brain, element
Returns
Returns a success acknowledgement.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/paymentProfile/create' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'billingName=value' \
--data-urlencode 'billingAddress1=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
update paymentProfile
Create a payment profile using a CreditCardToken and CreditCardTokenID from braintree/element. This will become the active payment profile for cc/ach.
Parameters
billingFNamestringBilling name associated with payment profile
billingLNamestringBilling name associated with payment profile
billingAddress1stringBilling address associated with payment profile
billingAddress2stringBilling address associated with payment profile
billingCitystringBilling city associated with payment profile
billingStatestringBilling state associated with payment profile
billingZipintegerBilling zip code associated with payment profile
billingCountryIDstringBilling country code associated with payment profile
Returns
Returns a success acknowledgement.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/paymentProfile/update' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'billingFName=value' \
--data-urlencode 'billingLName=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response