Common message structure
This document describes the common message structure all the Circuit's webhook events share.
The message body
Any messages sent by Circuit will have the following structure:
..."data based on the event type"
|The event type being sent. This has the format |
|The Circuit API version for this event. This specifies how the data format will be.|
|The epoch, in milliseconds, of when the event occurred.|
|The event data. This will vary depending on the event body.|
The EventType, which defines what kind of data each event will have as well as what resource type the event happened upon.
stop.allocated: When a stop is allocated to a driver. This is triggered when a dispatcher sends the routes to the drivers.
stop.out_for_delivery: When a package for a stop starts making its way to the recipient. This is triggered when the driver start their route.
stop.attempted_delivery: When the delivery state of the package for a stop is changed. This is triggered when the driver attempts a delivery, if successful or not.
test.send_event: Event sent when the user triggers a webhook test.
stop.out_for_delivery types there will be one
independent event sent per each stop.
Circuit will not send more than one event per request, so only the data
related to the
type field will ever be present in a request.