Update Shipment Line Items by SKU

View as Markdown
Updates the line items for a specific shipment, identifying each item by SKU instead of inventory id. The SKU matches both the ShipBob variant SKU and the channel seller SKU. The request body must include the complete list of line items — partial updates are not supported. Retrieve the current line items first (via GET /shipment/{shipmentId}:getLineItems, which returns each item's `product_variant.sku`), modify the desired fields, and submit the full payload. **SKU resolution:** Resolution is all-or-nothing — if any SKU in the request cannot be resolved, the whole request fails and no update occurs. A SKU that resolves to a bundle or to multiple inventory items is rejected with a per-item error; use the inventory_id-based endpoint (:updateLineItems) for those items. **Important:** The `is_manually_assigned_lot` field must be set to the same value for all line items in the request. When set to `true` on any item, ShipBob treats all lot assignments in the shipment as manually reviewed — ShipBob will not auto-assign or re-optimize lots for any item. When set to `false`, ShipBob manages lot selection automatically. Mixing `true` and `false` across items in the same request will result in a validation error. **Note on error handling:** This endpoint returns HTTP 200 for both successful and failed operations. Always check the `is_success` field in the response body to determine the outcome. When `is_success` is `false`, the `error` object contains the error code and message. HTTP 400 is only returned when the request body itself is missing or empty.

Authentication

AuthorizationBearer

Authentication using Personal Access Token (PAT) token

OR
AuthorizationBearer
OAuth2 authentication using JWT tokens

Path parameters

shipmentIdintegerRequired
Unique identifier of the shipment

Request

This endpoint expects an object.
itemslist of objectsRequired

Complete list of line items for the shipment, identified by SKU. Must include all line items — partial updates are not supported

Response

OK
errorobject or null
Error details if the update was not successful
idlong
Unique identifier of the shipment
is_successboolean
Indicates whether the update was successful
shipment_line_itemslist of objects or null
List of line item changes applied to the shipment

Errors

400
Bad Request Error