HyperTrackDocs
Visits

Get Visits

Retrieves Visits associated with orders. This API provides the ability to filter for visits based on a set of query parameters.

GET
/visits/

Retrieves Visits associated with orders. This API provides the ability to filter for visits based on a set of query parameters.

Authorization

AuthorizationBasic <token>

In: header

Query Parameters

visit_id?|

Unique identifier representing each visit.

geofence_id?|

Geofence Id associated with visit

driver_handle?|
Deprecated

String representing the handle for the driver to fetch the required visits.

worker_handle?|

String representing the handle for the worker to fetch the required visits.

device_id?|

Device Id associated with visit

order_handle?|

String representing the handle for the order to fetch the required visits.

place_handle?|

String representing the handle for the place to fetch the required visits.

pagination_token?|

Identifier used to fetch the next page of data

visited_at_from?|

ISO 8601 datetime indicating the visit's start time for filtering

visited_at_to?|

ISO 8601 datetime indicating the visit's end time for filtering

metadata_filter?|

JSON encoded string metadata associated with the visits

region_filter?|

JSON encoded string region associated with the visits

search_term?|

String representing the search term. Search will be done on order_handle, ops_group_handle, driver_handle and metadata fields.

aggregate?boolean

Flag set to retrieve aggregated data over the provided time range

arrived_at_date_without_tz_from?|

Start date (YYYY-MM-DD) of the time window used as a filter to retrieve orders scheduled on a specific date, regardless of the timezone.

arrived_at_date_without_tz_to?|

End date (YYYY-MM-DD) of the time window used as a filter to retrieve orders scheduled on a specific date, regardless of the timezone.

limit?|

Number of Orders to be sent in response

ops_group_handles?|

List of ops group handles as strings used for fetching associated visits

attachments?array<||>|

List of attachments in event

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/visits/"
{  "orders": [    {      "order_handle": "string",      "service": {        "duration": 0,        "distance": 0,        "outage_duration": 0,        "outage": {          "property1": null,          "property2": null        },        "tracking_rate": 0      },      "enroute": {        "duration": 0,        "distance": 0,        "idle_time": 0,        "outage_duration": 0,        "outage_distance": 0,        "outage": {          "property1": null,          "property2": null        },        "tracking_rate": 0      },      "driver_handle": "string",      "tracking_rate": 0,      "worker_handle": "string",      "system_generated_order_handle": true,      "ops_group_handle": "string",      "visits": [        {          "visit_id": "4fa595bd-6c49-4a9e-9507-63e9ca0eb0fc",          "created_at": "string",          "updated_at": "string",          "geofence_id": "3b717307-4590-48e6-928a-9b2c02bde0b6",          "driver_handle": "string",          "worker_handle": "string",          "worker_name": "string",          "worker_profile": {            "property1": null,            "property2": null          },          "device_id": "3bafab7b-4400-4bcf-8e6e-09f954699940",          "order_handle": "string",          "place_handle": "string",          "ops_group_handle": "string",          "arrival": {            "location": {              "type": "Point",              "coordinates": [                0              ]            },            "recorded_at": "string",            "location_accuracy": 0          },          "exit": {            "location": {              "type": "Point",              "coordinates": [                0              ]            },            "recorded_at": "string",            "location_accuracy": 0          },          "enroute": {            "duration": 0,            "distance": 0,            "idle_time": 0,            "outage_duration": 0,            "outage_distance": 0,            "outage": {              "property1": null,              "property2": null            },            "tracking_rate": 0          },          "service": {            "duration": 0,            "distance": 0,            "outage_duration": 0,            "outage": {              "property1": null,              "property2": null            },            "tracking_rate": 0          },          "metadata": {            "property1": null,            "property2": null          },          "geofence_metadata": {            "property1": null,            "property2": null          },          "tracking_rate": 0,          "system_generated_order_handle": true,          "visit_geometry": {            "radius": 0,            "geometry": {              "type": "Point",              "coordinates": [                null              ]            }          },          "geofence_address": "string",          "timezone": "string",          "attachments": [            {              "type": "image",              "url": "string",              "caption": "string",              "attachment_id": "string"            }          ]        }      ]    }  ],  "pagination_token": "string",  "aggregate": {    "count": 0,    "tracking_rate": 0,    "visits": {      "count": 0    },    "workers": {      "count": 0    }  }}
{  "detail": {},  "message": "string"}
{  "detail": {    "<location>": {      "<field_name>": [        "string"      ]    }  },  "message": "string"}