Webhook Specifications

Learn how AfterShip verifies and secures all the webhook requests.


Method
POST application/jsonWhen the tracking is updated and it triggers an update of one of your trigger setting, we make a POST request to the callback URL that you defined in the webhook page.
The post body contains a JSON string of the below data.
  • ts - UTC unix timestamp that the event occurred
  • event - the code of the event
  • event_id - UUID v4 format, to uniquely identify the webhook event
  • is_tracking_first_tag - indicate if it is the first tracking update sent under a specific delivery tag. This allows application to send only the key updates to end users (e.g. the first in transit, the first failed attempt)
  • msg - details about the message for which the event occurred, in the following format.
  • UpdateEvent CodeEvent Type
    Shipment statustracking_update
  • Info received
  • In Transit
  • Out for Delivery
  • Available for pickup
  • Delivered
  • Failed attempt
  • Expired
  • Exception
  • Estimated delivery date (EDD)edd_revise
  • All EDD updates
  • preparing...