Receiving a Webhook Notification
When making AfterShip Shipping API request, you can give a parameter async=true to receive a webhook notification when AfterShip Shipping has the response ready. In order to receive a webhook, you need to enable the webhook setting first.
In the API request, you have to:
![](https://storage.crisp.chat/users/helpdesk/website/c31b6ca0d393080/screenshot-2021-02-03-at-12242_1o5x5rp.png)
Webhook data is sent as JSON in the POST request body.
The webhook envelope contains:
![](https://storage.crisp.chat/users/helpdesk/website/c31b6ca0d393080/screenshot-2021-02-03-at-12240_1tbzxz.png)
![](https://storage.crisp.chat/users/helpdesk/website/c31b6ca0d393080/screenshot-2021-02-03-at-12235_1rvlb39.png)
calculated rate webhook
![](https://storage.crisp.chat/users/helpdesk/website/c31b6ca0d393080/receiving-a-webhook-notificati_13o6daf.png)
In the API request, you have to:
![](https://storage.crisp.chat/users/helpdesk/website/c31b6ca0d393080/screenshot-2021-02-03-at-12242_1o5x5rp.png)
Webhook data is sent as JSON in the POST request body.
The webhook envelope contains:
![](https://storage.crisp.chat/users/helpdesk/website/c31b6ca0d393080/screenshot-2021-02-03-at-12240_1tbzxz.png)
Events
![](https://storage.crisp.chat/users/helpdesk/website/c31b6ca0d393080/screenshot-2021-02-03-at-12235_1rvlb39.png)
Example
calculated rate webhook
![](https://storage.crisp.chat/users/helpdesk/website/c31b6ca0d393080/receiving-a-webhook-notificati_13o6daf.png)
Updated on: 04/12/2023
Thank you!