Orders - Update Single Order Status
Overview
This endpoint allows you to update a single order.
Possible Statuses
Name | Description |
---|---|
being_prepared | the order is being prepared |
prepared | the order is prepared |
cancelled | the order has been cancelled |
Request
PATCH v1/order-status/{order_uuid}
- Request Values
Key | Type | Description | Example |
---|---|---|---|
status | string | Order status | being_prepared |
scheduled_for | DateTime | The time to reschedule order to. | 2020-06-19T20:14:53.988+02:00 |
cancellation_reason | string | Optional field, to be included when updating the order status to 'cancelled' | customer cancelled |
disable_kds_notifications | boolean | Optional field, set to true to disable KDS notifications when updating order status to 'cancelled' | true |
Example Cancelled Order Request
PATCH /v1/order-status/46edc8e3
- Body:
{
"status": "cancelled",
"cancellation_reason": "customer cancelled",
"disable_kds_notifications": true
}
Cancelled Order Response
Status: 200
Body:
{
"uuid": "6b6cce3454b2",
"created_at": "2020-06-18T20:14:53.988+02:00",
"status": "cancelled",
"preparation": {
"auto_prepare": "true",
"estimated_preparation_duration": 3,
"estimated_preparation_start_time": "2020-07-08T10:46:17.244Z"
},
"status_history": [],
"scheduled_for": "2020-06-19T20:14:53.988+02:00",
"partners_unique_internal_order_id": "SRCIiCZp4qZcdQRaDeDnwUTk",
"kind": "delivery",
"special_instructions": "",
"placed_at_time": "2020-06-18T20:14:53.503+02:00",
"store_order_reference_description": "Mmk",
"tracking_link": "https://tracking.captain.ai/t/6b6cce3454b2",
"financial_record": {
"delivery_fee": "0.0",
"grand_total_including_tax": "25.90",
"items_subtotal": "22",
"payment_amount_received": "25.90",
"remaining_balance": "0.0",
"payment_method": "online",
"payment_status": "fully_paid",
"pre_delivery_driver_tip": "0.0",
"post_delivery_driver_tip_by_card": "0.0",
"card_charges": "0.25",
"total_tip_left_for_driver": "0.0",
"tax_type": "GST",
"credit": "0.05",
"deposit": "0.10",
"discount": "1.13"
},
"recipient": {
"uuid": "c060e997b25f",
"first_name": "John",
"last_name": "Owl",
"full_name": "John Owl",
"email": "john.doe@captain.ai",
"phone_number": "+47455644555",
"opted_out_of_SMS": false,
"opted_out_of_email": false,
"partners_internal_recipient_id": "fkA022WJ",
"landline_number": ""
},
"delivery_job": {
"promised_delivery_minutes": 60,
"uuid": "6b6cce3454b2",
"promised_delivery_time_at": "2020-06-18T21:14:53.503+02:00",
"dropoff_eta": "2020-06-18T21:10:00.000+02:00",
"pickup_eta": "2020-06-18T21:00:00.000+02:00",
"delivery_status": "on_way_to_pickup_location",
"delivery_status_history": [],
"dropoff_location": {
"uuid": "18e0f802f520",
"name": "John Owl",
"line_1": "78 Cable Street",
"line_2": "-",
"city": "London",
"postcode": "E1 8GT",
"country": "United Kingdom",
"address_specific_instructions_to_driver": "",
"state": "London",
"apartment_number": "78",
"latitude": "51.510911",
"longitude": "-0.064716"
}
},
"internal_notes": [
{
"note": "Important note",
"date": "2020-07-08T10:46:17.244Z",
"user": "john.doe@captain.ai"
},
{
"note": "Important note #2",
"date": "2020-07-08T10:50:00.244Z",
"user": "john.doe@captain.ai"
}
],
"items": [
{
"uuid": "cc3bc4ce95db",
"name": "Items not listed",
"partners_uuid": "1234-2020",
"quantity": 1,
"category": "Pizza",
"addons": ["chilli sauce", "nachos"],
"preparation_status": "not_being_prepared",
"price": "12.34",
"cookable": true
}
],
"assigned_driver": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe.donuts@ingmaras.com",
"phone_number": "+447455644555",
"profile_picture_url": "http://res.cloudinary.com/captain-ai/image/upload/v1592503628/profile_pictures/phl1sfcweell2kwvrtin.jpg",
"active": true,
"agent_uuid": "18e0f802f520"
}
}
Example Update Order Status
PATCH /v1/order-status/46edc8e3
- Body:
{
"status": "being_prepared"
}
Update Order Status Response
Status: 200
Body:
{
"uuid": "6b6cce3454b2",
"created_at": "2020-06-18T20:14:53.988+02:00",
"status": "being_prepared",
"preparation": {
"auto_prepare": "true",
"estimated_preparation_duration": 3,
"estimated_preparation_start_time": "2020-07-08T10:46:17.244Z"
},
...
}
Example Reschedule Order Request
PATCH /v1/order-status/46edc8e3
- Body:
{
"scheduled_for": "2020-06-19T20:14:53.988+02:00",
}
Reschedule Order Response
Status: 200
Body:
{
"uuid": "6b6cce3454b2",
"created_at": "2020-06-18T20:14:53.988+02:00",
"scheduled_for": "2020-06-19T20:14:53.988+02:00",
...
}