Create and execute a shipment action.
For unrouted shipments: No alignment strategies are required for any field edits.
For routed shipments: Required alignment strategies depend on which fields you are editing:
When editing these fields on routed shipments, you MUST provide:
tourRouteAlignmentStrategy
productAlignment
Fields:
- address (via shipment-stop): street, city, postalCode, country, coordinates, etc.
- Partial updates supported - only changed fields need to be provided
- stopType: 'pickup' or 'dropoff'
- timeFrom (via shipment-stop): Start of time window (epoch seconds)
- timeTo (via shipment-stop): End of time window (epoch seconds)
- date (via shipment-date): Shipment date (epoch seconds, interpreted in Europe/Berlin)
When editing these fields on routed shipments, you MUST provide:
tourRouteAlignmentStrategy
tourVehicleClassAdjustmentStrategy
productAlignment
Fields:
- loads (via shipment-loads): Array of load objects with weight, volume, etc.
When editing these fields on routed shipments, you MUST provide:
tourExtrasAdjustmentStrategy
productAlignment
Fields:
- extras (via shipment-extras): Array of ExtraType values
When editing these fields on routed shipments, you MUST provide:
tourRegionAdjustmentStrategy
productAlignment
Fields:
- region (via shipment-region): Region identifier
When editing ONLY these fields, you MUST NOT provide any alignment strategies.
Providing strategies for these fields will result in a 400 Bad Request error.
Fields (via shipment-stop):
- companyName: Company name at the stop
- contact: Contact information (name, email, phone)
- loadingPoint: Loading point identifier
- note: Stop-specific note
- proofRequirements: Array of proof requirement types
- expectedWaitingTime: Expected waiting time in seconds
Other fields:
- comment (via shipment-comment): Shipment comment
- internalComment (via shipment-internal-comment): Internal comment
- displayName (via shipment-display-name): Display name
- properties (via shipment-properties): Custom properties
- netGoodsValue (via shipment-edit-net-goods-value): Net goods value
- rebuild-minimal-change: Rebuild tour with minimal changes (stop order preserved, stops may be split/merged)
- rebuild-with-layout: Rebuild tour with custom layout (requires
tourLayout field)
- reoptimize: Rebuild tour using VRP optimizer
- preserve: Keep current vehicle class (may become invalid if loads exceed capacity)
- recalculate: Recalculate vehicle class using LoadPlan
- recalculate: Recalculate tour extras from all shipments on the tour
- preserve: Keep existing tour extras unchanged
- set: Update tour region to match shipment region
- preserve: Keep existing tour region unchanged
Required whenever any other alignment strategy is required.
Structure: { order: { strategy, onInfeasible? }, tour: { strategy, onInfeasible? } }
Both order and tour strategies are REQUIRED when productAlignment is provided.
strategy options:
- recalculate: Recalculate pricing based on changes
- preserve: Keep existing pricing unchanged
onInfeasible options (REQUIRED when strategy is 'recalculate', optional for 'preserve'):
- detach: Remove pricing if recalculation fails
- fail: Fail entire operation if recalculation is infeasible (returns 400)
The server validates that:
- Required strategies are provided for the fields being edited
- No strategies are provided for fields that don't require them
- Missing required strategies or providing forbidden strategies will result in a 400 Bad Request error