> 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 full documentation content, see https://developer-stage.shipbob.dev/llms-full.txt.

# Query Inventory History Events

POST https://sandbox-api.shipbob.com/2026-01/inventory/history:query
Content-Type: application/json

Fetches inventory movement events that change on-hand quantities within the ShipBob network. Returns events such as receiving/stow, order picks, adjustments, restocks, and attribute updates. Filter by inventory IDs, event category, date range, and facility. Supports cursor-based pagination for large result sets.

Reference: https://developer-stage.shipbob.dev/api/inventory-history/query-inventory-history-events

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: api-2026-01
  version: 1.0.0
paths:
  /2026-01/inventory/history:query:
    post:
      operationId: query-inventory-history-events
      summary: Query Inventory History Events
      description: >-
        Fetches inventory movement events that change on-hand quantities within
        the ShipBob network. Returns events such as receiving/stow, order picks,
        adjustments, restocks, and attribute updates. Filter by inventory IDs,
        event category, date range, and facility. Supports cursor-based
        pagination for large result sets.
      tags:
        - subpackage_inventoryHistory
      parameters:
        - name: cursor
          in: query
          description: ''
          required: false
          schema:
            $ref: >-
              #/components/schemas/FulfillmentCenterInventoryService.Post.Inventory.History.Query.Cursor.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/FulfillmentCenterInventoryService.InventoryHistoryResponse
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/FulfillmentCenterInventoryService.MerchantHistoryRequest
servers:
  - url: https://sandbox-api.shipbob.com
components:
  schemas:
    FulfillmentCenterInventoryService.Post.Inventory.History.Query.Cursor.Integer:
      type: integer
      title: >-
        FulfillmentCenterInventoryService.Post.Inventory.History.Query.Cursor.Integer
    FulfillmentCenterInventoryService.MerchantHistoryRequest:
      type: object
      properties:
        cursor:
          type: integer
          description: >-
            Optional. Pagination cursor using the `inventory_audit_event_id`
            from the previous response. Returns events after this ID.
        end_date:
          type: string
          format: date-time
          description: >-
            Optional. End date for filtering events. If omitted, defaults to
            current date.
        event_category:
          type: string
          description: >-
            Optional. Filter by event type: `OrderPicked`, `InventoryAdjusted`,
            `InventoryFacilityUpdated`, `AttributeUpdated`, `InventoryReceived`,
            `InventoryRestocked`, `ReceivingStow`, or `KittingStow`.
        facility_id:
          type: integer
          description: >-
            Required. The ShipBob fulfillment center ID where the inventory
            events occurred.
        inventory_ids:
          type: array
          items:
            type: integer
          description: >-
            Optional. Filter by specific inventory IDs. Returns events for these
            inventories only.
        merchant_user_id:
          type: integer
          description: >-
            Optional. Filter by merchant user ID. Returns events associated with
            this user.
        start_date:
          type: string
          format: date-time
          description: >-
            Optional. Start date for filtering events. If omitted, defaults to
            90 days ago. Maximum range is 90 days.
      title: FulfillmentCenterInventoryService.MerchantHistoryRequest
    FulfillmentCenterInventoryService.InventoryHistoryAdditionalReference:
      type: object
      properties:
        key:
          type: string
          description: >-
            The reference key (e.g., WRO ID, order ID, or other contextual
            identifier).
        value:
          type: string
          description: The reference value corresponding to the key.
      title: FulfillmentCenterInventoryService.InventoryHistoryAdditionalReference
    FulfillmentCenterInventoryService.YukiOperationalStageEnumTypeResponse:
      type: object
      properties:
        description:
          type: string
          description: >-
            Human-readable description of the operational stage (e.g.,
            'Available', 'Reserved', 'In Transit').
        id:
          type: integer
          description: Numeric identifier for the operational stage.
      title: FulfillmentCenterInventoryService.YukiOperationalStageEnumTypeResponse
    FulfillmentCenterInventoryService.Ulid:
      type: object
      properties:
        random:
          type: string
          format: byte
          description: >-
            Random component of the ULID (Universally Unique Lexicographically
            Sortable Identifier).
        time:
          type: string
          format: date-time
          description: >-
            Timestamp component of the ULID, representing when the identifier
            was created.
      title: FulfillmentCenterInventoryService.Ulid
    FulfillmentCenterInventoryService.InventoryHistoryDetails:
      type: object
      properties:
        committed_quantity_change:
          type: integer
          description: The change in committed (allocated) quantity.
        expiration_date:
          type: string
          format: date-time
          description: The expiration date for this inventory lot, if applicable.
        facility_id:
          type: integer
          description: The fulfillment center ID where this quantity change occurred.
        inventory_status:
          type: string
          description: The current status of the inventory.
        location_id:
          type: integer
          description: The physical shelf/bin location ID within the fulfillment center.
        lot_number:
          type: string
          description: The lot number associated with this inventory, if applicable.
        operational_stage:
          $ref: >-
            #/components/schemas/FulfillmentCenterInventoryService.YukiOperationalStageEnumTypeResponse
          description: >-
            The operational stage of the inventory (e.g., available, reserved,
            in-transit).
        pack_description_id:
          $ref: '#/components/schemas/FulfillmentCenterInventoryService.Ulid'
          description: Identifier for the packaging configuration of this inventory.
        quantity_change:
          type: integer
          description: >-
            The change in on-hand quantity. Positive for increments, negative
            for decrements.
        sku:
          type: string
          description: The merchant SKU for this inventory item.
        yuki_id:
          $ref: '#/components/schemas/FulfillmentCenterInventoryService.Ulid'
          description: >-
            Unique identifier for the physical inventory unit (Yuki) in
            ShipBob's system.
      title: FulfillmentCenterInventoryService.InventoryHistoryDetails
    FulfillmentCenterInventoryService.InventoryHistory:
      type: object
      properties:
        additional_reference:
          type: array
          items:
            $ref: >-
              #/components/schemas/FulfillmentCenterInventoryService.InventoryHistoryAdditionalReference
          description: Additional key-value reference data related to this event.
        decrement:
          $ref: >-
            #/components/schemas/FulfillmentCenterInventoryService.InventoryHistoryDetails
          description: Details of the source location where inventory quantity decreased.
        event_category:
          type: string
          description: >-
            The type of inventory event. Supported values: `OrderPicked`,
            `InventoryAdjusted`, `InventoryFacilityUpdated`, `AttributeUpdated`,
            `InventoryReceived`, `InventoryRestocked`, `ReceivingStow`,
            `KittingStow`.
        event_datetime:
          type: string
          format: date-time
          description: The timestamp when this inventory event occurred.
        increment:
          $ref: >-
            #/components/schemas/FulfillmentCenterInventoryService.InventoryHistoryDetails
          description: >-
            Details of the destination location where inventory quantity
            increased.
        inventory_audit_event_id:
          type: integer
          description: >-
            Unique identifier for this event. Use as cursor value for pagination
            to fetch subsequent records.
        inventory_id:
          type: integer
          description: The ShipBob inventory ID for this item.
        merchant_user_id:
          type: integer
          description: The merchant user ID associated with this inventory.
        shipbob_order_id:
          type: integer
          description: >-
            The ShipBob order ID associated with this event, if applicable
            (e.g., for `OrderPicked` events).
      title: FulfillmentCenterInventoryService.InventoryHistory
    FulfillmentCenterInventoryService.InventoryHistoryResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: >-
              #/components/schemas/FulfillmentCenterInventoryService.InventoryHistory
          description: Array of inventory history events matching the query criteria.
        first:
          type: string
          description: URL to retrieve the first page of results.
        last:
          type: string
          description: URL to retrieve the last page of results.
        next:
          type: string
          description: >-
            URL to retrieve the next page of results. Null if no more results
            available.
        prev:
          type: string
          description: >-
            URL to retrieve the previous page of results. Null if on the first
            page.
      title: FulfillmentCenterInventoryService.InventoryHistoryResponse
  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 default
