Webhook Specifications
Learn how AfterShip Returns verifies and secures all the webhook requests.
Method | |
---|---|
POST application/json | When the corresponding event is triggered, we will send a webhook to the address you specified based on your configuration. The post body contains a JSON string of the below data. |
1. Events List
Event Name | Description |
---|---|
return.approved | Occurs when a return request is approved. |
return.expired | Occurs when a return request is expired. |
return.rejected | Occurs when a return request is rejected. |
return.resolved | Occurs when a return request is resolved. |
return.submitted | Occurs when a return request is successfully submitted. |
return.dropoff.created | Occurs when a drop-off parcel QR code is generated. |
return.dropoff.shipment.updated | Occurs when a shipment of drop-off is updated. |
return.dropoff.updated | Occurs when a drop-off parcel is updated, e.g., when it is handed over to parcel collection location. |
return.restock.created | Occurs when a restock operation is executed via AfterShip. |
return.shipment.provided | Occurs when the merchant provides a shipment. |
return.shipment.recorded | Occurs when the shopper provides a shipment information. |
return.shipment.updated | Occurs when the tracking status of a shipment changes. |
return.shipments.provided | Occurs when the merchant has provided all the necessary shipment information. |
return.exchange.order.created | Occurs when the exchange order has been created |
return.receiving.created | Occurs when the returned items have been received by the merchant. |
Webhooks will be divided into these categories.
- Returns
- Shipments
- Receivings
- Refund
- Restock
- Exchange
- Items
1.1 Returns Events
Returns event reflects the approval process.
return.submitted
: When a shopper submitted an RMA.return.approved
: When the merchant approves an RMAreturn.resolved
: When the merchant completed all necessary processing for an RMA.return.rejected
: When the merchant rejected an RMAreturn.expired
: When an approved RMA expired due to items not being received by merchants.
1.2 Shipments Events
The shipments events of the return items appears AFTER an RMA is approved.
Typically, these events can be integrated with a 3rd party notification system to send different kinds of notifications to shoppers.
Below is an overview of major events in different cases.

Case: Merchants provide shipping labels
return.shipment.provided
: When a shipping label with a tracking number is generated/uploaded by the merchant.return.shipments.provided
: When all labels of the RMA complete generation/fully supplied. If the RMA only has 1 label to generate, this event will immediately fire afterreturn.shipment.proivded
event.return.shipment.updated
: This is a per-shipment event powered by AfterShip Tracking. It happens for every logistic status updates.

Case: Green Return
When merchants decide to let the shopper keep the items. The event below is emitted after an RMA is approved.
return.shipment.skipped
: (Not available yet) Shipment is skipped. Generally, a notification to notify shoppers to keep the returned items can be sent at this moment.

Case: Shoppers upload shipping labels
return.shipments.requested
: (Not available yet) Shipping instructions are now displayed on the Returns Page to shoppers.return.shipment.recorded
: Shoppers uploaded a tracking number of the shipped return items.

1.3 Dropoff Events
When merchant adopted a parcel collection network like Happy Returns that provides return item drop-off service, that parcel collection network will take charge of items’ collections, packing and shipping back to warehouses with its own source of carriers and tracking system.
Case: Shopper dropped items at a parcel collection network
return.dropoff.created
: The parcel collection network is ready to receive the items.return.dropoff.updated
: Shoppers dropped the return items at one of the parcel collection hub.return.dropoff.shipment.updated
: Return items of the RMA were shipped by the parcel collection network with specific tracking numbers.
1.4 Restock Events
return.restock.created
: When some items are restocked to an inventory warehouse.
2. Headers
3. Body
The timestamp when this return was approved.
Indicates whether the return was automatically approved.
The timestamp when this return was rejected.
The reason for the return rejection.
Indicates whether the return was automatically rejected.
The timestamp when this return was resolved.
Indicates whether the return was automatically resolved.
The timestamp when this return was refunded.
Indicates whether the return was automatically refunded.
Indicates whether the return has triggered an automatic receive.
The timestamp when this return was expired.
Whether the "Shop Now" feature (also known as "Exchange for other items") has been used.
The tax amount associated with the return.
The total amount refunded for the return.
Expected result of the return
The shipping status at the return level.
Exceptions in the return that require manual handling