Webhooks
order_preparation_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_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. | 
| status | string | The new status, as documented below. | 
| order_description | string | Your internal friendly order ID | 
| kind | string | The order's kind, Can be either delivery,collection,walk_in,third_party_delivery, ordrive_thru. | 
| channel_slug | string | The order's source, by default the channel_slug is unknown. | 
| payment_gateway_id | string | The order's payment gateway ID, as sent in by your system. | 
| payment_status | string | The order's payment status | 
| grand_total_including_tax | decimal | The order's grand total including tax | 
| payment_amount_received | decimal | The order's payment amount received | 
| remaining_balance | decimal | The order's remaining balance | 
| 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 | 
| started_at | datetime | The time that order has started preparing | 
| completed_at | datetime | The time that order done preparing | 
| placed_at_time | datetime | The time that order has been masked as placed | 
| recipient | object | Information about the receipitn. Contains name(string),phone_number(string), andaddress(object) keys. Address containsname,line_1,line_2,city,postcode,country,state,apartment_number,latitude,longitude, andaddress_specific_instructions_to_driver. | 
| printer | string | Name of the printer | 
Possible Statuses
| Name | Description | 
|---|---|
| not_being_prepared | the order hasn't start preparing | 
| being_prepared | the order is being prepared | 
| prepared | the order has been prepared | 
Example payload when an order is being_prepared-
{
  "data": {
    "order_description": "5039-748",
    "order_uuid": "6992dc85d681",
    "payment_gateway_id": "01234",
    "payment_status": "fully_paid",
    "grand_total_including_tax": "23.57",
    "payment_amount_received": "23.57",
    "remaining_balance": null,
    "kind": "delivery",
    "channel_slug": "unknown",
    "order_custom_fields": {
      "example": 123,
      "sms_opt_in": true,
      "anything_else_that": "was_passed_through_when_creating_an_order"
    },
    "order_status": "being_prepared",
    "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": "fryer" },
      { "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" }
    ],
    "printer": "fryer",
    "started_at": "2024-04-29T10:44:22.181Z",
    "placed_at_time": "2022-04-28T14:55:58.174+00:00",
    "completed_at": "",
    "recipient": {
      "name": "Sarah Miller",
      "phone_number": "+16692224322",
      "address": {
        "name": "Sarah Miller",
        "line_1": "5 Marlow Gardens",
        "line_2": null,
        "city": "Hayes",
        "postcode": "UB3 1QZ",
        "country": "United Kingdom",
        "state": "England",
        "apartment_number": null,
        "latitude": "51.503013",
        "longitude": "-0.434346",
        "address_specific_instructions_to_driver": null
      }
    }
  },
  "environment": "production",
  "event_name": "order_preparation_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 prepared
{
  "data": {
    "order_description": "5039-748",
    "order_uuid": "5b1ccbf2b496",
    "payment_gateway_id": "01234",
    "payment_status": "fully_paid",
    "grand_total_including_tax": "23.57",
    "payment_amount_received": "23.57",
    "remaining_balance": null,
    "kind": "delivery",
    "channel_slug": "unknown",
    "order_custom_fields": {
      "example": 123,
      "sms_opt_in": true,
      "anything_else_that": "was_passed_through_when_creating_an_order"
    },
    "order_status": "prepared",
    "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" }
    ],
    "started_at": "2024-04-29T10:44:22.181Z",
    "placed_at_time": "2022-04-28T14:48:24.463+00:00",
    "completed_at": "2024-04-29T11:00:57.989Z",
    "recipient": {
      "name": "Sarah Miller",
      "phone_number": "+16692224322",
      "address": {
        "name": "Sarah Miller",
        "line_1": "5 Marlow Gardens",
        "line_2": null,
        "city": "Hayes",
        "postcode": "UB3 1QZ",
        "country": "United Kingdom",
        "state": "England",
        "apartment_number": null,
        "latitude": "51.503013",
        "longitude": "-0.434346",
        "address_specific_instructions_to_driver": null
      }
    }
  },
  "environment": "production",
  "event_name": "order_preparation_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
  }
}