import requests

url = "https://sandbox-api.shipbob.com/2026-01/inventory/history:query"

payload = {
    "cursor": 0,
    "end_date": "2019-08-24T14:15:22+00:00",
    "event_category": "string",
    "facility_id": 0,
    "inventory_ids": [0],
    "merchant_user_id": 0,
    "start_date": "2019-08-24T14:15:22+00:00"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript default
const url = 'https://sandbox-api.shipbob.com/2026-01/inventory/history:query';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"cursor":0,"end_date":"2019-08-24T14:15:22+00:00","event_category":"string","facility_id":0,"inventory_ids":[0],"merchant_user_id":0,"start_date":"2019-08-24T14:15:22+00:00"}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox-api.shipbob.com/2026-01/inventory/history:query"

	payload := strings.NewReader("{\n  \"cursor\": 0,\n  \"end_date\": \"2019-08-24T14:15:22+00:00\",\n  \"event_category\": \"string\",\n  \"facility_id\": 0,\n  \"inventory_ids\": [\n    0\n  ],\n  \"merchant_user_id\": 0,\n  \"start_date\": \"2019-08-24T14:15:22+00:00\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	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/inventory/history:query")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"cursor\": 0,\n  \"end_date\": \"2019-08-24T14:15:22+00:00\",\n  \"event_category\": \"string\",\n  \"facility_id\": 0,\n  \"inventory_ids\": [\n    0\n  ],\n  \"merchant_user_id\": 0,\n  \"start_date\": \"2019-08-24T14:15:22+00:00\"\n}"

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.post("https://sandbox-api.shipbob.com/2026-01/inventory/history:query")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"cursor\": 0,\n  \"end_date\": \"2019-08-24T14:15:22+00:00\",\n  \"event_category\": \"string\",\n  \"facility_id\": 0,\n  \"inventory_ids\": [\n    0\n  ],\n  \"merchant_user_id\": 0,\n  \"start_date\": \"2019-08-24T14:15:22+00:00\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://sandbox-api.shipbob.com/2026-01/inventory/history:query', [
  'body' => '{
  "cursor": 0,
  "end_date": "2019-08-24T14:15:22+00:00",
  "event_category": "string",
  "facility_id": 0,
  "inventory_ids": [
    0
  ],
  "merchant_user_id": 0,
  "start_date": "2019-08-24T14:15:22+00:00"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp default
using RestSharp;

var client = new RestClient("https://sandbox-api.shipbob.com/2026-01/inventory/history:query");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"cursor\": 0,\n  \"end_date\": \"2019-08-24T14:15:22+00:00\",\n  \"event_category\": \"string\",\n  \"facility_id\": 0,\n  \"inventory_ids\": [\n    0\n  ],\n  \"merchant_user_id\": 0,\n  \"start_date\": \"2019-08-24T14:15:22+00:00\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift default
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "cursor": 0,
  "end_date": "2019-08-24T14:15:22+00:00",
  "event_category": "string",
  "facility_id": 0,
  "inventory_ids": [0],
  "merchant_user_id": 0,
  "start_date": "2019-08-24T14:15:22+00:00"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-api.shipbob.com/2026-01/inventory/history:query")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```