Webhooks
job_delivery_status_updated
This event is triggered when a job's status changes, e.g. when it is accepted by the driver, picked up, completed, etc.
Specific Data for this message
JSON Field | Type | Description |
---|---|---|
job_uuid | string | Job UUID |
order_uuid | string | Order UUID |
order_description | string | Your internal friendly order ID |
account_uuid | string | Store UUID |
job_delivery_status | string | The new status, as documented below. |
job_delivery_status_agent_uuid | string | The driver's UUID |
job_delivery_status_agent_location | object containing latitude , longitude , and recorded_at | The driver's most recent location |
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. |
order_custom_fields | hash or null | If you passed through a hash of custom fields to the order creation API (custom_fields ), this will then be passed back to you here. |
partners_unique_internal_order_id | string | The order's unique ID on your system. This can be set when creating orders. |
published_at | integer, unix timestamp | The time the event occurred |
Possible Statuses
Name | Description |
---|---|
unassigned_to_driver | The order has been unassigned from the driver. |
assigned_to_driver | The order has been assigned. |
assigned_and_accepted_by_driver | The order has been accepted by the driver. |
collected | The order has been collected. |
dropped_off | The order has been dropped off (and thus completed). |
auto_closed | The order has been auto closed by our system. |
failed | The order has failed. |
cancelled | The order has been cancelled. |
Example Webhook Payload
{
"data": {
"job_uuid": "6992dc85d681",
"job_delivery_status": "assigned_to_driver",
"job_delivery_status_agent_uuid": "7183bb9f1a65",
"job_delivery_status_agent_location": {
"latitude": "18.797923",
"longitude": "98.965022",
"recorded_at": "2022-04-28 07:54:06 -0700"
},
"order_uuid": "6992dc85d681",
"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": "",
"order_custom_fields": {
"example": 123,
"sms_opt_in": true,
"anything_else_that": "was_passed_through_when_creating_an_order"
},
"published_at": 1651157722.3366332
},
"environment": "production",
"event_name": "job_delivery_status_updated",
"created_at": "2022-04-28T14:55:22.353+00:00",
"event_uuid": "1a940d60-5186-401c-acf1-f0352118164f",
"metadata": {
"sent_at": "2022-04-28T14:55:22.372+00:00",
"delivery_attempt": 1
}
}