Articles on: API & Webhooks

Receiving a Webhook Notification


Overview


When you make an API request to AfterShip Shipping, you can include the async=true parameter to receive a webhook notification once the response is ready. To receive the webhook, you must first enable the webhook setting.


This is how you can set it up in your API request:


API Request Example


The webhook data will be sent as a JSON payload in the POST request body.


The webhook envelope contains the following structure:


Webhook Envelope Example


Events


Event Example


Example: Calculated rate webhook


Calculated Rate Webhook Example

Updated on: 03/02/2025