For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DocumentationAPI Reference
DocumentationAPI Reference
  • API Reference
      • GETGet Order
      • GETGet Shipment Logs
      • POSTMark Tracking Uploaded
      • GETGet All Shipments for Order
      • GETGet Order Store Data
      • POSTEstimate Fulfillment Cost For Order
      • GETGet Orders
      • POSTCreate Order
      • POSTCancel Shipment
      • POSTCancel Shipment by Order ID and Shipment ID
      • GETGet Shipping Methods
      • POSTCancel Order
      • GETGet Shipment Logs by Order ID and Shipment ID
      • GETGet Shipment Status Timeline by Order ID and Shipment ID
      • GETGet Shipment Timeline
      • GETGet Shipment
      • POSTBatch Cancel Shipments
      • GETGet Shipment by Order ID and Shipment ID
      • PUTBulk Update Shipping Service
      • POSTUpdate Shipment Line Items
      • PUTUpdate Shipment Address
      • GETGet Shipment Line Items
      • GETGet Completely Cancelled Orders
      • POSTEstimate Delivery Date
LogoLogo
API ReferenceOrders

Update Shipment Line Items

||View as Markdown|
POST
https://sandbox-api.shipbob.com/2026-01/shipment/:shipmentId:updateLineItems
POST
/2026-01/shipment/:shipmentId:updateLineItems
$curl -X POST https://sandbox-api.shipbob.com/2026-01/shipment/1:updateLineItems \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "items": [
> {
> "inventory_id": 789012,
> "quantity": 5,
> "is_manually_assigned_lot": true,
> "lot_date": "2024-06-01",
> "lot_number": "LOT-2024-001"
> },
> {
> "inventory_id": 789012,
> "quantity": 3,
> "is_manually_assigned_lot": true,
> "lot_date": "2024-09-15",
> "lot_number": "LOT-2024-002"
> },
> {
> "inventory_id": 345678,
> "quantity": 1,
> "is_manually_assigned_lot": true,
> "lot_date": "2024-11-01",
> "lot_number": "LOT-2024-003"
> }
> ]
>}'
1{
2 "error": {},
3 "id": 476997333,
4 "is_success": true,
5 "shipment_line_items": [
6 {
7 "action": "ItemQtyUpdated",
8 "inventory_id": 789012,
9 "new_value": "10",
10 "previous_value": "5"
11 },
12 {
13 "action": "ItemRemoved",
14 "inventory_id": 789012,
15 "new_value": "0",
16 "previous_value": "3"
17 },
18 {
19 "action": "ItemAdded",
20 "inventory_id": 789012,
21 "new_value": "3",
22 "previous_value": "0"
23 }
24 ]
25}
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.
Was this page helpful?
Previous

Bulk Update Shipping Service

Next

Update Shipment Address

Built with

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

itemslist of objectsRequired

Complete list of line items for the shipment. 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
List of line item changes applied to the shipment

Errors

400
Bad Request Error