Nearby Search
Introduction
Live location is an important input to any on-demand dispatch, assignment and routing system.
On-demand work may be assigned to drivers that are out and about fulfilling other work, or are physically distributed in a region. Assignment systems use a number of factors to allocate work to a driver. Knowing the live location of available drivers, and ranking them as nearest first from the first point of fulfillment (pickup, visit, delivery or gig location), becomes a critical input to dispatch systems.
HyperTrack's 'Nearby Search' enables you to find nearby drivers based on live location to assign orders. The figure below provides an overview of how the feature works and the guide walks you through how you can implement it:
To learn how to setup your account use the feature, please refer to the guide below.
Driver availability
To ensure your drivers are included in Nearby Search results they need to be made available as described here. If you have already completed this step proceed to the next step.
Nearby search
To help with on-demand assignment use cases, HyperTrack provides Nearby API. Nearby search locates drivers, figures out which ones are nearest to the order destination, and returns them as a sorted list with nearest first. The API supports two types of searches:
a) Region-based nearby searches: which returns nearest drivers sorted by Haversine distance from the order destination. This is generally used to find potential candidate drivers closest to an order destination.
b) ETA-based nearby searches: which returns the nearest drivers to an order destination by drive-time using live traffic data. This is generally used to find a highly targeted list of drivers sorted on actual drive times in order to assign an order and know when the driver is likely to actually arrive at the destination.
Use this POST Nearby API request to find available app users near work location.
POST
https://v3.api.hypertrack.com/nearby
The POST request contains the following parameters:
order
represents the order for which the search is being conducted. The order object includes the order destination and optional parameters like the order_id & any metadata;search_type
this indicates the type of Nearby search to be conducted and can be either "region" or "eta";search_filter
filters nearby search results by app users with matching. You can use this parameter to provide different types of filters such as a maximum search radius, driver profile based filters, specific driver lists, etc;
Sample Nearby payloads for the different types of searches are provided in the documentation.
Please review working code examples written in different languages to copy and re-use to make requests via Nearby API.
As always, please to us at [email protected] if you would like support in any other programming language you would like to use.
Updated 9 months ago