> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer-stage.shipbob.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer-stage.shipbob.dev/_mcp/server.

# Get Shipment Line Items


GET https://sandbox-api.shipbob.com/2026-01/shipment/{shipmentId}:getLineItems

Retrieves the current line items for a specific shipment, including product variant details, lot information, committed quantities, and serial numbers. Use this endpoint to get the current state before calling updateLineItems, which requires the full item list.


Reference: https://developer-stage.shipbob.dev/api/orders/get-shipment-line-items

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: api-2026-01
  version: 1.0.0
paths:
  /2026-01/shipment/{shipmentId}:getLineItems:
    get:
      operationId: get-shipment-line-items
      summary: |
        Get Shipment Line Items
      description: >
        Retrieves the current line items for a specific shipment, including
        product variant details, lot information, committed quantities, and
        serial numbers. Use this endpoint to get the current state before
        calling updateLineItems, which requires the full item list.
      tags:
        - subpackage_orders
      parameters:
        - name: shipmentId
          in: path
          description: Unique identifier of the shipment
          required: true
          schema:
            $ref: >-
              #/components/schemas/Orders.Get.Api.V.Version.Shipment.ShipmentId.GetLineItems.ShipmentId.Integer
        - name: Authorization
          in: header
          description: Authentication using Personal Access Token (PAT) token
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Orders.ShipmentLineItemDetailArray'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Orders.ErrorResponse'
servers:
  - url: https://sandbox-api.shipbob.com
    description: https://sandbox-api.shipbob.com
components:
  schemas:
    Orders.Get.Api.V.Version.Shipment.ShipmentId.GetLineItems.ShipmentId.Integer:
      type: integer
      title: >-
        Orders.Get.Api.V.Version.Shipment.ShipmentId.GetLineItems.ShipmentId.Integer
    Orders.LotSelectionMethod:
      type: string
      enum:
        - ShipbobChooses
        - Specific
      title: Orders.LotSelectionMethod
    Orders.LotInfo:
      type: object
      properties:
        lot_date:
          type: string
          format: date-time
          description: Expiration or manufacturing date of the lot
        lot_number:
          type: string
          description: Lot number identifying a specific batch of inventory
        selection_method:
          $ref: '#/components/schemas/Orders.LotSelectionMethod'
          description: Method used to select the lot for fulfillment
      title: Orders.LotInfo
    Orders.ProductVariantDetail:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier of the product variant
        name:
          type: string
          description: Display name of the product variant
        sku:
          type: string
          description: Stock keeping unit identifier for the product variant
      title: Orders.ProductVariantDetail
    Orders.ShipmentLineItemDetail:
      type: object
      properties:
        committed_quantity:
          type: integer
          description: Quantity of the inventory item committed for fulfillment
        inventory_id:
          type: integer
          description: Unique identifier of the inventory item
        is_hazmat:
          type: boolean
          description: >-
            Indicates whether the inventory item is classified as hazardous
            material
        is_lot:
          type: boolean
          description: Indicates whether the inventory item is lot-tracked
        lot:
          $ref: '#/components/schemas/Orders.LotInfo'
          description: Lot information for the inventory item, if lot-tracked
        product_variant:
          $ref: '#/components/schemas/Orders.ProductVariantDetail'
          description: Product variant details associated with this line item
        quantity:
          type: integer
          description: Total quantity of the inventory item in the shipment
        serial_numbers:
          type: array
          items:
            type: string
          description: List of serial numbers assigned to this line item
      title: Orders.ShipmentLineItemDetail
    Orders.ShipmentLineItemDetailArray:
      type: array
      items:
        $ref: '#/components/schemas/Orders.ShipmentLineItemDetail'
      title: Orders.ShipmentLineItemDetailArray
    Orders.ErrorCode:
      type: string
      enum:
        - INVALID_PARAMETER
        - VALIDATION_ERROR
        - DATABASE_UPDATE_ERROR
        - REPROCESSING_ERROR
        - DEALLOCATE_ERROR
        - NOT_FOUND
        - CONFLICT
      title: Orders.ErrorCode
    Orders.ErrorResponse:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/Orders.ErrorCode'
          description: Error code identifying the type of error
        message:
          type: string
          description: Human-readable description of the error
      title: Orders.ErrorResponse
  securitySchemes:
    PAT:
      type: http
      scheme: bearer
      description: Authentication using Personal Access Token (PAT) token
    OAuth2:
      type: http
      scheme: bearer
      description: OAuth2 authentication using JWT tokens

```

## Examples



**Response**

```json
[
  {
    "committed_quantity": 5,
    "inventory_id": 789012,
    "is_hazmat": false,
    "is_lot": true,
    "lot": {
      "lot_date": "2024-06-01T00:00:00+00:00",
      "lot_number": "LOT-2024-001",
      "selection_method": "Specific"
    },
    "product_variant": {
      "id": 456,
      "name": "Vitamin D Supplement",
      "sku": "VIT-D-60CT"
    },
    "quantity": 5
  },
  {
    "committed_quantity": 3,
    "inventory_id": 789012,
    "is_hazmat": false,
    "is_lot": true,
    "lot": {
      "lot_date": "2024-09-15T00:00:00+00:00",
      "lot_number": "LOT-2024-002",
      "selection_method": "Specific"
    },
    "product_variant": {
      "id": 456,
      "name": "Vitamin D Supplement",
      "sku": "VIT-D-60CT"
    },
    "quantity": 3
  },
  {
    "committed_quantity": 2,
    "inventory_id": 345678,
    "is_hazmat": false,
    "is_lot": false,
    "lot": {
      "selection_method": "Specific"
    },
    "product_variant": {
      "id": 789,
      "name": "Bluetooth Speaker",
      "sku": "BT-SPKR-BLK"
    },
    "quantity": 2
  }
]
```

**SDK Code**

```python default
import requests

url = "https://sandbox-api.shipbob.com/2026-01/shipment/1:getLineItems"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript default
const url = 'https://sandbox-api.shipbob.com/2026-01/shipment/1:getLineItems';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go default
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox-api.shipbob.com/2026-01/shipment/1:getLineItems"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby default
require 'uri'
require 'net/http'

url = URI("https://sandbox-api.shipbob.com/2026-01/shipment/1:getLineItems")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java default
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://sandbox-api.shipbob.com/2026-01/shipment/1:getLineItems")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php default
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://sandbox-api.shipbob.com/2026-01/shipment/1:getLineItems', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp default
using RestSharp;

var client = new RestClient("https://sandbox-api.shipbob.com/2026-01/shipment/1:getLineItems");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift default
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-api.shipbob.com/2026-01/shipment/1:getLineItems")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```