sondahub / Store API / Inventory
Fake inventory API
6,000 inventory from the Store API, a fake e-commerce API. Stock of a product at a warehouse.
Reads with filters, sorting, search and relations; writes that answer like a real server and stay in your session token. Same ids on every build. Free, no key, CORS open.
Connect
- List
- https://api.sondahub.com/v1/store/inventory
- One record
- https://api.sondahub.com/v1/store/inventory/{id}
- OpenAPI 3
- https://api.sondahub.com/v1/store/openapi.json
- GraphQL
- https://api.sondahub.com/v1/store/graphql
- JSON file
- https://api.sondahub.com/data/store/inventory.json
- MCP
- https://api.sondahub.com/mcp · list_records
curl "https://api.sondahub.com/v1/store/inventory?limit=3"
Sample records
Records 1 to 3 of 6,000, exactly as GET /v1/store/inventory/{id} answers them. The data file holds all of them.
[
{
"id": 1,
"created_at": "2026-08-07T17:00:38Z",
"updated_at": "2026-08-07T17:00:38Z",
"product_id": 1,
"warehouse_id": 1,
"on_hand": 22,
"reserved": 6,
"reorder_point": 10,
"bin": "A-25-4",
"counted_at": "2026-08-07T17:00:38Z"
},
{
"id": 2,
"created_at": "2026-08-01T09:24:10Z",
"updated_at": "2026-08-01T09:24:10Z",
"product_id": 1,
"warehouse_id": 2,
"on_hand": 205,
"reserved": 6,
"reorder_point": 10,
"bin": "B-24-5",
"counted_at": "2026-08-01T09:24:10Z"
},
{
"id": 3,
"created_at": "2026-07-30T07:39:35Z",
"updated_at": "2026-07-30T07:39:35Z",
"product_id": 1,
"warehouse_id": 3,
"on_hand": 33,
"reserved": 7,
"reorder_point": 5,
"bin": "F-5-1",
"counted_at": "2026-07-30T07:39:35Z"
}
]
Fields
| Field | Type | Notes |
|---|---|---|
idread-only | int | Assigned by the server. Seed records keep their ids across restarts; records you create continue after the seed. |
created_atread-only | datetime | When the record was created (ISO 8601, UTC). |
updated_atread-only | datetime | When the record last changed. |
product_idrequired | int → products | |
warehouse_idrequired | int → warehouses | |
on_handrequired | int | min 0 |
reserved | int | min 0 |
reorder_point | int | min 0 |
bin | string | |
counted_at | datetime |
Relations: product → one product through product_id; warehouse → one warehouse through warehouse_id. Use ?expand=product,warehouse to embed them, or the nested routes.
Endpoints
Try it
curl "https://api.sondahub.com/v1/store/inventory?on_hand_gte=1&expand=product&limit=3"
curl https://api.sondahub.com/v1/store/inventory/1?expand=product
curl -i -X POST https://api.sondahub.com/v1/store/inventory \
-H "Content-Type: application/json" \
-d '{"product_id":1,"warehouse_id":1,"on_hand":1,"bin":"A-14-3"}'
curl "https://api.sondahub.com/v1/store/inventory?sort=-id&limit=3" \ -H "X-Sondahub-Session: THE_TOKEN_FROM_THE_CREATE"
curl -X PATCH https://api.sondahub.com/v1/store/inventory/1 \
-H "Content-Type: application/json" \
-d '{"on_hand":2}'
curl -X DELETE https://api.sondahub.com/v1/store/inventory/6001 \ -H "X-Sondahub-Session: THE_TOKEN_FROM_THE_CREATE"
Query recipes
Every list option works on inventory; these are ready to paste. All the options.
| What | Request |
|---|---|
| Page 2, 50 at a time (of 6,000) | /v1/store/inventory?page=2&limit=50 |
| On hand between two values, largest first | /v1/store/inventory?on_hand_gte=1&on_hand_lte=500&sort=-on_hand |
| Newest first by created at | /v1/store/inventory?sort=-created_at&limit=5 |
| Bin contains “a” | /v1/store/inventory?bin_like=a |
| Full-text search | /v1/store/inventory?q=a |
| Only some fields | /v1/store/inventory?fields=id,bin&limit=5 |
| Embed the product | /v1/store/inventory/1?expand=product |
| Just the count | /v1/store/inventory?limit=1&fields=id |
GraphQL
The same inventory as the inventory query on https://api.sondahub.com/v1/store/graphql, and one inventory level as inventory_level(id: 1). Introspection is on. More on the GraphQL API.
{
inventory(limit: 3, sort: "-id") {
total
data {
id product_id warehouse_id on_hand
product { sku }
}
}
}
curl https://api.sondahub.com/v1/store/graphql -H "Content-Type: application/json" -d '{"query": "{ inventory(limit: 3, sort: \"-id\") { total data { id product_id warehouse_id on_hand product { sku } } } }"}'
From an AI agent (MCP)
The MCP server reaches the same rows with list_records, get_record, create_record, update_record and delete_record, and as the resource sondahub://store/inventory.
curl https://api.sondahub.com/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_records","arguments":{"api":"store","collection":"inventory","limit":3}}}'
More in the Store API
categories (8) · products (2,000) · customers (800) · orders (3,000) · order items (6,219) · reviews (2,500) · warehouses (3) · carts (200)
The live streams, and the whole API on one page: Store API. Other worlds: fake IoT API, fake banking API, fake social media API, fake helpdesk API, fake flight booking API, fake user directory API.