HyperTrackDocs
Nearby

Get all nearby workers

Use this API to get all the nearby workers from order destination. A maximum of 1000 workers are returned in order of their haversine distance from order destination. Note: if the search_radius filter is not specified, it uses the maximum allowed search radius of 100 miles (160934 meters).

POST
/nearby/v4

Use this API to get all the nearby workers from order destination. A maximum of 1000 workers are returned in order of their haversine distance from order destination. Note: if the search_radius filter is not specified, it uses the maximum allowed search radius of 100 miles (160934 meters).

Authorization

AuthorizationBasic <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/nearby/v4" \  -H "Content-Type: application/json" \  -d '{    "order": {      "destination": {        "geometry": {          "coordinates": [            -88.97936034469119,            42.2714428209251          ],          "type": "Point"        }      }    },    "search_type": "region"  }'

{  "request_id": "00000000-aaaa-bbbb-cccc-111122223333",  "summary": {    "no_route_workers": 0,    "outside_region_workers": 0,    "processed_workers": 2,    "total_workers": 2,    "unprocessed_workers": 0  },  "workers": [    {      "created_at": "2024-10-10 10:10:10.000000",      "device": {        "device_id": "AAA11111-BBBB-2222-CCCC-3333DDDD4444",        "info": {          "device_brand": "Apple",          "device_model": "iPad9,3",          "name": "worker001",          "network_operator": "CarrierX",          "os_name": "iOS",          "os_version": "16.3.0",          "sdk_version": "5.11.0+abcd1234",          "timezone": "America/Chicago"        },        "profile": {          "driver_handle": "worker001"        },        "status": {          "data": {            "activity": "idle",            "recorded_at": "2025-05-16T08:00:00.000Z"          },          "value": "active"        }      },      "distance": 8276.293463598915,      "location": {        "coordinates": [          -89.079472,          42.264265        ],        "type": "Point"      },      "name": "worker001",      "ops_group_handle": "default",      "profile": {        "driver_handle": "worker001"      },      "timezone": "America/Chicago",      "work_status": {        "available": true,        "tracking": true      },      "worker_handle": "worker001"    },    {      "created_at": "2025-01-15 14:30:00.000000",      "device": {        "device_id": "BBB22222-CCCC-3333-DDDD-4444EEEE5555",        "info": {          "device_brand": "Apple",          "device_model": "iPhone13,2",          "name": "worker002",          "network_operator": "CarrierY",          "os_name": "iOS",          "os_version": "17.0.1",          "sdk_version": "5.11.0+abcd1234",          "timezone": "America/Chicago"        },        "profile": {          "driver_handle": "worker002"        },        "status": {          "data": {            "reason": "manual_shutdown",            "recorded_at": "2025-05-16T08:15:00.000Z"          },          "value": "inactive"        }      },      "distance": 8373.143574586262,      "location": {        "coordinates": [          -89.080647,          42.264208        ],        "type": "Point"      },      "name": "worker002",      "ops_group_handle": "default",      "profile": {        "driver_handle": "worker002"      },      "timezone": "America/Chicago",      "work_status": {        "available": false,        "tracking": false      },      "worker_handle": "worker002"    }  ]}

{  "code": "route_not_found",  "title": "Route could not be found",  "detail": "Could not generate a route from the device location to the set destination"}
{  "detail": {},  "message": "string"}

{  "code": "place_not_found",  "title": "Place not found",  "detail": {    "description": "Place not found for the id or handle"  }}

{  "detail": {    "<location>": {      "<field_name>": [        "string"      ]    }  },  "message": "string"}
{  "code": "route_error",  "title": "Failed to generate the route",  "detail": "Server could not complete the route generation"}