Receive shipment updates through webhooks

Created by Mosaab Musa, Modified on Tue, 1 Dec at 2:34 PM by Mosaab Musa

Summary: add your webhook URL to your app from the bell icon on the app card, and Torod sends your system an automatic update every time a shipment's status changes. You can review every update sent from the same place.


Before you start


Add your webhook URL

  1. Open Settings ← API ← Apps.
  2. On your app card press the third icon (the bell). The Webhook/Notifications window opens.
  3. If you haven't added a URL yet, it shows Webhook is inactive.
  4. Paste your URL in Webhook URL and press Update.


webhook-empty


Result: your system starts receiving shipment updates at that URL.


Verify every update

  • Torod sends your app's client secret in the Authorization header. Reject any request that doesn't match.
  • Reply quickly with HTTP 200, then process the update.


What each update contains

FieldMeaning
order_idOrder number
tracking_idCarrier tracking number
statusTorod order status
date_timeUpdate time
descriptionCarrier's status description
torod_description / torod_description_arTorod's status description in English and Arabic


The full list of statuses and values is in the Torod API docs.


Review the updates sent

The same Webhook/Notifications window shows a log of every update sent to your system:

ColumnMeaning
Order numberThe order whose status changed
Webhook URLWhere the update was sent
Webhook Http CodeYour system's reply. 200 means it arrived
Is SendedNumber of times sent
Fail CountNumber of failed attempts
Created AtDate and time of the update
ActionPress the eye icon to see the update details


webhook-log


If an update fails

  • If the code isn't 200, or Fail Count is above zero: make sure your URL is reachable from the internet and replies with HTTP 200.
  • Turn on Webhook warnings in Settings ← Notifications to get an email if your URL fails or stops responding.


notifications

  • Need the status now: send Shipment Track with tracking_id.


Sandbox and production

Each environment has its own webhook URL. After your app moves to production, add the production URL with the same steps. See "Move your integration from sandbox to production".


When to contact us

  • Your URL replies 200 but updates don't arrive.
  • Send: the app name, environment, order number and a screenshot of the update log. Never send your client secret.


Related articles

  • Connect your system through the API
  • Move your integration from sandbox to production

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article