Every message is a POST with a JSON body: the event name and its data.
{
"event": "order.placed",
"data": { "id": 5123, "unique_order_id": "OD-…", "total": 163 }
}
Orders
| Event | Sent when |
|---|
order.placed | A customer places a new order. A sale completed on the till also sends it |
order.accepted | You accept an order |
order.modified | The items or amounts of an order change |
order.shipped | The first courier shipment of an order gets its tracking number (AWB) |
order.delivered | An order is marked as delivered |
order.cancelled | An order is cancelled |
order.reassigned | An order is moved to another of your locations |
data is the full order: items, amounts, customer and delivery details.
- When an order is tied to a location,
data also has fulfilment_location with id, code, name, external_ref and erpnext_branch.
order.reassigned adds reassignment with from, to, by (id, name) and at.
Returns
| Event | Sent when |
|---|
return.requested | A customer, or you, asks to return or exchange items |
return.approved | You approve a return, or it is approved automatically |
return.rejected | You reject a return request |
return.pickup_cancelled | The pickup of a return is cancelled by you or the courier. The return is approved again, without a second return.approved |
return.pickup_rescheduled | The pickup of a return is booked again after a cancelled one |
return.received | The returned items reach you |
return.refunded | A return is refunded |
return.exchanged | An exchange is completed |
return.cancelled | A return is cancelled by the customer or by you |
Main keys of data:
| Group | Keys |
|---|
| Identity | id, number, type, shop_id, customer_id, order_id, exchange_order_id, url |
| State | status, status_label, reason_code, reason, note, shop_note, return_method |
| Money | refund_method, refund_status, refund_amount, refunded_amount, refund_estimate, delivery_refund, shipping_fee, exchange_difference, refund_reference |
| Pickup parcel | shipment with courier, awb, status, status_label, tracking_url |
A first pickup booking sends no event. Photo links in the data are signed and stay valid for 7 days.
Shipping
| Event | Sent when |
|---|
shipment.status_changed | A courier parcel going to the customer changes status |
| Key | Holds |
|---|
order_id, shop_id | The order number and your shop |
shipment | id, courier, driver, awb, reference, status, status_label, previous_status, previous_status_label, courier_status, tracking_url, eta, cod_amount |
event | occurred_at, location, description of the scan |
Return pickups do not send this event.
Customers
| Event | Sent when |
|---|
customer.registered | A customer of your shop gets a partner ID for the first time, when they sign up or sign in with one |
customer.updated | You save a customer in the panel with the Partner ID field filled in |
data holds user_id, partner_id, name, email, phone and created_at.
The form describes these as a new sign-up and a change of details. In the code both need a partner ID: other sign-ups and profile changes send nothing. The Partner ID field shows only when support has enabled partner commission for your shop.
Not available
There are no product, stock or price events. Demo-store orders and their returns send nothing.