Orders
Complete Order
Complete an order identified by the given order_handle
Complete an order identified by the given order_handle
AuthorizationBasic <token>
In: header
Path Parameters
order_handle*string
Query Parameters
type?|
Type of the order which can be drop or pick
type_index?|
Integer representing the pick or drop order index when having a pick/drop scenario
fulfillment_attempt?|
The attempt number for fulfilling the order
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/orders/string/complete" \ -H "Content-Type: application/json" \ -d '{}'{ "order_handle": "order-1", "fulfillment_attempt": 0, "status": "completed", "destination": { "geometry": { "type": "Point", "coordinates": [ -121.8871193, 37.390611 ] }, "address": "1709 Automation Pkwy, San Jose, CA 95101", "radius": 100 }, "ops_group_handle": "store-SF", "track_mode": "on_time", "plan_mode": "manual", "risk_status": true, "risks": { "is_offline": "green", "moving_away_from_destination": "green", "delayed_from_scheduled_at": "green", "deviating_from_expected_route": "green", "in_outage": "green", "moving_too_slow": "yellow", "delayed_from_initial_eta": "green", "in_low_battery": "green" }, "scheduled_at": "2023-10-26T02:00:00.000Z", "started_at": "2023-10-26T01:28:21.925Z", "type": "pick", "type_index": 0, "expected_service_time": 0, "actual_service_time": 0, "tracked_service_time": 0, "capacity_used": 1, "metadata": { "customerID": "12654" }, "region": { "country": "United States", "city": "San Jose", "state": "California" }, "share_url": "https://trck.at/xvgK2DRQvl", "completed_at": "2023-10-26T01:39:45.503Z", "device_id": "52193948-1A79-47CC-AB81-2FB0A59536D1", "worker_handle": "James", "created_at": "2023-10-25T17:54:42.233Z", "assigned_at": "2023-10-25T18:08:44.892Z", "route_handle": "812a1ea5-8c1e-407a-ba24-6cc46d783fef", "planned_at": "2023-10-25T18:08:44.659Z", "plan_id": "0f3415f2-63b7-4727-83d2-010e88b48715", "distance": 0, "duration": 21, "tracking_rate": 0, "polyline": { "type": "LineString", "coordinates": [ [ -121.877246, 37.371916, 24.49, "2023-10-26T01:39:24.125Z" ] ] }, "start_location": { "type": "Point", "coordinates": [ -121.877246, 37.371916 ] }, "end_location": { "type": "Point", "coordinates": [ -121.877246, 37.371916 ] }, "visited_destination": false, "completed_at_destination": false, "deviation_from_destination": 2254, "timeline": [ { "type": "order_created", "recorded_at": "2023-10-25T17:54:42.233Z", "order_handle": "order-1", "metadata": { "customerID": "12654" } }, { "type": "order_planned", "recorded_at": "2023-10-25T18:08:44.659Z", "order_handle": "order-1", "route_handle": "812a1ea5-8c1e-407a-ba24-6cc46d783fef", "fulfillment_attempt": 0 }, { "type": "order_assigned", "recorded_at": "2023-10-25T18:08:44.892Z", "order_handle": "order-1", "driver_handle": "James", "fulfillment_attempt": 0 }, { "type": "order_started", "recorded_at": "2023-10-26T01:28:21.925Z", "order_handle": "order-1", "route_handle": "812a1ea5-8c1e-407a-ba24-6cc46d783fef", "order_type": "pick", "fulfillment_attempt": 0 }, { "type": "driver_activity_started", "recorded_at": "2023-10-26T01:39:24.125Z", "driver_handle": null, "activity": "stop", "location": { "geometry": { "type": "Point", "coordinates": [ -121.877246, 37.371916 ] }, "recorded_at": "2023-10-26T01:39:24.125Z" }, "address": "1653, De Rome Drive, San Jose, Santa Clara County, California, 95131, United States" }, { "type": "driver_activity_ended", "recorded_at": "2023-10-26T01:39:24.125Z", "driver_handle": null, "activity": "stop", "location": { "geometry": { "type": "Point", "coordinates": [ -121.877246, 37.371916 ] }, "recorded_at": "2023-10-26T01:39:24.125Z" }, "distance": null, "duration": 0, "steps": 0 }, { "type": "order_completed", "recorded_at": "2023-10-26T01:39:45.503Z", "order_handle": "order-1", "route_handle": "812a1ea5-8c1e-407a-ba24-6cc46d783fef", "order_type": "pick" } ]}{ "detail": {}, "message": "string"}{ "detail": {}, "message": "string"}{ "detail": { "<location>": { "<field_name>": [ "string" ] } }, "message": "string"}