FieldRoutes API docs logoFieldRoutes API

Customers & Sales

contract

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

Write · 1

Destructive · 1

Read operations

get/contract/getTry it

get contract

Get Bulk data for contract. Accepts an array of contractIDs. Returns a max of 1000 records.

Parameters

contractIDsarray

No description in the upstream reference.

includeDocumentLinkinteger

Send as 1 to retrieve a link to the document on AWS with a 15 day TTL.

Returns

contractIDsinteger

No description in the upstream reference.

contractIDinteger

No description in the upstream reference.

customerIDsinteger

No description in the upstream reference.

subscriptionIDsinteger

No description in the upstream reference.

dateSignedstring

The date the contract was signed.

dateAddedstring

The date the contract was added.

documentStateinteger

State of the document e.g. WIP, COMPLETED

Request

/contract/get
curl -X POST 'https://{subdomain}.pestroutes.com/api/contract/get' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json' \
  --data-urlencode 'contractIDs=value' \
  --data-urlencode 'includeDocumentLink=1' \
  --data-urlencode 'authenticationKey=<your-key>' \
  --data-urlencode 'authenticationToken=<your-token>'

Response

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

Fetch by id contract

Get contract data for single ID -- please provide a specific record ID in the URL structure.

Parameters

includeDocumentLinkinteger

Send as 1 to retrieve a link to the document on AWS with a 15 day TTL.

Returns

contractIDsinteger

No description in the upstream reference.

contractIDinteger

No description in the upstream reference.

customerIDsinteger

No description in the upstream reference.

subscriptionIDsinteger

No description in the upstream reference.

dateSignedstring

The date the contract was signed.

dateAddedstring

The date the contract was added.

documentStateinteger

State of the document e.g. WIP, COMPLETED

Request

/contract/{id}
curl -X POST 'https://{subdomain}.pestroutes.com/api/contract/{id}' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json' \
  --data-urlencode 'includeDocumentLink=1' \
  --data-urlencode 'authenticationKey=<your-key>' \
  --data-urlencode 'authenticationToken=<your-token>'

Response

success:true
contractIDs:1
contractID:2464
customerIDs:0
subscriptionIDs:1
dateSigned:"2026-04-08 00:00:00"
dateAdded:"2026-08-10 00:00:00"
documentState:1
}
}

Write operations

create/contract/createTry it

create contract

Create the default contract for the subscriptionID or subscriptionLink sent. If sending a signedFile, upload the file as multipart/form-data with parameter name uploadFile

Parameters

subscriptionIDinteger

Foreign key to subscriptions table.

subscriptionLinkinteger

Alternative to subscriptionID. This is the "SubscriptionID" sent during an API insert through import/main.

emailCustomerinteger

Set as 1 to also send a link to the customer via email.

dateSignedstring

The date the contract was signed. Required if uploading a signed document.

base64EncodedFilestring

The Base64 encoded signed contract. Pass this if not sending the file.

Returns

Returns a success acknowledgement.

Request

/contract/create
curl -X POST 'https://{subdomain}.pestroutes.com/api/contract/create' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json' \
  --data-urlencode 'subscriptionID=1' \
  --data-urlencode 'subscriptionLink=1' \
  --data-urlencode 'authenticationKey=<your-key>' \
  --data-urlencode 'authenticationToken=<your-token>'

Response

success:true
contractID:4821
}

Destructive operations

delete/contract/deleteTry it

delete contract

Delete an uploaded contract

Parameters

contractIDinteger

Id of the contract to be deleted.

Returns

Returns a success acknowledgement.

Request

/contract/delete
curl -X POST 'https://{subdomain}.pestroutes.com/api/contract/delete' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json' \
  --data-urlencode 'contractID=1' \
  --data-urlencode 'authenticationKey=<your-key>' \
  --data-urlencode 'authenticationToken=<your-token>'

Response

success:true
contractID:4821
}