orderShipmentUpdate
Updates a shipment’s tracking, details, shipped quantities, or manual fees.
Business Rules
- Amounts are in major units of the company currency.
- Omitted fields remain unchanged; zero is a known zero fee.
- Null clears shipping fees to unknown or removes optional other fees.
- The latest supplied amount wins; later imports may replace an entered amount.
- Omitted or unknown integration costs leave the current amount unchanged.
- Fees may be sent alone or with other changes, which are then saved as one update. Known fee amounts must be non-negative.
- trackingDetails replaces the complete tracking list. Omitted or null leaves it unchanged; an empty list clears all tracking. Omitted entry URLs are preserved; null clears them.
- trackingNumber and trackingUrl edit the primary tracking record and preserve other numbers. Do not combine these inputs with a non-null trackingDetails list.
- The current primary is retained if included in a list; otherwise the first entry becomes primary.
- Other detail fields that are sent as null are cleared. shippedDate and shipmentItems cannot be null, and a null packageType keeps the current type.
- shipmentItems replaces the shipment’s lines. Include every line the shipment should keep; a line left out is removed. Lines are matched to fulfillment items the same way as in orderShipmentCreate. The fulfillment’s status and inventory follow the new quantities.
- When allowExceedingFulfillment is false, a change that raises an item’s shipped quantity above its quantity on the fulfillment is refused.
- Weight is stored in pounds and dimensions in inches. A weight or dimension entered in another unit is converted before it is stored, rounded to two decimal places.
- When the shipment was reported by an integration, values that the integration reports again replace edited values.
Error Scenarios
- Shipment not found, outside the company, or canceled.
- No changes supplied, invalid tracking, conflicting inputs, negative fees, or insufficient permissions.
- Shipment items are invalid or duplicated.
- The change would ship more than the fulfillment holds and allowExceedingFulfillment is false. The error code is E_SHIPMENT_EXCEEDS_FULFILLMENT, and the message names each SKU over its fulfillment quantity.
- The weight unit is not a unit of mass, or the dimension unit is not a unit of length.
Permissions Required
orders:update_fulfillment_costsfor fees;orders:update_shipmentfor other changes; both when a request includes fees and other changes.
orderShipmentUpdate(
input: OrderShipmentUpdateInput!
): OrderShipment!
Arguments
orderShipmentUpdate.input ● OrderShipmentUpdateInput! non-null input common
Parameters for OrderShipmentUpdate
Type
OrderShipment object shipments
This type represents an order shipment. An order can have multiple shipments, each one associated with a fulfillment and a carrier that shipped the order