---
title: "Reassign Order"
method: POST
path: "/orders/{order_handle}/reassign"
tags: ["Orders"]
---

# Reassign Order

`POST /orders/{order_handle}/reassign`

## Request

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

Reassign an order to a worker. The order will be added in an optimal position if the worker already has an associated route

## Path parameters

- `order_handle` string, required

## Query parameters

- `type` string, nullable
- `type_index` integer, nullable
- `fulfillment_attempt` integer, nullable

## Request body

- ReassignOrderRequest
  - `driver_handle` string, nullable: Unique customer provided identifier for the new driver to whom the order needs to be assigned to
  - `worker_handle` string, nullable: Unique customer provided identifier for the new worker to whom the order needs to be assigned to
  - `ops_group_handle` string, nullable: Unique Handle of Ops Group to which worker belongs. Needed if a worker belongs to multiple ops groups
  - `order_type` string, nullable: Type of the order which can be `drop` or `pick`
  - `type_index` integer, nullable: Integer representing the `pick` or `drop` order index when having a pick/drop scenario

## Response `200`

Successful response

- ReassignOrderResponse
  - `order_handle` string, required: Unique customer provided identifier for an order
  - `status` 'completed' | 'cancelled' | 'disabled' | 'ongoing' | 'unplanned' | 'assigned' | 'planned' | 'dispatched' | 'summarizing', required: Current state of the order
  - `fulfillment_attempt` integer, nullable: Number identifying the attempt count for the order
  - `created_at` string, nullable: Timestamp at which the order was created
  - `rescheduled_marked_at` string, nullable: Timestamp at which the order was rescheduled
  - `created_by` union: Who created the order
    - Source
      - `source` string, nullable: Source of the request
      - `timestamp` string, nullable: Time when request was made
      - `ip-address` string, nullable: IP address of source
      - `device_id` string, nullable: Id of the device that made the request
      - `driver_handle` string, nullable: Id of the driver who made the request
      - `user_id` string, nullable: Id of the user who made the request
      - `email` string, nullable: Email of the user who made the request
    - unknown
  - `risk_status` boolean, nullable: Flag indicating whether the order is at risk
  - `destination` union: Destination for the order
    - union
      - OrderDetailPointDestination
        - `parkings` ParkingResponse[], nullable: List of parkings associated with the order destination
          - `geometry` PointGeometry, required
            - `coordinates` number[], required: Location coordinates represented as [longitude, latitude]
            - `type` 'Point': Geometry type
          - `score` number, required: Score representing in the confidence of parking location
          - `source` 'ht_generated' | 'visits', required: Source of the parking
          - `count` integer, nullable: Approximate number of parking detected here
        - `checkins` CheckinResponse[], nullable: List of checkins associated with the order destination
          - `geometry` PointGeometry, required
            - `coordinates` number[], required: Location coordinates represented as [longitude, latitude]
            - `type` 'Point': Geometry type
          - `score` number, required: Score representing in the confidence of checkin location
          - `source` 'ht_generated' | 'visits', required: Source of the checkin
          - `count` integer, nullable: Approximate number of checkins detected here
        - `completions` CompletionResponse[], nullable: List of completion locations associated with the order destination
          - `geometry` PointGeometry, required
            - `coordinates` number[], required: Location coordinates represented as [longitude, latitude]
            - `type` 'Point': Geometry type
          - `score` number, required: Score representing in the confidence of completion location
          - `source` 'ht_generated' | 'visits', required: Source of the completion
          - `count` integer, nullable: Approximate number of completions detected here
        - `service_areas` ServiceAreaResponse[], nullable: List of Geometries where driver spend time when they fulfill the order with this destination
          - `geometry` PolygonGeometry, required
            - `type` 'Polygon', required: Geometry type
            - `coordinates` array[], required: Location coordinates represented as [[[longitude, latitude], [lon, lat]...]]
              - …
          - `source` 'ht_generated' | 'visits', required: Source of the service area
          - `inclusivity` string, nullable: More inclusivity means more loosely defined service area
        - `geometry` PointGeometry, required
          - `coordinates` number[], required: Location coordinates represented as [longitude, latitude]
          - `type` 'Point': Geometry type
        - `address` string, nullable: Address for the order destination
        - `geofence_id` string, nullable: Geofence ID of the order destination
        - `place_handle` string, nullable: Place Handle of the order destination
        - `place_id` string, nullable: Place ID of the order destination
        - `radius` integer: Radius (in meters) of the circular geofence representing the order destination, typically between 25m and 200m
      - OrderDetailPolygonDestination
        - `parkings` ParkingResponse[], nullable: List of parkings associated with the order destination
          - `geometry` PointGeometry, required
            - `coordinates` number[], required: Location coordinates represented as [longitude, latitude]
            - `type` 'Point': Geometry type
          - `score` number, required: Score representing in the confidence of parking location
          - `source` 'ht_generated' | 'visits', required: Source of the parking
          - `count` integer, nullable: Approximate number of parking detected here
        - `checkins` CheckinResponse[], nullable: List of checkins associated with the order destination
          - `geometry` PointGeometry, required
            - `coordinates` number[], required: Location coordinates represented as [longitude, latitude]
            - `type` 'Point': Geometry type
          - `score` number, required: Score representing in the confidence of checkin location
          - `source` 'ht_generated' | 'visits', required: Source of the checkin
          - `count` integer, nullable: Approximate number of checkins detected here
        - `completions` CompletionResponse[], nullable: List of completion locations associated with the order destination
          - `geometry` PointGeometry, required
            - `coordinates` number[], required: Location coordinates represented as [longitude, latitude]
            - `type` 'Point': Geometry type
          - `score` number, required: Score representing in the confidence of completion location
          - `source` 'ht_generated' | 'visits', required: Source of the completion
          - `count` integer, nullable: Approximate number of completions detected here
        - `service_areas` ServiceAreaResponse[], nullable: List of Geometries where driver spend time when they fulfill the order with this destination
          - `geometry` PolygonGeometry, required
            - `type` 'Polygon', required: Geometry type
            - `coordinates` array[], required: Location coordinates represented as [[[longitude, latitude], [lon, lat]...]]
              - …
          - `source` 'ht_generated' | 'visits', required: Source of the service area
          - `inclusivity` string, nullable: More inclusivity means more loosely defined service area
        - `geometry` PolygonGeometry, required
          - `type` 'Polygon', required: Geometry type
          - `coordinates` array[], required: Location coordinates represented as [[[longitude, latitude], [lon, lat]...]]
            - array[]
              - …
        - `address` string, nullable: Address for the order destination
        - `geofence_id` string, nullable: Geofence ID of the order destination
        - `place_handle` string, nullable: Place Handle of the order destination
        - `place_id` string, nullable: Place ID of the order destination
      - OrderDetailGeofenceIdDestination
        - `parkings` ParkingResponse[], nullable: List of parkings associated with the order destination
          - `geometry` PointGeometry, required
            - `coordinates` number[], required: Location coordinates represented as [longitude, latitude]
            - `type` 'Point': Geometry type
          - `score` number, required: Score representing in the confidence of parking location
          - `source` 'ht_generated' | 'visits', required: Source of the parking
          - `count` integer, nullable: Approximate number of parking detected here
        - `checkins` CheckinResponse[], nullable: List of checkins associated with the order destination
          - `geometry` PointGeometry, required
            - `coordinates` number[], required: Location coordinates represented as [longitude, latitude]
            - `type` 'Point': Geometry type
          - `score` number, required: Score representing in the confidence of checkin location
          - `source` 'ht_generated' | 'visits', required: Source of the checkin
          - `count` integer, nullable: Approximate number of checkins detected here
        - `completions` CompletionResponse[], nullable: List of completion locations associated with the order destination
          - `geometry` PointGeometry, required
            - `coordinates` number[], required: Location coordinates represented as [longitude, latitude]
            - `type` 'Point': Geometry type
          - `score` number, required: Score representing in the confidence of completion location
          - `source` 'ht_generated' | 'visits', required: Source of the completion
          - `count` integer, nullable: Approximate number of completions detected here
        - `service_areas` ServiceAreaResponse[], nullable: List of Geometries where driver spend time when they fulfill the order with this destination
          - `geometry` PolygonGeometry, required
            - `type` 'Polygon', required: Geometry type
            - `coordinates` array[], required: Location coordinates represented as [[[longitude, latitude], [lon, lat]...]]
              - …
          - `source` 'ht_generated' | 'visits', required: Source of the service area
          - `inclusivity` string, nullable: More inclusivity means more loosely defined service area
        - `geofence_id` string, required: Geofence ID to extract geometry from. This is a legacy feature, prefer using `place_handle` now
        - `address` string, nullable: Address for the order destination
      - OrderDetailPlaceHandleDestination
        - `parkings` ParkingResponse[], nullable: List of parkings associated with the order destination
          - `geometry` PointGeometry, required
            - `coordinates` number[], required: Location coordinates represented as [longitude, latitude]
            - `type` 'Point': Geometry type
          - `score` number, required: Score representing in the confidence of parking location
          - `source` 'ht_generated' | 'visits', required: Source of the parking
          - `count` integer, nullable: Approximate number of parking detected here
        - `checkins` CheckinResponse[], nullable: List of checkins associated with the order destination
          - `geometry` PointGeometry, required
            - `coordinates` number[], required: Location coordinates represented as [longitude, latitude]
            - `type` 'Point': Geometry type
          - `score` number, required: Score representing in the confidence of checkin location
          - `source` 'ht_generated' | 'visits', required: Source of the checkin
          - `count` integer, nullable: Approximate number of checkins detected here
        - `completions` CompletionResponse[], nullable: List of completion locations associated with the order destination
          - `geometry` PointGeometry, required
            - `coordinates` number[], required: Location coordinates represented as [longitude, latitude]
            - `type` 'Point': Geometry type
          - `score` number, required: Score representing in the confidence of completion location
          - `source` 'ht_generated' | 'visits', required: Source of the completion
          - `count` integer, nullable: Approximate number of completions detected here
        - `service_areas` ServiceAreaResponse[], nullable: List of Geometries where driver spend time when they fulfill the order with this destination
          - `geometry` PolygonGeometry, required
            - `type` 'Polygon', required: Geometry type
            - `coordinates` array[], required: Location coordinates represented as [[[longitude, latitude], [lon, lat]...]]
              - …
          - `source` 'ht_generated' | 'visits', required: Source of the service area
          - `inclusivity` string, nullable: More inclusivity means more loosely defined service area
        - `place_handle` string, required: Place Handle to extract geometry from
        - `address` string, nullable: Address for the order destination
    - unknown
  - `ops_group_handle` string, nullable: Unique identifier for the ops group to which the order is associated
  - `plan_mode` 'on_demand' | 'scheduled' | 'manual' | 'null', nullable: Value indicating how the order was planned - `manual`, `scheduled`
  - `device_id` string, nullable: Unique identifier for a device
  - `driver_handle` string, nullable: Unique customer provided identifier for the driver
  - `worker_handle` string, nullable: Unique customer provided identifier for the worker
  - `started_at` string, nullable: Timestamp at which the order tracking started
  - `assigned_at` string, required: Timestamp at which the order was assigned to a driver
  - `planned_at` string, nullable: Timestamp at which the order was planned into a route
  - `scheduled_at` string, nullable: Timestamp by which the order should be fulfilled to meet the customer promise
  - `scheduled_after` string, nullable: Timestamp after which the order should be fulfilled to meet the customer promise
  - `completed_at` string, nullable: Timestamp at which the order was completed
  - `cancelled_at` string, nullable: Timestamp at which the order was cancelled
  - `cancellation_source` object, nullable: Detail about how order got cancelled
  - `cancellation_reason` string, nullable: Customer-reported reason why the shift did not occur as planned: `no_show`, `worker_cancelled`, `client_cancelled`, `other`. Consumers must accept new values.
  - `disabled_at` string, nullable: Timestamp at which the order was disabled so that it can be fulfillment later
  - `enabled_at` string, nullable: Timestamp at which the disabled order was enabled for fulfillment
  - `arrived_at` string, nullable: Timestamp at which the driver arrived at the order fulfillment location
  - `exited_at` string, nullable: Timestamp at which the driver exited from the order fulfillment location
  - `metadata` object, nullable: Additional customer provided information about the order
  - `estimate` union: Object containing the estimate information for the order that has not been completed
    - OrderDetailEstimate
      - `start_at` string, nullable: Deprecated: use `start_by`. Always returns the same value as `start_by`.
      - `start_by` string, nullable: Latest time the worker can leave their current (or planned start) location and still reach this order by its `scheduled_at`, following the route sequence and the remaining service time at earlier stops. Computed by planning and once at the first tracking ETA, which uses traffic for the planned arrival time. `null` when the order has no `scheduled_at`.
      - `arrive_at` string, nullable: Estimated timestamp by which a driver should arrive at order destination
      - `distance` integer, nullable: Estimated total distance that the driver should travel
      - `duration` integer, nullable: Estimated total time that the driver should spend to fulfill all orders in the route
      - `initial_arrive_at` string, nullable: Initial Estimated timestamp by which a driver should arrive at the destination
      - `current_worker_location` union: Current Worker location details
        - DriverLocation
          - `geometry` LocationGeometryResponse, required
            - `type` string, required: Geometry type
            - `coordinates` unknown[], required: Location coordinates represented as list of [longitude, latitude].
              - …
          - `bearing` number, required: Bearing of the driver
          - `accuracy` number, required: Accuracy of location the driver
          - `speed` number, required: Speed of the driver
          - `recorded_at` string, required: Time when the location of the driver was recorded
        - unknown
      - `polyline` union: Estimated optimal path that the driver should take to fulfill all orders in the route
        - EstimatePolyline
          - `type` string, required: Type of GeoJSON feature. It will always be `LineString` for polyline
          - `coordinates` array[], required: GeoJSON representation of LineString coordinates, inner list element is represented as [longitude, latitude]
            - unknown[]
              - …
        - unknown
      - `start_location` union: The starting point location from where the driver begins their journey for the route
        - LocationGeometryResponse
          - `type` string, required: Geometry type
          - `coordinates` unknown[], required: Location coordinates represented as list of [longitude, latitude].
            - unknown
        - unknown
      - `end_location` union: The final destination location where the route ends after completing all orders
        - LocationGeometryResponse
          - `type` string, required: Geometry type
          - `coordinates` unknown[], required: Location coordinates represented as list of [longitude, latitude].
            - unknown
        - unknown
    - unknown
  - `risks` object, nullable: Object containing different risk statuses for the order
  - `expected_service_time` integer, nullable: Time in seconds that the driver is expected to spend at the location when fulfilling the order
  - `product_type` string[], nullable: List of customer provided product/service types used when matching orders to a driver
  - `type` 'pick' | 'drop' | 'null', nullable: Field to specify if the order is a pick/drop
  - `type_index` integer, nullable: Field to specify if the order is a pick/drop
  - `capacity_used` integer, nullable: Volumetric unit occupied by the order
  - `region` union: City, state, and country where the orders needs to be fulfilled
    - Region
      - `country` string, required: Country
      - `city` string, nullable: City
      - `state` string, nullable: State
    - unknown
  - `distance` integer, nullable: Total distance in meters travelled by the driver to reach the order location
  - `duration` integer, nullable: Total time in seconds spent on the order.
  - `share_url` string, nullable: Shareable URL for the consumer to track the live movement of the drive after the order is dispatched
  - `embed_url` string, nullable: Embeddable URL for the ops team to view order timeline
  - `route_handle` string, nullable: Unique identifier for the route
  - `plan_id` string, nullable: Unique identifier of the plan
  - `planning_failure_reason` string, nullable: Reason explaining why automated planning left the order unplanned. Present only when a planning attempt could not assign the order.
  - `track_mode` 'full_shift' | 'on_shift' | 'pre_shift' | 'null', nullable: Value representing whether the order is tracked in flex, on_time, on_shift, full_shift or pre_shift mode
  - `actual_service_time` integer, nullable: Time in seconds that the driver is actually spent at the location when fulfilling the order
  - `tracked_service_time` integer, nullable: Total time tracked in seconds for the driver at the location when fulfilling the order
  - `polyline` union: GeoJSON representation of polyline with the coordinates of the actual path travelled by the driver
    - Polyline
      - `type` string, required: Type of GeoJSON feature. It will always be `LineString` for polyline
      - `coordinates` array[], required: GeoJSON representation of LineString coordinates, inner list element is represented as [longitude, latitude, altitude, recorded_at]
        - unknown[]
          - unknown
    - unknown
  - `deviation_from_destination` integer, nullable: Distance in meters between the actual completion location to the order location
  - `completed_at_destination` boolean, nullable: Indicates whether the order was completed at destination
  - `cancelled_at_destination` boolean, nullable: Indicates whether the order was cancelled at destination
  - `visited_destination` boolean, nullable: Indicates whether the driver visited the destination
  - `tracking_rate` number, nullable: Indicates the ratio of time tracked to expected tracking time of order. Values lie between 0.0 and 1.0
  - `start_location` union: Location where the driver started tracking to fulfill the order
    - PointLocationGeometryResponse
      - `type` 'Point', required: Point Geometry type
      - `coordinates` number[], required: Location coordinates represented as [longitude, latitude].
    - unknown
  - `end_location` union: Location where the driver stopped tracking once the order was fulfilled or cancelled
    - PointLocationGeometryResponse
      - `type` 'Point', required: Point Geometry type
      - `coordinates` number[], required: Location coordinates represented as [longitude, latitude].
    - unknown
  - `images` string[], nullable: List of URLs to be used to retrieve images associated with the order
  - `order_score` number, nullable
  - `attachments` union[], nullable: Attachments for this order
    - 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
  - `previous_fulfillments` FulfillmentAttempt[], nullable
    - `order_handle` string, required
    - `fulfillment_attempt` integer, required
  - `parking` OrderParkingResponse[], nullable: Parkings associated with the order fulfillment
    - `geometry` PointGeometry, required
      - `coordinates` number[], required: Location coordinates represented as [longitude, latitude]
      - `type` 'Point': Geometry type
    - `score` number, required: Score representing in the confidence of parking location
    - `timestamp` string, required: Timestamp of parking
  - `checkin` OrderCheckinResponse[], nullable: Checkins associated with the order fulfillment
    - `geometry` PointGeometry, required
      - `coordinates` number[], required: Location coordinates represented as [longitude, latitude]
      - `type` 'Point': Geometry type
    - `score` number, required: Score representing in the confidence of checkin location
    - `timestamp` string, required: Timestamp of checkin
  - `service_area` OrderServiceAreaResponse[], nullable: Service Areas associated with the order fulfillment
    - `geometry` PolygonGeometry, required
      - `type` 'Polygon', required: Geometry type
      - `coordinates` array[], required: Location coordinates represented as [[[longitude, latitude], [lon, lat]...]]
        - array[]
          - number[]
    - `time_spent` number, required: Time spent while servicing the order
  - `time_to_first_event` number, nullable: Time in seconds to receive first location after device's tracking is initiated for the route
  - `time_to_first_location` number, nullable: Time in seconds to receive first event after device's tracking is initiated for the route
  - `timeline` union[], nullable: New Order timeline events sorted by event time
    - union
      - OrderTimelineDriverActivityEvent
        - `type` 'driver_activity_event', required: String indicating the type of timeline event.
        - `recorded_at_start` string, nullable: Timestamp indicating the beginning of the event.
        - `recorded_at_end` string, nullable: Timestamp indicating the end of the event
        - `location_start` union: Location of the device at the beginning of the event.
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `location_end` union: Location of the device at the end of the event.
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `detail` union: Details of activity ex. distance (metres), duration (seconds), steps (number)
          - ActivityDetail
            - `steps` integer, nullable: Number of steps
            - `distance` integer, nullable: Distance in metres
            - `duration` integer, nullable: Duration in seconds
          - unknown
        - `activity` string, nullable: type of activity: drive/stop/walk
        - `marker_id` string, nullable: event id
        - `split_marker_id` string, nullable: marker id if the marker is split
        - `is_partial` boolean, required: flag indicating if the activity is trimmed.
        - `is_ongoing` boolean, required: flag indicating if the activity is ongoing.
        - `polyline` union: polyline associated with the activity
          - OrderTimelinePolylineGeoJSON
            - `type` string, required: type
            - `geometry` OrderTimelinePolylineGeometry, required
              - …
            - `properties` OrderTimelinePolylineProperties, required
              - …
          - unknown
        - `address` string, nullable: address associated with activity
        - `hex_map` PolygonHeatMap[], nullable: location heatmap for stop activity
          - `geometry` PolygonGeometry, required
            - `type` 'Polygon', required: Geometry type
            - `coordinates` array[], required: Location coordinates represented as [[[longitude, latitude], [lon, lat]...]]
              - …
          - `time_spent` number, required: time spent at the polygon
        - `driver_handle` string, nullable: handle of the driver
        - `device_id` string, nullable: Unique ID of device
      - OrderTimelineDriverOutageEvent
        - `type` 'driver_outage_event', required: String indicating the type of timeline event.
        - `recorded_at_start` string, nullable: Timestamp indicating the beginning of the event.
        - `recorded_at_end` string, nullable: Timestamp indicating the end of the event
        - `location_start` union: Location of the device at the beginning of the event.
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `location_end` union: Location of the device at the end of the event.
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `marker_id` string, nullable: unique id
        - `split_marker_id` string, nullable: marker id if the marker is split
        - `outage_code` string, required: Code indicating the type of outage
        - `outage_label` string, required: Text indicating the type of outage
        - `outage_description` string, required: Text describing the outage and resolution.
        - `outage_category` 'behavioural' | 'adversarial' | 'reachability' | 'os' | 'sporadic', required: String indicating the category of outage
        - `detail` union: Details associated with outage: distance/duration etc.
          - ActivityDetail
            - `steps` integer, nullable: Number of steps
            - `distance` integer, nullable: Distance in metres
            - `duration` integer, nullable: Duration in seconds
          - unknown
        - `is_partial` boolean, required: flag indicating if the outage is partial.
        - `is_ongoing` boolean, required: flag indicating if the activity is ongoing.
        - `polyline` union: estimated polyline associated with the outage
          - OrderTimelinePolylineGeoJSON
            - `type` string, required: type
            - `geometry` OrderTimelinePolylineGeometry, required
              - …
            - `properties` OrderTimelinePolylineProperties, required
              - …
          - unknown
        - `driver_handle` string, nullable: handle of the driver
        - `device_id` string, nullable: Unique ID of device
      - DriverStatusUpdatedEvent
        - `type` 'driver_status_updated', required: String indicating the type of timeline event.
        - `recorded_at` string, nullable: Timestamp when the event was recorded
        - `location` union: Location of the device when the event was recorded
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `tracking` boolean, nullable: Boolean flag indicating tracking status.
        - `marker_id` string, nullable: unique id
        - `driver_handle` string, nullable: handle of the driver
        - `device_id` string, nullable: Unique ID of device
        - `detail` union: Details of the status update.
          - StatusDetail
            - `actor` unknown
          - unknown
      - OrderCreatedEvent
        - `type` 'driver_order_created', required: String indicating the type of timeline event.
        - `recorded_at` string, nullable: Timestamp when the event was recorded
        - `location` union: Location of the device when the event was recorded
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `order_handle` string, nullable: Order handle
        - `route_handle` string, nullable: Route handle
        - `order_type` string, nullable: Order type
        - `destination_address` string, nullable: Address of the intended order destination.
        - `destination_location` union: Intended order destination in coordinates.
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `fulfillment_attempt` integer, nullable: Number of fulfillment attempts made.
        - `driver_handle` string, nullable: handle of the driver
        - `device_id` string, nullable: Unique ID of device
      - OrderAssignedEvent
        - `type` 'driver_order_assigned', required: String indicating the type of timeline event.
        - `recorded_at` string, nullable: Timestamp when the event was recorded
        - `location` union: Location of the device when the event was recorded
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `order_handle` string, nullable: Order handle
        - `route_handle` string, nullable: Route handle
        - `order_type` string, nullable: Order type
        - `destination_address` string, nullable: Address of the intended order destination.
        - `destination_location` union: Intended order destination in coordinates.
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `fulfillment_attempt` integer, nullable: Number of fulfillment attempts made.
        - `driver_handle` string, nullable: handle of the driver
        - `device_id` string, nullable: Unique ID of device
      - OrderStartedEvent
        - `type` 'driver_order_started', required: String indicating the type of timeline event.
        - `recorded_at` string, nullable: Timestamp when the event was recorded
        - `location` union: Location of the device when the event was recorded
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `order_handle` string, nullable: Order handle
        - `route_handle` string, nullable: Route handle
        - `order_type` string, nullable: Order type
        - `destination_address` string, nullable: Address of the intended order destination.
        - `destination_location` union: Intended order destination in coordinates.
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `fulfillment_attempt` integer, nullable: Number of fulfillment attempts made.
        - `driver_handle` string, nullable: handle of the driver
        - `device_id` string, nullable: Unique ID of device
      - OrderCompletedEvent
        - `type` 'driver_order_completed', required: String indicating the type of timeline event.
        - `recorded_at` string, nullable: Timestamp when the event was recorded
        - `location` union: Location of the device when the event was recorded
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `order_handle` string, nullable: Order handle
        - `route_handle` string, nullable: Route handle
        - `order_type` string, nullable: Order type
        - `destination_address` string, nullable: Address of the intended order destination.
        - `destination_location` union: Intended order destination in coordinates.
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `fulfillment_attempt` integer, nullable: Number of fulfillment attempts made.
        - `driver_handle` string, nullable: handle of the driver
        - `device_id` string, nullable: Unique ID of device
        - `deviation_from_destination` integer, nullable: Distance in meters between the actual completion location to the order location
        - `completed_at_destination` boolean, nullable: Indicates whether the order was completed at destination
      - OrderCancelledEvent
        - `type` 'driver_order_cancelled', required: String indicating the type of timeline event.
        - `recorded_at` string, nullable: Timestamp when the event was recorded
        - `location` union: Location of the device when the event was recorded
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `order_handle` string, nullable: Order handle
        - `route_handle` string, nullable: Route handle
        - `order_type` string, nullable: Order type
        - `destination_address` string, nullable: Address of the intended order destination.
        - `destination_location` union: Intended order destination in coordinates.
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `fulfillment_attempt` integer, nullable: Number of fulfillment attempts made.
        - `driver_handle` string, nullable: handle of the driver
        - `device_id` string, nullable: Unique ID of device
        - `cancellation_source` object, nullable: Detail about how order got cancelled
      - OrderTimelineEnterExitEvent
        - `distance` integer, nullable
        - `duration` integer, nullable
        - `order_handle` string, nullable
        - `order_id` string, nullable
        - `order_type` string, nullable
        - `fulfillment_attempt` integer, nullable
        - `location` union
          - OrderTimelineEventLocationGeometry
            - `geometry` union
              - …
            - `recorded_at` string, nullable
            - `accuracy` integer, nullable
          - unknown
        - `recorded_at` string, nullable: Timestamp when the event was recorded
        - `event_id` string, required: Unique id of the event
        - `type` 'order_geofence_exited' | 'order_geofence_entered' | 'order_service_ended' | 'order_service_started', required: Type of event
        - `linked_event_ids` string[], nullable: Ids of the event associated with this event
        - `address` string, nullable
        - `outside_scope` boolean: Whether the geofence event happened after route start but before order start.
      - OrderInferredEvent
        - `type` 'check_in' | 'check_out', required: Type of event
        - `inferred` boolean, nullable
        - `location` union
          - OrderTimelineEventLocationGeometry
            - `geometry` union
              - …
            - `recorded_at` string, nullable
            - `accuracy` integer, nullable
          - unknown
        - `address` string, nullable
        - `deviation` union
          - InferredEventDeviation
            - `distance` integer, nullable
            - `duration` integer, nullable
          - unknown
        - `recorded_at` string, nullable: Timestamp when the event was recorded
        - `event_id` string, required: Unique id of the event
        - `linked_event_ids` string[], nullable: Ids of the event associated with this event
      - OrderTimelineCustomEvent
        - `event_id` string, required: Unique id of the event
        - `linked_event_ids` string[], nullable: Ids of the event associated with this event
        - `label` string, required: Label of event for display purposes
        - `attachments` union[], nullable: Attachments associated with the event
          - union
            - ImageAttachmentResponse
              - …
            - NoteAttachmentResponse
              - …
            - SignatureAttachmentResponse
              - …
        - `type` 'clock_in' | 'clock_out' | 'geotag_event' | 'destination_updated' | 'scheduled_at_updated' | 'expected_service_time_updated', required: Name of event
        - `geotag_type` string, required: Type of the geotag
        - `recorded_at` string, required: Timestamp of when the event occurred
        - `metadata` object, nullable: Any additional metadata to associate with the event
        - `location` union: Location where the event occurred
          - PointLocation1
            - `geometry` PointLocationGeometry, required
              - …
            - `accuracy` number, nullable: Accuracy in meters for the location
          - unknown
        - `address` string, nullable: Address of the location where the event occurred
        - `deviation` integer, nullable: Deviation of geotag.
      - OrderServiceEvent
        - `start_reason` string, required: Start event type for service event.
        - `end_reason` string, required: End event type for service event.
        - `data` Event[], required: Event list having information of event_id and type
          - `event_id` string, required: Type of event
          - `type` string, required: Type of event
        - `recorded_at_start` string, nullable: Time stamp for the first event.
        - `recorded_at_end` string, nullable: Time stamp for the last event.
        - `type` 'order_service', required: Type of event having service related information.
      - DriverDeviceLinkedEvent
        - `type` 'driver_device_linked_event', required: String indicating the type of timeline event.
        - `recorded_at` string, required: Timestamp indicating the beginning of the device session.
        - `location` union: Location of the device when the event was recorded
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `location_recorded_at` string, nullable: Timestamp when the location was recorded.
        - `driver_handle` string, nullable: handle of the driver
        - `worker_handle` string, nullable: handle of the worker
        - `device_id` string, required: Unique ID of device
        - `device_info` union: Device information
          - DeviceInfo
            - `timezone` string, required: Timezone of the device
            - `os_name` string, required: Operating system running on the device
            - `device_brand` string, required: Brand of the device
            - `sdk_version` string, required: HyperTrack SDK version used on the device
            - `device_model` string, required: Model of the device
            - `network_operator` string, nullable: Network operator used by the device
            - `os_version` string, required: Operating system version on the device
            - `os_hardware_identifier` string, required: Hardware identification number for the device
            - `app_name` string, required: App name on the device
            - `app_version_string` string, nullable: App version used on the device
            - `app_version_number` string, nullable: App version number used on the device
          - unknown
        - `former_associated_workers` unknown[], nullable: List of workers connected to this device in the last 2 days
          - unknown
      - DriverDeviceUnlinkedEvent
        - `type` 'driver_device_unlinked_event', required: String indicating the type of timeline event.
        - `recorded_at` string, required: Timestamp indicating the end of the device session.
        - `location` union: Location of the device when the event was recorded
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `location_recorded_at` string, nullable: Timestamp when the location was recorded.
        - `driver_handle` string, nullable: handle of the driver
        - `worker_handle` string, nullable: handle of the worker
        - `device_id` string, required: Unique ID of device
        - `device_info` union: Device information
          - DeviceInfo
            - `timezone` string, required: Timezone of the device
            - `os_name` string, required: Operating system running on the device
            - `device_brand` string, required: Brand of the device
            - `sdk_version` string, required: HyperTrack SDK version used on the device
            - `device_model` string, required: Model of the device
            - `network_operator` string, nullable: Network operator used by the device
            - `os_version` string, required: Operating system version on the device
            - `os_hardware_identifier` string, required: Hardware identification number for the device
            - `app_name` string, required: App name on the device
            - `app_version_string` string, nullable: App version used on the device
            - `app_version_number` string, nullable: App version number used on the device
          - unknown
        - `unlink_duration` integer, nullable: Duration in seconds indicating how long the worker remained unlinked from the device.
        - `unlinked_due_to_logout` boolean, nullable: Flag indicating whether the device was unlinked as a result of a logout event.
      - DeviceDisconnectedEvent
        - `type` 'driver_outage_event', required: String indicating the type of timeline event.
        - `recorded_at_start` string, nullable: Timestamp indicating the beginning of the event.
        - `recorded_at_end` string, nullable: Timestamp indicating the end of the event
        - `location_start` union: Location of the device at the beginning of the event.
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `location_end` union: Location of the device at the end of the event.
          - LocationGeometryModel
            - `type` string, required: Geometry type.
            - `coordinates` union, required: Geo coordinates (lon, lat)
              - …
          - unknown
        - `driver_handle` string, nullable: handle of the driver
        - `worker_handle` string, nullable: handle of the worker
        - `device_id` string, required: Unique ID of device
        - `marker_id` string, nullable: unique id
        - `split_marker_id` string, nullable: marker id if the marker is split
        - `disconnected_code` string, required: Code indicating the type of disconnected event
        - `disconnected_label` string, required: Text indicating the type of disconnected event
        - `disconnected_description` string, required: Text describing the disconnected event.
        - `detail` union: Details associated with disconnected event: distance/duration etc.
          - ActivityDetail
            - `steps` integer, nullable: Number of steps
            - `distance` integer, nullable: Distance in metres
            - `duration` integer, nullable: Duration in seconds
          - unknown
        - `is_partial` boolean, required: flag indicating if the outage is partial.
        - `is_ongoing` boolean, required: flag indicating if the activity is ongoing.
  - `worker_name` string, nullable: Name of the worker to whom order is assigned.
  - `device_switch_mode` unknown
  - `place_handle` string, nullable: Unique customer provided identifier of the place
  - `billing_details` union: Billing details for the order.
    - OrderBillingDetails
      - `billable_hours` number, required: Total billable hours computed for the order.
      - `travel_time` integer, required: Time spent traveling to the order destination.
      - `service_time` integer, required: Time spent servicing the order.
      - `breaks` BillingBreakTimeModel[], nullable: List of breaks observed during the order.
        - `id` string, required: Unique identifier for the breaktime.
        - `start_time` string, required: Timestamp indicating the start of breaktime.
        - `end_time` string, required: Timestamp indicating the end of breaktime.
    - unknown
  - `priority` unknown
  - `tasks` OrderTaskResponse[], nullable: tasks associated with the order
    - `label` string, required: Type of task to be created for the order.
    - `task_definition_id` string, nullable: Id of the tasks definition from which this task is picked
    - `description` string, nullable: Description of the task type.
    - `metadata` object, nullable: Additional metadata for the task.
    - `priority` 'none' | 'low' | 'medium' | 'high' | 'null', nullable: Priority of the task. Valid values are none, low, medium, high.
    - `task_id` string, required: Unique identifier for the created task.
    - `status` string, nullable: Status of the task. Valid values are pending, ongoing, completed, cancelled.
    - `created_at` string, required: Timestamp when the task was created.
    - `updated_at` string, nullable: Timestamp when the task was last updated.
    - `attachments` union[], nullable: Attachments associated with the event
      - 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
  - `metrics` union: Metrics associated with the order
    - OrderMetrics
      - `before_shift_duration` integer, required: Total duration before the shift started.
      - `after_shift_duration` integer, required: Total duration after the shift ended.
      - `on_shift_duration` integer, required: Total duration during the shift including breaks.
      - `before_shift_distance` integer, required: Total distance covered before the shift started.
      - `after_shift_distance` integer, required: Total distance covered after the shift ended.
      - `on_shift_distance` integer, required: Total distance covered during the shift including breaks.
    - unknown
  - `timesheets` union[], nullable: Timesheet entries for the order. Includes HyperTrack-computed (HypertrackLocationTimesheet) and customer-provided entries.
    - union
      - HypertrackLocationTimesheet
        - `source` string, required: Always hypertrack-location. Identifies this as a HyperTrack-computed entry.
        - `type` string, required: Always location. Distinguishes this computation type from future types.
        - `start_time` string, nullable: ISO 8601 timestamp when the worker arrived on site (first geofence entry). Null if the worker never entered the destination geofence.
        - `end_time` string, nullable: ISO 8601 timestamp when the worker left the site (last geofence exit). Null if the worker was still inside at order closure.
        - `total_duration_on_premises` integer, required: Total seconds the worker spent at the destination (sum of geofence visit durations).
        - `total_break_duration` integer, required: Residual seconds not at the destination. Equals (end_time - start_time) - total_duration_on_premises.
        - `breaks` BreakEntry[], nullable: Geofence exit→re-entry windows representing time away from the destination. Each entry has start_time, end_time, and duration (seconds). Null when there are no exit→re-entry gaps.
          - `type` string, required: Break type (e.g. "meal", "rest").
          - `start_time` string, required: ISO 8601 timestamp when the break started.
          - `end_time` string, required: ISO 8601 timestamp when the break ended.
          - `duration` integer, required: Break duration in seconds.
        - `finalized` boolean, required: Always true. Signals this entry was computed at order completion and will not change.
      - object
  - `agent` union: Closeout copilot review data. Contains a `status` field (e.g. "approved") and a `timesheets` list of agent-collected or agent-reconciled entries. Null when closeout is not enabled or no review has taken place.
    - AgentReview
      - `status` string, nullable: Closeout review status (e.g. "approved"). Null when no review has taken place.
      - `timesheets` AgentTimesheetEntry[], nullable: Agent-collected or agent-reconciled timesheet entries.
        - `type` string, required: Entry type: worker (customer-submitted), facility, or reconciled (agent-approved).
        - `source` string, required: Collection channel through which the entry was captured (e.g. "sms", "email", "ops"). This is the closeout copilot's internal channel, distinct from the top-level timesheets entries where `source` indicates origin.
        - `start_time` string, nullable: ISO 8601 timestamp when the shift started.
        - `end_time` string, nullable: ISO 8601 timestamp when the shift ended.
        - `breaks` AgentBreakEntry[], nullable: Declared break periods. Each entry has start_time, end_time, duration (seconds), and type (e.g. "meal").
          - `type` string, nullable: Break type (e.g. "meal", "rest").
          - `start_time` string, nullable: ISO 8601 timestamp when the break started.
          - `end_time` string, nullable: ISO 8601 timestamp when the break ended.
          - `duration` integer, nullable: Break duration in seconds.
        - `total_duration_on_premises` integer, nullable: Total seconds the worker spent on site (sum of geofence visit durations).
        - `total_break_duration` integer, nullable: Total break duration in seconds.
        - `finalized` boolean, nullable: Whether this timesheet entry is finalized and will not change.
        - `narrative` string, nullable: Human-readable summary of the shift compiled by the closeout copilot.
        - `notes` string, nullable: Human-readable notes about the entry.
        - `confidence` number, nullable: Confidence score of the agentic timesheet entry (0..1).
        - `insights` AgentInsight[], nullable: Agent-generated insights for this entry (e.g. geofence misalignment fixes).
          - `type` string, required: Insight type (e.g. "geofence_fix").
          - `message` string, required: Human-readable insight message.
    - unknown

## 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)
