Update Shipment Line Items

View as Markdown
Updates the line items for a specific shipment. The request body must include the complete list of line items as returned by the GET /shipment/{shipmentId}:getLineItems endpoint — partial updates are not supported. Retrieve the current line items first, modify the desired fields, and submit the full payload. **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. Must include all line items — partial updates are not supported

Response

OK
errorobject
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