Webhooks
order_status_updated
This event is triggered every time the status of an order changes.
Specific Data for this message
JSON Field | Type | Description |
---|---|---|
order_uuid | string | Order UUID |
order_description | string | Your internal friendly order ID |
order_custom_fields | array or null | If you passed through an array of custom fields to the order creation API (custom_fields ), this will then be passed back to you here. |
order_status | string | The new status, as documented below. |
account_uuid | string | Store UUID |
partners_unique_internal_order_id | string | The order's unique ID on your system. This can be set when creating orders. |
order_account_partners_external_identifier | string | The store's unique ID on your system. This can be set when setting up a store. |
order_account_business_partners_external_identifier | string | The business's unique ID on your system. This can be set when setting up a business. |
published_at | integer, unix timestamp | The time the event occurred |
items | array | Array of items, please contact support to expose this field |
Possible Statuses
Name | Description |
---|---|
in_progress | the driver has picked up the order |
completed | the order has been completed |
failed | the order has been failed |
cancelled | the order has been cancelled |
auto_closed | the order has been auto closed by Captain system |
not_dispatched | the order has not been dispatched |
Example payload when an order is cancelled-
{
"data": {
"order_uuid": "6992dc85d681",
"order_custom_fields": {
"example": 123,
"sms_opt_in": true,
"anything_else_that": "was_passed_through_when_creating_an_order"
},
"order_status": "cancelled",
"order_description": "12",
"account_uuid": "73f4c9af9f79",
"partners_unique_internal_order_id": "ac730930-a545-4a54-8ad9-5f60737d8a1c",
"order_account_partners_external_identifier": "partners-external-identifier-account",
"order_account_business_partners_external_identifier": "",
"published_at": 1651157758.1605158,
"items": [
{ "uuid": "57414eeb4206", "addons": [], "name": "Pepperoni Pizza", "quantity": 1, "addons_type": "pizza", "status": "not_being_prepared", "printer": "default" },
{ "uuid": "71b51e21e3e4", "addons": ["extra saurce"], "name": "Wings", "quantity": 1, "addons_type": "", "status": "not_being_prepared", "printer": "fryer" },
{ "uuid": "dbc1a6eb244b", "addons": [], "name": "Fried", "quantity": 1, "addons_type": "", "status": "not_being_prepared", "printer": "fryer" }
],
},
"environment": "production",
"event_name": "order_status_updated",
"created_at": "2022-04-28T14:55:58.274+00:00",
"event_uuid": "9a52600d-04e9-49b0-98c5-f4004fbcde9e",
"metadata": {
"sent_at": "2022-04-28T14:55:58.294+00:00",
"delivery_attempt": 1
}
}
Example payload when an order is completed
{
"data": {
"order_uuid": "5b1ccbf2b496",
"order_description": "12",
"order_custom_fields": {
"example": 123,
"sms_opt_in": true,
"anything_else_that": "was_passed_through_when_creating_an_order"
},
"order_status": "completed",
"account_uuid": "73f4c9af9f79",
"partners_unique_internal_order_id": "1a61f5f3-af81-4fa1-9281-32f7e8b2d0ed",
"order_account_partners_external_identifier": "partners-external-identifier-account",
"order_account_business_partners_external_identifier": "",
"published_at": 1651157304.6201665,
"items": [
{ "uuid": "57414eeb4206", "addons": [], "name": "Pepperoni Pizza", "quantity": 1, "addons_type": "pizza", "status": "completed", "printer": "default" },
{ "uuid": "71b51e21e3e4", "addons": ["extra saurce"], "name": "Wings", "quantity": 1, "addons_type": "", "status": "completed", "printer": "fryer" },
{ "uuid": "dbc1a6eb244b", "addons": [], "name": "Fried", "quantity": 1, "addons_type": "", "status": "completed", "printer": "fryer" }
],
},
"environment": "production",
"event_name": "order_status_updated",
"created_at": "2022-04-28T14:48:24.763+00:00",
"event_uuid": "26c321ec-da73-46e1-9f23-52fe28421492",
"metadata": {
"sent_at": "2022-04-28T14:48:24.781+00:00",
"delivery_attempt": 1
}
}