---
title: "Get Visit by id"
method: GET
path: "/visits/{visit_id}"
tags: ["Visits"]
---

# Get Visit by id

`GET /visits/{visit_id}`

## Request

- Base URL: `https://v3.api.hypertrack.com`
- URL: `https://v3.api.hypertrack.com/visits/{visit_id}`
- Auth: one of:
  - HTTP basic
  - HTTP bearer
- TypeScript: <https://skmtc.dev/hypertrack/apis/hypertrack-api/docs/visits/:visit_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve Visit associated with visit_id. This API provides the ability to fetch visit based on visit_id

## Path parameters

- `visit_id` string, required

## Response `200`

Successful response

- Visit
  - `visit_id` string, uuid, required: Unique identifier representing each visit.
  - `created_at` string, required: Creation timestamp of visit
  - `updated_at` string, nullable: Last Updated timestamp of visit
  - `geofence_id` string, uuid, required: GeofenceId associated with visit
  - `driver_handle` string: Driver handle for this visit
  - `worker_handle` string: Worker handle for this visit
  - `worker_name` string, nullable: Worker name for this visit
  - `worker_profile` object, nullable: Worker profile associated with visit.
  - `device_id` string, uuid, nullable: Device id associated with visit
  - `order_handle` string, required: Order handle for this visit
  - `place_handle` string, nullable: Place handle for this visit
  - `ops_group_handle` string, required: Ops Group handle for this visit
  - `arrival` union: Arrival information of visit
    - LocationInfo
      - `location` union: Location for the visit
        - LocationGeometry
          - `type` 'Point', required: Geometry type
          - `coordinates` number[], required: Location coordinates represented as [longitude, latitude]
        - unknown
      - `recorded_at` string, required: Recorded timestamp
      - `location_accuracy` number, nullable: Location accuracy in meters
    - unknown
  - `exit` union: Exited information of visit
    - LocationInfo
      - `location` union: Location for the visit
        - LocationGeometry
          - `type` 'Point', required: Geometry type
          - `coordinates` number[], required: Location coordinates represented as [longitude, latitude]
        - unknown
      - `recorded_at` string, required: Recorded timestamp
      - `location_accuracy` number, nullable: Location accuracy in meters
    - unknown
  - `enroute` union
    - EnrouteStatsInfo
      - `duration` integer, nullable: Duration to be tracked for the order
      - `distance` integer, nullable: Duration to be tracked for the order
      - `idle_time` integer, nullable: Duration to be tracked for the order
      - `outage_duration` integer, nullable: Duration to be tracked for the order
      - `outage_distance` integer, nullable: Outage distance for the visit
      - `outage` object, nullable: Duration to be tracked for the order
      - `tracking_rate` number, nullable: Driver tracking rate during the lifespan of the visit
    - unknown
  - `service` union
    - ServiceStatsInfo
      - `duration` integer, nullable: Duration to be tracked for the order
      - `distance` integer, nullable: Duration to be tracked for the order
      - `outage_duration` integer, nullable: Duration to be tracked for the order
      - `outage` object, nullable: Duration to be tracked for the order
      - `tracking_rate` number, nullable: Driver tracking rate during the lifespan of the visit
    - unknown
  - `metadata` object, nullable: Metadata associated with this visit.
  - `geofence_metadata` object, nullable: Geofence Metadata associated with the visit.
  - `tracking_rate` number: Driver tracking rate during the lifespan of the order
  - `system_generated_order_handle` boolean, nullable: Boolean to filter out orders where order handle was automatically generated by HT system
  - `visit_geometry` union: Geometry of the visit
    - VisitGeometryModel
      - `radius` integer, required: Radius of visit's location in case of point type
      - `geometry` AnyLocationGeometry, required
        - `type` 'Point' | 'Polygon', required: Geometry type
        - `coordinates` unknown[], required: Location coordinates represented as [longitude, latitude] or [[[longitude, latitude],..]]
          - unknown
    - unknown
  - `geofence_address` string, nullable: Geofence address for this visit
  - `timezone` string, nullable: Timezone associated with this visit
  - `attachments` union[], nullable: Attachments associated with this geotag
    - union
      - ImageAttachmentResponse
        - `type` 'image', required: Type of attachment
        - `url` string, required: Image link
        - `caption` string, nullable: Caption for the image
        - `attachment_id` string, nullable
      - NoteAttachmentResponse
        - `type` 'note', required: Type of attachment
        - `data` string, required: Text for the note
        - `attachment_id` string, nullable
      - SignatureAttachmentResponse
        - `type` 'signature', required: Type of attachment
        - `url` string, required: Signature image link
        - `attachment_id` string, nullable

## Other responses

- `400`: Validation error
- `401`: Authentication error
- `404`: Not found

---

[API](https://skmtc.dev/hypertrack/apis/hypertrack-api.md) - [All operations](https://skmtc.dev/hypertrack/apis/hypertrack-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hypertrack/apis/hypertrack-api/revisions/389326c4c9c8?raw)
