Skip to main content
GET
Find Nearby Couriers
Use this when a route needs help: a van has broken down, or a driver is running out of hours, and you need to know who else is close. Send the point as lat and lng, and Nash returns the nearest drivers on routes that are assigned, started, or in progress, nearest first, each with their route and their distance from the point in meters. Distance is a straight line from each driver’s latest GPS position, not a driving distance. A driver with no recorded position is left out, and so is one whose position is older than max_location_age_minutes (30 by default). Narrow the search to one depot with store_location_id, and leave out the route you’re rescuing, and its drivers, with exclude_route_ids. Unlike most of the API, this endpoint’s query parameters and response fields are snake_case.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

lat
number
required

Latitude to measure from, e.g. the stranded driver.

Required range: -90 <= x <= 90
lng
number
required

Longitude to measure from.

Required range: -180 <= x <= 180
limit
integer
default:5

Maximum couriers to return.

Required range: 1 <= x <= 50
store_location_id
string | null

Only routes carrying an order picked up at this store location.

Minimum string length: 1
exclude_route_ids
string | null

Comma-separated route ids to leave out, along with their couriers, e.g. the route that needs rescuing.

Maximum string length: 4096
max_location_age_minutes
integer
default:30

Ignore couriers whose latest ping is older than this.

Required range: 1 <= x <= 1440

Response

OK

couriers
NearbyCourier · object[]
required

Nearest first.