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

# Query Inventory History Events

POST https://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.shipbob.com/2026-01/api/inventory/query-inventory-history-events

## Authentication

- `Authorization` header (bearer token, required) — Authentication using Personal Access Token (PAT) token
- `Authorization` header (bearer token, required) — OAuth2 authentication using JWT tokens

## Servers

- `https://api.shipbob.com` (https://api.shipbob.com, default)
- `https://sandbox-api.shipbob.com` (https://sandbox-api.shipbob.com)

## Request

### Query parameters

- `cursor` (integer, optional)

### Body (application/json)

This endpoint expects an object.

- `cursor` (integer, optional, nullable) — Optional. Pagination cursor using the `inventory_audit_event_id` from the previous response. Returns events after this ID.
- `end_date` (datetime, optional, nullable) — Optional. End date for filtering events. If omitted, defaults to current date.
- `event_category` (string, optional, nullable) — Optional. Filter by event type: `OrderPicked`, `InventoryAdjusted`, `InventoryFacilityUpdated`, `AttributeUpdated`, `InventoryReceived`, `InventoryRestocked`, `ReceivingStow`, or `KittingStow`.
- `facility_id` (integer, optional) — Required. The ShipBob fulfillment center ID where the inventory events occurred.
- `inventory_ids` (list of integer, optional, nullable) — Optional. Filter by specific inventory IDs. Returns events for these inventories only.
- `merchant_user_id` (integer, optional, nullable) — Optional. Filter by merchant user ID. Returns events associated with this user.
- `start_date` (datetime, optional, nullable) — Optional. Start date for filtering events. If omitted, defaults to 90 days ago. Maximum range is 90 days.

## Response

### 200

OK

- `data` (list of object, optional, nullable) — Array of inventory history events matching the query criteria.
  - `additional_reference` (list of object, optional, nullable) — Additional key-value reference data related to this event.
    - `key` (string, optional, nullable) — The reference key (e.g., WRO ID, order ID, or other contextual identifier).
    - `value` (string, optional, nullable) — The reference value corresponding to the key.
  - `decrement` (object, optional) — Details of the source location where inventory quantity decreased.
    - `committed_quantity_change` (integer, optional) — The change in committed (allocated) quantity.
    - `expiration_date` (datetime, optional, nullable) — The expiration date for this inventory lot, if applicable.
    - `facility_id` (integer, optional) — The fulfillment center ID where this quantity change occurred.
    - `inventory_status` (string, optional, nullable) — The current status of the inventory.
    - `location_id` (integer, optional) — The physical shelf/bin location ID within the fulfillment center.
    - `lot_number` (string, optional, nullable) — The lot number associated with this inventory, if applicable.
    - `operational_stage` (object, optional) — The operational stage of the inventory (e.g., available, reserved, in-transit).
      - `description` (string, optional, nullable) — Human-readable description of the operational stage (e.g., 'Available', 'Reserved', 'In Transit').
      - `id` (integer, optional) — Numeric identifier for the operational stage.
    - `pack_description_id` (object, optional) — Identifier for the packaging configuration of this inventory.
      - `random` (string, optional, nullable) — Random component of the ULID (Universally Unique Lexicographically Sortable Identifier).
      - `time` (datetime, optional) — Timestamp component of the ULID, representing when the identifier was created.
    - `quantity_change` (integer, optional) — The change in on-hand quantity. Positive for increments, negative for decrements.
    - `sku` (string, optional, nullable) — The merchant SKU for this inventory item.
    - `yuki_id` (object, optional) — Unique identifier for the physical inventory unit (Yuki) in ShipBob's system.
      - `random` (string, optional, nullable) — Random component of the ULID (Universally Unique Lexicographically Sortable Identifier).
      - `time` (datetime, optional) — Timestamp component of the ULID, representing when the identifier was created.
  - `event_category` (string, optional, nullable) — The type of inventory event. Supported values: `OrderPicked`, `InventoryAdjusted`, `InventoryFacilityUpdated`, `AttributeUpdated`, `InventoryReceived`, `InventoryRestocked`, `ReceivingStow`, `KittingStow`.
  - `event_datetime` (datetime, optional) — The timestamp when this inventory event occurred.
  - `increment` (object, optional) — Details of the destination location where inventory quantity increased.
    - `committed_quantity_change` (integer, optional) — The change in committed (allocated) quantity.
    - `expiration_date` (datetime, optional, nullable) — The expiration date for this inventory lot, if applicable.
    - `facility_id` (integer, optional) — The fulfillment center ID where this quantity change occurred.
    - `inventory_status` (string, optional, nullable) — The current status of the inventory.
    - `location_id` (integer, optional) — The physical shelf/bin location ID within the fulfillment center.
    - `lot_number` (string, optional, nullable) — The lot number associated with this inventory, if applicable.
    - `operational_stage` (object, optional) — The operational stage of the inventory (e.g., available, reserved, in-transit).
      - `description` (string, optional, nullable) — Human-readable description of the operational stage (e.g., 'Available', 'Reserved', 'In Transit').
      - `id` (integer, optional) — Numeric identifier for the operational stage.
    - `pack_description_id` (object, optional) — Identifier for the packaging configuration of this inventory.
      - `random` (string, optional, nullable) — Random component of the ULID (Universally Unique Lexicographically Sortable Identifier).
      - `time` (datetime, optional) — Timestamp component of the ULID, representing when the identifier was created.
    - `quantity_change` (integer, optional) — The change in on-hand quantity. Positive for increments, negative for decrements.
    - `sku` (string, optional, nullable) — The merchant SKU for this inventory item.
    - `yuki_id` (object, optional) — Unique identifier for the physical inventory unit (Yuki) in ShipBob's system.
      - `random` (string, optional, nullable) — Random component of the ULID (Universally Unique Lexicographically Sortable Identifier).
      - `time` (datetime, optional) — Timestamp component of the ULID, representing when the identifier was created.
  - `inventory_audit_event_id` (integer, optional) — Unique identifier for this event. Use as cursor value for pagination to fetch subsequent records.
  - `inventory_id` (integer, optional) — The ShipBob inventory ID for this item.
  - `merchant_user_id` (integer, optional, nullable) — The merchant user ID associated with this inventory.
  - `primary_reference` (object, optional, nullable) — The primary reference type and value associated with this inventory event.
    - `type` (string, optional, nullable) — The primary reference type (e.g., createInvReasonCode, WroAndBox).
    - `value` (string, optional, nullable) — The primary reference value corresponding to the type.
  - `shipbob_order_id` (integer, optional, nullable) — The ShipBob order ID associated with this event, if applicable (e.g., for `OrderPicked` events).
- `first` (string, optional, nullable) — URL to retrieve the first page of results.
- `last` (string, optional, nullable) — URL to retrieve the last page of results.
- `next` (string, optional, nullable) — URL to retrieve the next page of results. Null if no more results available.
- `prev` (string, optional, nullable) — URL to retrieve the previous page of results. Null if on the first page.

## Examples

**Request**

```json
{
  "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"
}
```

**Response**

```json
{
  "data": [
    {
      "additional_reference": [
        {
          "key": "string",
          "value": "string"
        }
      ],
      "decrement": {
        "committed_quantity_change": 0,
        "expiration_date": "2019-08-24T14:15:22+00:00",
        "facility_id": 0,
        "inventory_status": "string",
        "location_id": 0,
        "lot_number": "string",
        "operational_stage": {
          "description": "string",
          "id": 0
        },
        "pack_description_id": {
          "random": "string",
          "time": "2019-08-24T14:15:22+00:00"
        },
        "quantity_change": 0,
        "sku": "string",
        "yuki_id": {
          "random": "string",
          "time": "2019-08-24T14:15:22+00:00"
        }
      },
      "event_category": "string",
      "event_datetime": "2019-08-24T14:15:22+00:00",
      "increment": {
        "committed_quantity_change": 0,
        "expiration_date": "2019-08-24T14:15:22+00:00",
        "facility_id": 0,
        "inventory_status": "string",
        "location_id": 0,
        "lot_number": "string",
        "operational_stage": {
          "description": "string",
          "id": 0
        },
        "pack_description_id": {
          "random": "string",
          "time": "2019-08-24T14:15:22+00:00"
        },
        "quantity_change": 0,
        "sku": "string",
        "yuki_id": {
          "random": "string",
          "time": "2019-08-24T14:15:22+00:00"
        }
      },
      "inventory_audit_event_id": 0,
      "inventory_id": 0,
      "merchant_user_id": 0,
      "primary_reference": {
        "type": "string",
        "value": "string"
      },
      "shipbob_order_id": 0
    }
  ],
  "first": "string",
  "last": "string",
  "next": "string",
  "prev": "string"
}
```

**SDK Code**

```python default
import requests

url = "https://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://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://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://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://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://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://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://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()
```