QUICKSTART
API Quick Start
Authentication
SignString
OAuth
Overview
Getting Started
Scope List
Versioning
Rate Limit
Body Envelope
Request Errors
Try API Endpoints
CHANGELOG
Changelog
REFERENCE
API Overview
v4
Estimated delivery date
Batch prediction for the Estimated Delivery Date
post
Tracking
Get trackings
get
Create a tracking
post
Get a tracking by ID
get
Update a tracking by ID
put
Delete a tracking by ID
delete
Retrack an expired tracking by ID
post
Mark tracking as completed by ID
post
Get a tracking (Legacy)
get
Update a tracking (Legacy)
put
Delete a tracking (Legacy)
delete
Retrack an expired tracking (Legacy)
post
Mark tracking as completed (Legacy)
post
Courier
Get user activated couriers
get
Detect courier
post
Get all couriers
get
Last Checkpoint
Get last checkpoint by tracking ID
get
Get last checkpoint (Legacy)
get
Notification
Get tracking notification by tracking ID
get
Add a notification by tracking ID
post
Remove a notification by tracking ID
post
Get tracking notification (Legacy)
get
Add a notification (Legacy)
post
Remove a notification (Legacy)
post
MODEL
Tracking
v4
Courier
v4
Checkpoint
v4
Notification
v4
ENUM
Additional Tracking Fields
Delivery Statuses
Delivery Sub-statuses
Slug Groups
Webhook
Webhook Overview
Webhook Versioning
Webhook Specifications
Webhook Signature
Webhook OAuth 2.0
Webhook Outgoing IPs
Webhook Changelog
OTHERS
Supported Couriers
CSV Upload & CSV Auto-Fetch
Shipment CSV Export
Order CSV Export
SDK
Android SDK
iOS SDK
Java SDK
Node.js SDK
.NET SDK
Python SDK
Ruby Gem
PHP SDK
Golang SDK
Open Source
phone
email-verifier
Support
Contact Support

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...