For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://developer-dev.shipbob.dev/api/orders/llms.txt. For full documentation content, see https://developer-dev.shipbob.dev/api/orders/llms-full.txt.

# Get Shipment Line Items


GET https://gateway-dev.shipbob.dev/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-dev.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:
            type: 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://gateway-dev.shipbob.dev
components:
  schemas:
    Orders.LotSelectionMethod:
      type: string
      enum:
        - ShipbobChooses
        - Specific
      title: Orders.LotSelectionMethod
    Orders.LotInfo:
      type: object
      properties:
        lot_date:
          type:
            - string
            - 'null'
          format: date-time
          description: Expiration or manufacturing date of the lot
        lot_number:
          type:
            - string
            - 'null'
          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
            - 'null'
          description: Display name of the product variant
        sku:
          type:
            - string
            - 'null'
          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
            - 'null'
          description: >-
            Indicates whether the inventory item is classified as hazardous
            material
        is_lot:
          type:
            - boolean
            - 'null'
          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
            - 'null'
          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
            - 'null'
          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

```

## SDK Code Examples

```python Orders_getShipmentLineItems_example
import requests

url = "https://gateway-dev.shipbob.dev/2026-01/shipment/1:getLineItems"

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

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

print(response.json())
```

```javascript Orders_getShipmentLineItems_example
const url = 'https://gateway-dev.shipbob.dev/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 Orders_getShipmentLineItems_example
package main

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

func main() {

	url := "https://gateway-dev.shipbob.dev/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 Orders_getShipmentLineItems_example
require 'uri'
require 'net/http'

url = URI("https://gateway-dev.shipbob.dev/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 Orders_getShipmentLineItems_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

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

$client = new \GuzzleHttp\Client();

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

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

```csharp Orders_getShipmentLineItems_example
using RestSharp;

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

```swift Orders_getShipmentLineItems_example
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://gateway-dev.shipbob.dev/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()
```