Webhooks
In Routr Dispatch, Settings → Webhooks: add your system’s address (HTTPS, on the public internet), pick its events, and Routr sends it a POST each time one happens, within about a minute. Send a test sends a made-up stop.
| Event | When |
|---|---|
stop.booked | Added to Waiting or sent, with its tracking link |
stop.sent | On a route sent to a courier |
stop.out | Its route started |
stop.next | The courier is on the way to it |
stop.delivered | Who took it, and proof as links that last an hour |
stop.not_delivered | With the reason |
stop.taken_off | Taken off a route: takenOff.back is waiting, or null when it was deleted |
route.finished | Its numbers: delivered, not delivered, money |
Headers: Routr-Event, Routr-Delivery (the message’s id in your delivery log) and Routr-Signature. Answer with any 2xx within 5 seconds. One not answered is sent again 5 times over 6 hours (after 1, 5, 30, 120 and 204 minutes), with the same id, so you can tell a message sent again from a new one. Messages can arrive out of order: at says when each thing happened. After a day without an answer the address pauses, and the business’s bell says so.