Webhooks overview
Webhooks push events from the Tranztec Platform to a URL you control, so you do not have to poll. You register them per partner, either on one object (a specific load, tractor or driver) or on an object type (every load the partnership shares, now and in future).
Event types
type | Fires when | Object types |
|---|---|---|
update | The object's fields change | any |
archive | The object is archived (an order is cancelled or completed and filed) | any |
gps | A new position is recorded | driver, truck, trailer, order, segment |
hos | A driver's duty status changes | driver |
arrive | A stop is arrived | order, segment |
depart | A stop is departed | order, segment |
truckperformance | A performance summary arrives from the ELD | truck |
Object types: order (customer orders), segment (carrier loads), driver, truck, trailer, carrier. See Resources and identifiers for the order-versus-load distinction.
Register on one object
Code
Code
cardid is the object's identifier (a loadid, tractorguid, driverid). Registering the same object, type and URL twice answers 422 Webhook already exists.
Register on an object type
Code
Answers 204. The subscription is attached to every board the partnership shares for that type and is copied onto objects created later, so new trucks report positions without a new registration. Registering the same subscription again is ignored.
Remove subscriptions
Code
Both answer 204.
Object-level removal accepts only update, archive, gps and hos; an object-level arrive, depart or truckperformance registration answers 422 Invalid type on removal. Register those three at the type level if you expect to turn them off.
Choosing between object and type
| Use object-level when | Use type-level when |
|---|---|
| You care about specific loads for their lifetime (a shipper following its own orders) | You want everything the partnership shares (a visibility provider, a fleet dashboard) |
| You want to stop receiving events when the load is done | You want new objects covered automatically |
Next: Event payloads and Delivery, retries and security.