# Webhooks for Order Status Updates - Nov 2024

## How Wakilni Webhooks Work

When your app or website needs information about specific events related to Wakilni order's status, it can subscribe to Wakilni webhook topics as a mechanism for receiving near-real-time updates about these events.

Wakilni webhooks are useful for keeping your app or website in sync with Wakilni order status updates or as triggers to perform additional actions after an event has occurred.

### **Webhooks for events**

![Webhooks for Order Creation Event](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-11-15/def0657c-4539-47c3-85f3-d439d5796f27/screenshot.jpeg?tl_px=0,0\&br_px=1684,1894\&force_format=jpeg\&q=100\&width=996)

### **The list of Webhook events:**

* 'Order Created'
* 'Order Confirmed'
* 'Order Declined'
* 'Order Assigned'
* 'Order Processed'
* 'Order Canceled'
* 'Order Postponed'
* 'Order Completed'
* 'Order Completed Rejected'
* 'Order Closed Failed'
* 'Order Pending Cancelation'
* 'Order Failed'
* 'Order Ready for Self-Pickup'

### **The following data are sent in the header of the event:**

* x-webhook-signature: `a base64 encoded HMAC-SHA256 hash of the payload`
* x-attempt-number: nb of attempts
* x-webhook-source: [https://api.wakilni.com](https://api.wakilni.com/)
* x-webhook-topic: e.g `Order Canceled`
* x-webhook-id: webhook\_id
* x-webhook-delivery-id: delivery\_id

### **Events Payload Samples:**

**Order Created:**

{\
"event\_id": "e2986cd1-1e85-4ef1-a85a-89488dd27b92",\
"event": "Order Created",\
"timestamp": "2024-11-14 14:39:13",\
"data": {\
"order\_id": ###,\
"waybill": "###",\
"created\_at": "2024-11-14 14:39:10"\
}

**Order Assigned:**

{\
"event\_id": "e2986cd1-1e85-4ef1-a85a-89488dd27b92",\
"event": "Order Assigned",\
"timestamp": "2024-11-14 14:39:13",\
"data": {\
"order\_id": ###,\
"waybill": "###",

"driver\_name": ###,\
"driver\_phone": "+961########",\
"updated\_at": "2024-11-14 14:39:10"\
}

**Order Ready for Self-Pickup:**

{\
"event\_id": "e2986cd1-1e85-4ef1-a85a-89488dd27b92",\
"event": "Order Ready for Self-Pickup",\
"timestamp": "2024-11-14 14:39:13",\
"data": {\
"order\_id": ###,\
"waybill": "###",\
"location": \[

&#x20;      "office\_name": "Wakilni Dekwaneh",

&#x20;      "phone\_number": "+961########", ]\
}

**For the rest of the events the payload sample will be as follow:**

{\
"event\_id": "e2986cd1-1e85-4ef1-a85a-89488dd27b92",\
"event": "Order Confirmed",\
"timestamp": "2024-11-14 14:39:13",\
"data": {\
"order\_id": ###,\
"waybill": "###",\
"new\_status\_code": 7,\
"new\_status": "Confirmed",\
"previous\_status\_code": 1,\
"previous\_status": "Pending",\
"updated\_at": "2024-11-14 14:39:10"\
}

## Subscribe to Wakilni Webhook

1\. Login as client to Wakilni portal.

2\. Go to "Settings".

![](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-11-12/f80f5f6d-867b-4054-930a-a0660c12e5ff/ascreenshot.jpeg?tl_px=0,311\&br_px=1075,912\&force_format=jpeg\&q=100\&wat_scale=95\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=41,540)

3\. Click "Webhooks" tab.

![](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-11-12/f6cd939c-8b39-4d02-9bf9-46bace6e183d/ascreenshot.jpeg?tl_px=514,0\&br_px=1245,409\&force_format=jpeg\&q=100\&width=732\&wat_scale=65\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=342,148)

4\. Click "Create Webhook" button.

![](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-11-12/d5b624a9-6a8b-4ff7-b580-ac49e6594359/ascreenshot.jpeg?tl_px=645,0\&br_px=1920,712\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=934,208)

5\. Select your app token where the integration created with your shopify or WooCommerce account and Wakilni portal.

![](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-11-12/da4c7425-96da-4622-a7da-167d9748c30f/ascreenshot.jpeg?tl_px=0,0\&br_px=1563,873\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=445,272)

6\. You are allowed to track many order's events through this webhook integration.

![](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-11-12/50a018a3-bbf3-42a9-b5d2-5d673f4af5fa/ascreenshot.jpeg?tl_px=195,231\&br_px=1270,832\&force_format=jpeg\&q=100\&wat_scale=95\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=502,265)

7\. Click to select on of these events.

![](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-11-12/590f6022-e6c5-4949-bb0c-51fcd46c12ed/ascreenshot.jpeg?tl_px=343,0\&br_px=1418,600\&force_format=jpeg\&q=100\&wat_scale=95\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=502,256)

8\. Check to enable this webhook.

![](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-11-12/2094eae0-335b-4771-acb5-b43c891f291e/ascreenshot.jpeg?tl_px=218,310\&br_px=1293,911\&force_format=jpeg\&q=100\&wat_scale=95\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=502,265)

9\. Add the "Delivery URL" ,could be your app or web URL or any custom URL, where you want to receive the webhook updated events.

![](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-11-12/d50d9701-b068-4115-b52d-61332611869e/ascreenshot.jpeg?tl_px=173,47\&br_px=1248,648\&force_format=jpeg\&q=100\&wat_scale=95\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=502,265)

10\. Click "CREATE".

![](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-11-12/4d19cf42-4e44-402a-a78c-7dfc3311f09d/ascreenshot.jpeg?tl_px=812,311\&br_px=1887,912\&force_format=jpeg\&q=100\&wat_scale=95\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=502,370)

11\. You are able to edit or delete your webhooks created.

![](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-11-12/187f355e-f767-45a8-87e9-391d244764e2/ascreenshot.jpeg?tl_px=356,38\&br_px=1920,912\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=863,345)

Tip: For your inquiries, please don�t hesitate to contact us on <frontdesk@wakilni.com>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.wakilni.com/release-notes/webhooks-for-order-status-updates-nov-2024.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
