FieldRoutes API docs logoFieldRoutes API

Scheduling

spot

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

Write · 2

Destructive · 2

Read operations

get/spot/getTry it

get spot

Get Bulk data for spot. Accepts an array of spotIDs. Returns a max of 1000 records. This function has additional non-standard filters Latitude and Longitude for distance calculation. If these are not specified the office location will be used.

Parameters

spotIDsarray

No description in the upstream reference.

latitudedouble

Latitude for distance calculcations. If not specified, the office longitude will be used

longitudedouble

Longitude for distance calculcations. If not specified, the office longitude will be used

maxDistanceinteger

Maximum number of miles from the previous spot to return.

ignoreInitialDriveTimeinteger

If sent as 1 the start and end of the route will be ignored for distanceToClosest and maxDistance once the route has an appointment on it. This strategy can be beneficial technicians are driving a long distance to their first appointment, then servicing locally from there.

openinteger

Set as 1 to return only open routes from the GET

Returns

spotIDinteger

No description in the upstream reference.

routeIDinteger

No description in the upstream reference.

datestring

No description in the upstream reference.

startstring

No description in the upstream reference.

endstring

No description in the upstream reference.

spotCapacityinteger

No description in the upstream reference.

descriptionstring

No description in the upstream reference.

currentAppointmentinteger

No description in the upstream reference.

Request

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

Response

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

Fetch by id spot

Get spot data for single ID -- please provide a specific record ID in the URL structure. This function has additional non-standard filters Latitude and Longitude for distance calculation. If these are not specified the office location will be used.

Parameters

latitudedouble

Latitude for distance calculcations. If not specified, the office longitude will be used

longitudedouble

Longitude for distance calculcations. If not specified, the office longitude will be used

maxDistanceinteger

Maximum number of miles from the previous spot to return.

ignoreInitialDriveTimeinteger

If sent as 1 the start and end of the route will be ignored for distanceToClosest and maxDistance once the route has an appointment on it. This strategy can be beneficial technicians are driving a long distance to their first appointment, then servicing locally from there.

openinteger

Set as 1 to return only open routes from the GET

Returns

spotIDinteger

No description in the upstream reference.

routeIDinteger

No description in the upstream reference.

datestring

No description in the upstream reference.

startstring

No description in the upstream reference.

endstring

No description in the upstream reference.

spotCapacityinteger

No description in the upstream reference.

descriptionstring

No description in the upstream reference.

currentAppointmentinteger

No description in the upstream reference.

Request

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

Response

success:true
spotID:8336
routeID:7511
date:"2026-05-06 00:00:00"
start:"sample-start"
end:"sample-end"
spotCapacity:2
description:"Sample value returned by the mock engine."
currentAppointment:1
currentAppointmentDuration:0
blockReason:"sample-blockReason"
distanceToPrevious:60.5
previousLat:13.5
previousLng:203.5
prevCustomer:1
prevSpotID:2499
prevAppointmentID:1594
distanceToNext:184.5
nextLat:17.5
nextLng:207.5
nextCustomer:0
nextSpotID:3171
nextAppointmentID:4186
apiCanSchedule:0
assignedTech:1
reserved:1
reservationEnd:"sample-reservationEnd"
}
}

Write operations

block/spot/blockTry it

block spot

Block spots

Parameters

spotIDinteger

Foreign key to spots table

spotIDsarray

Array of additional spotIDs to block

descriptionarray

Block description default: Break

Returns

Returns a success acknowledgement.

Request

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

Response

success:true
spotID:4821
}
reserve/spot/reserveTry it

reserve spot

Reserve a spot until a particular time

Parameters

spotIDinteger

Foreign key to spots table

spotOptionsarray

Array of spotIDs. If sent, the first available spotID in this set will be reserved duration - integer - required duration of the lock in minutes

Returns

Returns a success acknowledgement.

Request

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

Response

success:true
spotID:4821
}

Destructive operations

release/spot/releaseTry it

release spot

Release reservations on a spot

Parameters

spotIDinteger

Foreign key to spots table

Returns

Returns a success acknowledgement.

Request

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

Response

success:true
spotID:4821
}
unblock/spot/unblockTry it

unblock spot

unblock spots

Parameters

spotIDinteger

Foreign key to spots table

spotIDsarray

Array of additional spotIDs to unblock

Returns

Returns a success acknowledgement.

Request

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

Response

success:true
spotID:4821
}