Billing
payment
5 endpoints. Start at search to collect IDs, then resolve them through get.
Write · 2
Read operations
search payment
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
paymentIDsintegerPayment Unique Identifier
customerIDsintegerCustomer Unique Identifier
amountdoubleAmount of Payment
datestringPayment date
paymentMethodintegerPayment Method 0-Coupon, 1-Cash, 2-Check, 3-Credit Card, 4 ACH
statusintegerStatus of the payment (0-Unsuccessful, 1-Successful, 2-Refunded)
dateAppliedstringDate the payment was applied
Returns
paymentIDsarrayNo description in the upstream reference.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/payment/search' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'officeIDs=1' \
--data-urlencode 'paymentIDs=1' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
get payment
Get Bulk data for payment. Accepts an array of paymentIDs. Returns a max of 1000 records.
Parameters
paymentIDsarrayNo description in the upstream reference.
Returns
paymentIDintegerPayment Unique Identifier
officeIDintegerOffice Unique Identifier
customerIDintegerCustomer Unique Identifier
datestringPayment date
paymentMethodintegerPayment Method 0-Coupon, 1-Cash, 2-Check, 3-Credit Card, 4 ACH, 5-Credit Memo
amountdoublePayment amount
appliedAmountdoubleAmount of the payment that was used
unassignedAmountdoubleAmount of the payment that was not used yet
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/payment/get' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'paymentIDs=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
Fetch by id payment
Get payment data for single ID -- please provide a specific record ID in the URL structure.
Parameters
No parameters beyond authentication.
Returns
paymentIDintegerPayment Unique Identifier
officeIDintegerOffice Unique Identifier
customerIDintegerCustomer Unique Identifier
datestringPayment date
paymentMethodintegerPayment Method 0-Coupon, 1-Cash, 2-Check, 3-Credit Card, 4 ACH, 5-Credit Memo
amountdoublePayment amount
appliedAmountdoubleAmount of the payment that was used
unassignedAmountdoubleAmount of the payment that was not used yet
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/payment/{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 payment
Parameters
employeeIDintegerEmployee to associate with the payment
notesintegerDescription for this payment
ticketIDintegerLimit payment to this ticket
subscriptionIDintegerLimit payment to this subscription
Returns
Returns a success acknowledgement.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/payment/create' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'employeeID=1' \
--data-urlencode 'notes=1' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response
createRefund payment
Parameters
amountdoubleAmount this payment was for
Returns
Returns a success acknowledgement.
Request
curl -X POST 'https://{subdomain}.pestroutes.com/api/payment/createRefund' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'amount=value' \
--data-urlencode 'authenticationKey=<your-key>' \
--data-urlencode 'authenticationToken=<your-token>'Response