Batch and Sequence Orders
Post a sequence of orders to be planned either manually or automatically by HyperTrack. For automatic planning, please contact the HyperTrack team to get set up.
Post a sequence of orders to be planned either manually or automatically by HyperTrack. For automatic planning, please contact the HyperTrack team to get set up.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/orders/" \ -H "Content-Type: application/json" \ -d '{ "plan_mode": "manual", "ops_group_handle": "store-SF", "orders": [ { "order_handle": "order-1", "scheduled_at": "2023-10-31T02:00:00.000Z", "product_type": [ "frozen", "fragile" ], "type": "pick", "metadata": { "customerID": "12654" }, "destination": { "address": "1709 Automation Pkwy, San Jose, CA 95101", "geometry": { "type": "Point", "coordinates": [ -121.8871193, 37.390611 ] }, "radius": 100 } }, { "order_handle": "order-2", "scheduled_at": "2023-10-31T04:00:00.000Z", "product_type": [ "frozen", "fragile" ], "type": "drop", "metadata": { "customerID": "12654" }, "destination": { "address": "1028 E Brokaw Rd, San Jose, CA 95131", "geometry": { "type": "Point", "coordinates": [ -121.9007247, 37.3811932 ] }, "radius": 100 } } ] }'{ "route_handle": "string", "status": "planned", "version": 0, "created_at": "string", "embed_url": "string", "orders": [ { "order_handle": "string", "status": "planned", "destination": { "geofence_id": "string", "place_handle": "string", "address": "string", "geometry": { "coordinates": [ 0 ], "type": "Point" }, "place_id": "string", "radius": 30 }, "fulfillment_attempt": 0, "risk_status": true, "ops_group_handle": "string", "plan_mode": "on_demand", "plan_id": "string", "planning_failure_reason": "string", "device_id": "string", "driver_handle": "string", "worker_handle": "string", "place_handle": "string", "created_at": "string", "started_at": "string", "assigned_at": "string", "planned_at": "string", "scheduled_at": "string", "scheduled_after": "string", "completed_at": "string", "cancelled_at": "string", "disabled_at": "string", "enabled_at": "string", "arrived_at": "string", "exited_at": "string", "metadata": { "property1": null, "property2": null }, "risks": { "property1": null, "property2": null }, "expected_service_time": 0, "product_type": [ "string" ], "type": "pick", "type_index": 0, "capacity_used": 0, "region": { "country": "string", "city": "string", "state": "string" }, "distance": 0, "duration": 0, "estimate": { "start_at": "string", "start_by": "string", "arrive_at": "string", "distance": 0, "duration": 0, "initial_arrive_at": "string", "current_worker_location": { "geometry": { "type": "string", "coordinates": [ null ] }, "bearing": 0, "accuracy": 0, "speed": 0, "recorded_at": "string" } }, "share_url": "string", "route_handle": "string", "track_mode": "on_time", "actual_service_time": 0, "tracked_service_time": 0, "tracking_rate": 0, "time_to_first_event": 0, "time_to_first_location": 0, "created_by": { "source": "string", "timestamp": "string", "ip-address": "string", "device_id": "string", "driver_handle": "string", "user_id": "string", "email": "string" }, "outage_summary": [ { "duration": 0, "distance": 0, "code": "string", "label": "string", "description": "string", "category": "behavioural" } ], "embed_url": "string", "device_switch_mode": "manual", "tasks": [ { "label": "string", "task_definition_id": "string", "description": "string", "metadata": { "property1": null, "property2": null }, "priority": "none", "task_id": "string", "status": "string" } ], "priority": "low", "worker_profile": { "property1": null, "property2": null }, "rescheduled_marked_at": "string", "cancellation_source": { "property1": null, "property2": null } } ], "created_by": { "source": "string", "timestamp": "string", "ip-address": "string", "device_id": "string", "driver_handle": "string", "user_id": "string", "email": "string" }, "ops_group_handle": "default", "track_mode": "on_time", "plan_mode": "on_demand", "started_at": "string", "assigned_at": "string", "planned_at": "string", "completed_at": "string", "device_id": "string", "driver_handle": "string", "worker_handle": "string", "metadata": { "property1": null, "property2": null }, "region": { "country": "string", "city": "string", "state": "string" }, "distance": 0, "duration": 0, "estimate": { "start_by": "string", "distance": 0, "duration": 0, "polyline": { "type": "string", "coordinates": [ [ null ] ] }, "start_location": { "type": "string", "coordinates": [ null ] }, "end_location": { "type": "string", "coordinates": [ null ] } }, "plan_id": "string", "device_switch_mode": "manual", "candidate_devices": [ "string" ], "completion_source": "string", "scheduled_start_at": "string", "polyline": { "type": "string", "coordinates": [ [ null ] ] }, "start_location": { "type": "string", "coordinates": [ null ] }, "end_location": { "type": "string", "coordinates": [ null ] }, "tracking_rate": 0, "time_to_first_event": 0, "time_to_first_location": 0, "completion_type": "end_at_last_order"}{ "detail": {}, "message": "string"}{ "detail": { "<location>": { "<field_name>": [ "string" ] } }, "message": "string"}Get Orders GET
Get orders with optional query parameters ### Planning failure reasons When an order is left unplanned by automated planning, `planning_failure_reason` may contain one of these values: - `No Worker was available for this plan.` - `No Worker schedule overlaps with this order's time window.` - `This order is outside the available Worker working hours.` - `Worker location is unavailable, so travel time could not be evaluated.` - `Worker start location is unavailable for the configured route start setting.` - `No Worker supports the required product type for this order.` - `Route was being modified concurrently and this order needs to be re-planned.` - `The optimizer dropped this order to satisfy planning constraints for the overall plan.` - `The optimizer could not find a feasible plan for the provided constraints.` - `Travel time calculation failed for this planning attempt.` - `Ops group configuration is incomplete for automated planning.` - `Assigning this order would exceed route or Worker capacity.` - `No Worker can reach this order before scheduled_at.` - `Assigning this order would delay an already planned downstream order.` - `Assigning this order would exceed the Worker's shift end time.` - `Automated planning could not assign this order with the provided constraints.`
Track Orders POST
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.