Skip to main content

Webhooks

order_status_updated

This event is triggered every time the status of an order changes.

Specific Data for this message

JSON FieldTypeDescription
order_uuidstringOrder UUID
order_descriptionstringYour internal friendly order ID
order_custom_fieldsarray or nullIf 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_statusstringThe new status, as documented below.
account_uuidstringStore UUID
partners_unique_internal_order_idstringThe order's unique ID on your system. This can be set when creating orders.
order_account_partners_external_identifierstringThe store's unique ID on your system. This can be set when setting up a store.
order_account_business_partners_external_identifierstringThe business's unique ID on your system. This can be set when setting up a business.
published_atinteger, unix timestampThe time the event occurred
itemsarrayArray of items, please contact support to expose this field

Possible Statuses

NameDescription
in_progressthe driver has picked up the order
completedthe order has been completed
failedthe order has been failed
cancelledthe order has been cancelled
auto_closedthe order has been auto closed by Captain system
not_dispatchedthe 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
}
}