Execute an action on a leg. Three actions are supported, discriminated on type.
The two recovery actions are gated differently — retry on the LEG's state, return on the LOAD's:
retryreopens a load-failure Failed leg for a fresh delivery attempt: every load on the leg re-runs (its load stays with the leg, the failed status clears, and the shipment un-fails so the cargo can be routed onto a new tour). An optional re-attempt delivery window may be supplied. Because the whole leg re-runs,retryis illegal on a Delivered leg with a partial failure (one load failed while a sibling delivered) — recover that load viareturninstead.returnsends one recoverable failed load back to a chosen destination. It spawns a new return shipment that picks the load up at its current custody position and delivers it to the target; the original load is retired and linked to the return shipment so it is never planned again. It is legal wherever a load needs recovery: on a load-failure Failed leg, on a Delivered leg with a partial failure, and on a Cancelled leg holding cargo a completed predecessor stranded at a hub.
The metadata action is legal in any leg state:
set-propertiesmerges tenant-defined custom-property values into the leg's existing properties (anullvalue clears that property; absent keys are left untouched). It has no effect on the leg's lifecycle. Values are validated against the property definitions scoped toleg; unknown ids or type mismatches are rejected with 400.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
400Bad request - the leg is not in a recoverable failed state (recovery actions), the referenced load is not a recoverable failed load, a custom-property value fails validation (set-properties), or the action payload is invalid.
401Unauthorized - invalid or missing API key.
403Forbidden - the API key is not permitted to modify this shipment.
404Leg not found.
409Conflict - the shipment changed concurrently. Reload the latest version and retry.
503A routing dependency is temporarily unavailable while materialising the return shipment's route - retry (return only).
