Bad request - invalid action or blocked action type
401
Unauthorized
403
The caller may not perform this action. Nothing was changed.
The role of the API key does not allow this action. The key needs a role with the matching permission, for example full access.
An edit of a routed shipment whose productAlignment recalculates the price of the shipment's order (productAlignment.order.strategyrecalculate) or of its tour (productAlignment.tour.strategyrecalculate) needs the permission to update that order or tour. Without it the whole edit is refused before anything is priced.
Status lock: when the role of the API key refuses that update only because of the order's or the tour's current status, for example a role that may not update completed orders, payload.internalCode is ORDER_STATUS_LOCKED (the order) or TOUR_STATUS_LOCKED (the tour), and payload.message names the lock. Send the edit with preserve on that side to keep its price, or use a key whose role may update the order or tour in that status.
Branch on payload.internalCode: a 403 without it is not a status lock.
404
Shipment not found
409
Conflict - action not applicable in current state (e.g. restricted action type, validation conflict).