HyperTrackDocs
Orders

Track Orders

This API allows the creation and immediate tracking of order fulfillment. If the route has been planned and exists in the HyperTrack system, then tracking can be initiated using the route_handle.

POST
/orders/track

This API allows the creation and immediate tracking of order fulfillment. If the route has been planned and exists in the HyperTrack system, then tracking can be initiated using the route_handle.

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/orders/track" \  -H "Content-Type: application/json" \  -d '{    "worker_handle": "james@ht.com",    "track_mode": "on_time",    "ops_group_handle": "SAN_JOSE_WH",    "orders": [      {        "order_handle": "order-1",        "type": "pick",        "scheduled_at": "2023-11-02T02:00:00Z",        "destination": {          "address": "1709 Automation Pkwy, San Jose, CA 95101",          "geometry": {            "type": "Point",            "coordinates": [              17.803927,              34.832173            ]          },          "radius": 100        }      },      {        "order_handle": "order-2",        "type": "drop",        "scheduled_at": "2023-11-02T02:00:00Z",        "destination": {          "address": "748 Story Rd, San Jose, CA 95112",          "geometry": {            "type": "Point",            "coordinates": [              17.803927,              34.832173            ]          },          "radius": 100        }      }    ]  }'

{  "route_handle": "7ac07153-5590-46c5-9ada-a6ca84f5b48f",  "status": "tracking",  "version": 1,  "embed_url": "https://embed.hypertrack.com/routes/7ac07153-5590-46c5-9ada-a6ca84f5b48f?publishable_key=a4pvdQPekFgLSuZrwivhJS_Squ6irX1n9sRBIn9nl3PTK-5y3BO56rolpGuzhp1pIoH4TiDyqWIq8IEkOJF5ed",  "orders": [    {      "order_handle": "order-1",      "fulfillment_attempt": 0,      "status": "ongoing",      "destination": {        "geometry": {          "type": "Point",          "coordinates": [            17.803927,            34.832173          ]        },        "address": "1709 Automation Pkwy, San Jose, CA 95101",        "radius": 100      },      "track_mode": "on_time",      "scheduled_at": "2023-11-02T02:00:00.000Z",      "started_at": "2023-11-01T22:47:56.027Z",      "type": "pick",      "type_index": 0,      "expected_service_time": 0,      "capacity_used": 1,      "share_url": "https://trck.at/PvR4MmWOpw",      "device_id": "FFA58DDB-5CA0-4CD5-8BDE-E4EC7E077E3D",      "worker_handle": "james@ht.com",      "created_at": "2023-11-01T22:47:53.512Z",      "assigned_at": "2023-11-01T22:47:53.857Z",      "route_handle": "7ac07153-5590-46c5-9ada-a6ca84f5b48f",      "planned_at": "2023-11-01T22:47:53.512Z"    },    {      "order_handle": "order-2",      "fulfillment_attempt": 0,      "status": "ongoing",      "destination": {        "geometry": {          "type": "Point",          "coordinates": [            17.803926,            34.832174          ]        },        "address": "748 Story Rd, San Jose, CA 95112",        "radius": 100      },      "track_mode": "on_time",      "scheduled_at": "2023-11-02T02:00:00.000Z",      "started_at": "2023-11-01T22:47:56.092Z",      "type": "drop",      "type_index": 0,      "expected_service_time": 0,      "capacity_used": 1,      "share_url": "https://trck.at/NqV7Xm22pC",      "device_id": "FFA58DDB-5CA0-4CD5-8BDE-E4EC7E077E3D",      "worker_handle": "james@ht.com",      "created_at": "2023-11-01T22:47:53.512Z",      "assigned_at": "2023-11-01T22:47:53.914Z",      "route_handle": "7ac07153-5590-46c5-9ada-a6ca84f5b48f",      "planned_at": "2023-11-01T22:47:53.512Z"    }  ],  "started_at": "2023-11-01T22:47:54.867Z",  "assigned_at": "2023-11-01T22:47:53.968Z",  "created_at": "2023-11-01T22:47:53.659Z",  "device_id": "FFA58DDB-5CA0-4CD5-8BDE-E4EC7E077E3D",  "worker_handle": "james@ht.com",  "planned_at": "2023-11-01T22:47:53.658Z"}

{  "code": "driver_not_linked_to_device",  "title": "Worker needs to be linked to a device first",  "detail": {    "description": "The worker is not yet linked to a device"  }}

{  "detail": {},  "message": "string"}

{  "code": "driver_not_found",  "title": "Worker Not Found",  "detail": {    "description": "Worker not found for handle <driver_handle>"  }}

{  "code": "duplicate_resource",  "title": "Duplicate route found with this ID",  "detail": "System already has a route with this ID"}

{  "detail": {    "<location>": {      "<field_name>": [        "string"      ]    }  },  "message": "string"}