Skip to content

Webhooks

Event reference

Every event Wasil sends, when it is sent, and what is in it. How deliveries work is on Receiving events.

The events

TypeSent whendata holds
package.created The warehouse logged a package for one of your accounts. The package object.
package.matched A package was tied to one you announced. Sent together with package.created. The package object; partner_reference is your reference.
package.status_changed The status or the track_status of a package changed. The package object with the new statuses, plus previous: the two statuses before the change.
package.shipped The package left for Iraq (track_status became on the way). Sent together with package.status_changed. As package.status_changed.
package.delivered The package was handed to the customer. Sent together with package.status_changed. As package.status_changed.
customer.created You created a customer through the API. The customer object.
customer.myus_ready The US address of a customer you created is ready. The customer object, with myus_status completed.
test You pressed "Send a test event" on the portal. A message and your partner code.

New event types may be added. Answer 2xx to types you do not handle and ignore them.

A package event

data is the package exactly as GET /v1/packages/{lookup} returns it, so one piece of code can read both.

package.created
{
  "id": "evt_01j9z3k8w2m4n6p8q0r2s4t6v8",
  "type": "package.created",
  "mode": "live",
  "created_at": "2026-10-09T11:42:07+03:00",
  "data": {
    "id": "WPger10005254CS3",
    "tracking_number": "1Z999AA10123456784",
    "partner_reference": "ORDER-4471",
    "account": "UM1EX042",
    "origin": { "code": "ger", "name": "Germany" },
    "status": "In Review",
    "track_status": "incoming",
    "arrived": "2026-10-09",
    "sender": "Zalando",
    "weight": { "value": 2.5, "unit": "kg" },
    "dimensions": { "length": 30, "width": 20, "height": 15, "unit": "cm" },
    "is_dangerous": false,
    "is_returned": false,
    "items": [],
    "shipment": null,
    "photos": [],
    "created_at": "2026-10-09T11:42:07+03:00",
    "updated_at": "2026-10-09T11:42:07+03:00"
  }
}

A status change

status and track_status are the values at the moment of the event, and previous the values before it. One change can produce two events: package.status_changed always, and package.shipped or package.delivered when the package reaches that stage. Listen to the general one or to the specific ones, not both, or you will handle a change twice.

package.status_changed
{
  "id": "evt_01j9zb2c4d6e8f0g2h4j6k8m0n",
  "type": "package.status_changed",
  "mode": "live",
  "created_at": "2026-10-12T09:15:40+03:00",
  "data": {
    "id": "WPger10005254CS3",
    "tracking_number": "1Z999AA10123456784",
    "status": "on the way",
    "track_status": "on the way",
    "previous": { "status": "Ready to Send", "track_status": "incoming" },
    "...": "the rest of the package object"
  }
}

A customer event

customer.myus_ready
{
  "id": "evt_01j9zc5d7e9f1g3h5j7k9m1n3p",
  "type": "customer.myus_ready",
  "mode": "live",
  "created_at": "2026-10-03T14:05:09+03:00",
  "data": {
    "suite": "UM1EX042",
    "name": "Sara Ahmed",
    "phone": "9647701234567",
    "email": "[email protected]",
    "city": { "id": 1, "name": "Erbil" },
    "address": "Street 40, Ankawa",
    "origin": "created",
    "myus_status": "completed",
    "created_at": "2026-10-03T14:05:00+03:00"
  }
}

The test event

test
{
  "id": "evt_01j9zd8e0f2g4h6j8k0m2n4p6q",
  "type": "test",
  "mode": "live",
  "created_at": "2026-10-03T15:00:00+03:00",
  "data": { "message": "This is a test event from Wasil.", "partner": "EX" }
}