> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gowasl.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Wasl Webhook: Order Delivery Status Update Events

> Receive real-time order status changes, driver location, and tracking links as Wasl pushes delivery progress events to your webhook URL.

Wasl sends a Status Update webhook to your registered endpoint whenever an order's delivery status changes. This gives your integration real-time visibility into driver assignment, pickup, in-transit movement, and delivery completion — without needing to poll for updates. Use this event to keep your customers informed and to update your own order management records.

The payload includes the driver's current GPS coordinates and a tracking link. The tracking link points to pickup tracking until the driver collects the order, then automatically switches to delivery tracking once the order is picked up.

<Note>
  The `completed_at` field is an empty string (`""`) until the delivery is completed. Once complete, it contains the delivery timestamp. Check for an empty string rather than a null value.
</Note>

## Delivery Direction

This webhook is sent **by** Wasl **to your server** — you do not call this endpoint yourself.

```
POST your-webhook-url
Content-Type: application/json
```

## Payload Fields

<ParamField body="driver_name" type="string">
  The full name of the driver assigned to this order.
</ParamField>

<ParamField body="driver_phone" type="string">
  The driver's phone number, formatted with a country code (e.g. `+965123321`).
</ParamField>

<ParamField body="driver_latitude" type="float">
  The driver's current location latitude as a decimal degree value.
</ParamField>

<ParamField body="driver_longitude" type="float">
  The driver's current location longitude as a decimal degree value.
</ParamField>

<ParamField body="tracking_link" type="string">
  A URL your customers can use to track the order in real time. Points to pickup tracking before collection, and switches to delivery tracking once the order is picked up.
</ParamField>

<ParamField body="completed_at" type="string">
  The UTC timestamp of delivery completion. Returns an empty string (`""`) if the delivery is not yet complete.
</ParamField>

<ParamField body="order_number" type="string">
  The Wasl-assigned order number for this delivery.
</ParamField>

<ParamField body="vendor_order_id" type="string">
  The order ID you provided when creating the order. Use this to match the event to your internal records.
</ParamField>

<ParamField body="order_status" type="integer">
  A numeric code representing the current delivery status of the order.
</ParamField>

<ParamField body="delivery_fee" type="float">
  The delivery fee for this order.
</ParamField>

<ParamField body="delivery_distance" type="float">
  The delivery distance in kilometres.
</ParamField>

<ParamField body="webhook_token" type="string">
  A secret token for verifying that the request originated from Wasl. Always validate this before processing the payload. See the [Webhooks Overview](/api-reference/webhooks/overview) for details.
</ParamField>

## Example Payload

```json Payload theme={null}
{
  "driver_name": "Driver name",
  "driver_phone": "+965123321",
  "tracking_link": "http://tracking.mashkor.com/#12323",
  "completed_at": "",
  "order_number": "W4TK74",
  "vendor_order_id": "XYZ123",
  "order_status": 3,
  "driver_latitude": 29.378580671505663,
  "driver_longitude": 47.979990184727484,
  "delivery_fee": 1.25,
  "delivery_distance": 7.8,
  "webhook_token": "XXXXX"
}
```

## Handling the Event

After validating the `webhook_token`, a typical handler will:

1. Look up the order in your system using `vendor_order_id`.
2. Update the order's status to match `order_status`.
3. Store or surface the `tracking_link` for the customer.
4. If `completed_at` is non-empty, mark the order as delivered and record the completion time.
5. Return HTTP 200 to acknowledge receipt.

<Tip>
  Surface the `tracking_link` to your customers as soon as a driver is assigned. Real-time tracking significantly reduces support enquiries about delivery ETAs.
</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.