> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trackstarhq.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Trackstar is a unified REST API for WMS, cart, and carrier systems. Base URL: https://production.trackstarhq.com. There is no SDK; call the API with plain HTTP.
> Send x-trackstar-api-key on every request. Endpoints scoped to one connection also need x-trackstar-access-token. Read both from environment variables and never print them.
> Reads return data Trackstar has already synced from the connected system. Writes (POST, PUT, PATCH, DELETE) are forwarded to the connected system immediately.
> A new connection has no data until its initial sync finishes. Wait for the connection.historical-sync-completed webhook, or poll GET /connections/{connection_id} and check historical_sync_completed.
> List endpoints page with page_token and next_token (limit is capped at 1000). Repeat every filter on every page. Filters use field[operator]=value, for example created_date[gte]=2026-01-01T00:00:00Z.
> Write bodies must not contain null or empty strings; omit the field instead. Call GET /integrations/{integration_type}/{integration_name}/write-info first to learn the exact fields an integration accepts.
> To test without real credentials, POST /sandbox/generate-sandbox/{wms|cart|carrier} with the API key returns a sandbox access token. Start at https://docs.trackstarhq.com/how-to-guides/build-with-ai.md and install the skills with: npx skills add https://docs.trackstarhq.com

# Inventory

> Inventory items, the breakdown of onhand, committed, fulfillable, and sellable quantities, and the inventory ledger

Inventory is a representation of a physical good in a warehouse. Each product has one or more inventory items associated with it.

Each `inventory_item_id` returned from the [Product](/api-reference/wms-api/products/info) endpoint maps to the `id` field in the Inventory endpoint.

To most accurately map a `sku` or Product Name to inventory levels, first call the [Product](/api-reference/wms-api/products/info) endpoint to get the `inventory_item_id` list.
Then, call the [`/wms-api/inventory/{inventory_item_id}`](/api-reference/wms-api/inventory/get-item) endpoint to get the inventory levels for each Inventory Item.

### Inventory Breakdowns

| Field | Definition | Formula |
| :- | :- | :- |
| `awaiting` | Inventory that is expected to arrive to a warehouse. | |
| `onhand` | Total quantity in the warehouse. | committed + unfulfillable + fulfillable (this formula does not apply if an item has substitute SKUs) |
| `committed` | Inventory that is already assigned to orders. | |
| `unfulfillable` | Inventory that is damaged, quarantined, etc... | |
| `fulfillable` | Inventory that can be fulfilled and shipped for orders. | |
| `unsellable` | Inventory that is being held from sales channels (e.g. reserved) | `deprecated` |
| `sellable` | Inventory that is available in sales channels. | |

### Inventory Ledger

[Inventory ledger](/api-reference/wms-api/inventory/inventory-ledger) is designed as a time-series event log of inventory transactions that occurred at a specific point in time.
Each event is immutable and timestamped, so you’ll see the complete history of what happened to inventory over time rather than just the current state. Each transaction creates a new ledger entry, preserving the audit trail.

Example transactions that can create a new ledger entry:

* Quantity changes (receipts, shipments, adjustments, cycle counts)
* Inventory movements between locations/bins
* Status changes (available → reserved, etc.)

<Note>Inventory ledger is disabled by default. Reach out to us if you would like to enable ledger data.</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.