sondahub

sondahub / Store API / Warehouses

Fake warehouses API

3 warehouses from the Store API, a fake e-commerce API. Where stock sits.

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/warehouses
One record
https://api.sondahub.com/v1/store/warehouses/{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/warehouses.json
MCP
https://api.sondahub.com/mcp · list_records
The first three warehouses
curl "https://api.sondahub.com/v1/store/warehouses?limit=3"

Sample records

Records 1 to 3 of 3, exactly as GET /v1/store/warehouses/{id} answers them. The data file holds all of them.

[
  {
    "id": 1,
    "created_at": "2025-04-19T12:00:00Z",
    "updated_at": "2025-04-19T12:00:00Z",
    "code": "MIA",
    "name": "Miami Fulfillment Center",
    "address": {
      "line1": "5523 Meadow Ct",
      "city": "Miami",
      "region": "FL",
      "postal_code": "34680",
      "country": "US",
      "line2": "Suite 577"
    },
    "timezone": "America/New_York"
  },
  {
    "id": 2,
    "created_at": "2025-04-19T12:00:00Z",
    "updated_at": "2025-04-19T12:00:00Z",
    "code": "AMS",
    "name": "Amsterdam Fulfillment Center",
    "address": {
      "line1": "8532 River Ave",
      "city": "Amsterdam",
      "region": "North Holland",
      "postal_code": "GB03TR",
      "country": "NL"
    },
    "timezone": "Europe/Amsterdam"
  },
  {
    "id": 3,
    "created_at": "2025-04-19T12:00:00Z",
    "updated_at": "2025-04-19T12:00:00Z",
    "code": "SIN",
    "name": "Singapore Fulfillment Center",
    "address": {
      "line1": "3785 Mill Ln",
      "city": "Singapore",
      "region": "Singapore",
      "postal_code": "PRW97W",
      "country": "SG",
      "line2": "Apt 3"
    },
    "timezone": "Asia/Singapore"
  }
]

Fields

FieldTypeNotes
idread-onlyintAssigned by the server. Seed records keep their ids across restarts; records you create continue after the seed.
created_atread-onlydatetimeWhen the record was created (ISO 8601, UTC).
updated_atread-onlydatetimeWhen the record last changed.
coderequiredstring
namerequiredstring
addressjson { line1, city, region, postal_code, country }
timezonestring

Relations: inventory → the inventory whose warehouse_id is this warehouse. Use ?expand=inventory to embed them, or the nested routes.

Endpoints

GET/v1/store/warehousesA page, with every filter, sort, search, field and expand option.
POST/v1/store/warehousesCreate one: 201 with the record, its id, a Location header and the session token that keeps it; 422 names each field that is wrong.
GET/v1/store/warehouses/{id}One record, with an ETag; If-None-Match earns a 304.
PATCH/v1/store/warehouses/{id}Change the fields you send.
PUT/v1/store/warehouses/{id}Replace the record; required fields must all be there.
DELETE/v1/store/warehouses/{id}Answers 200 with what was removed (a real server’s 204 lives at /v1/utils/status/204); gone for the session.
GET/v1/store/warehouses/{id}/inventoryIts inventory, as a page with all the list options.

Try it

List with a filter
curl "https://api.sondahub.com/v1/store/warehouses?limit=3"
One record
curl https://api.sondahub.com/v1/store/warehouses/1
Its inventory
curl "https://api.sondahub.com/v1/store/warehouses/1/inventory?limit=5"
Create
curl -i -X POST https://api.sondahub.com/v1/store/warehouses \
  -H "Content-Type: application/json" \
  -d '{"code":"MIA","name":"A name"}'
Read it back: newest first (send the session token)
curl "https://api.sondahub.com/v1/store/warehouses?sort=-id&limit=3" \
  -H "X-Sondahub-Session: THE_TOKEN_FROM_THE_CREATE"
Change one field
curl -X PATCH https://api.sondahub.com/v1/store/warehouses/1 \
  -H "Content-Type: application/json" \
  -d '{"code":"Changed code"}'
Delete the one you created
curl -X DELETE https://api.sondahub.com/v1/store/warehouses/4 \
  -H "X-Sondahub-Session: THE_TOKEN_FROM_THE_CREATE"

Query recipes

Every list option works on warehouses; these are ready to paste. All the options.

WhatRequest
Page 2, 50 at a time (of 3)/v1/store/warehouses?page=2&limit=50
Newest first by created at/v1/store/warehouses?sort=-created_at&limit=5
Code contains “mia”/v1/store/warehouses?code_like=mia
Full-text search/v1/store/warehouses?q=mia
Only some fields/v1/store/warehouses?fields=id,code&limit=5
Its inventory (nested route)/v1/store/warehouses/1/inventory?limit=5
Just the count/v1/store/warehouses?limit=1&fields=id

GraphQL

The same warehouses as the warehouses query on https://api.sondahub.com/v1/store/graphql, and one warehouse as warehouse(id: 1). Introspection is on. More on the GraphQL API.

{
  warehouses(limit: 3, sort: "-id") {
    total
    data {
      id code name timezone
      inventory(limit: 2) { id }
    }
  }
}
Run it
curl https://api.sondahub.com/v1/store/graphql -H "Content-Type: application/json" -d '{"query": "{ warehouses(limit: 3, sort: \"-id\") { total data { id code name timezone inventory(limit: 2) { id } } } }"}'

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/warehouses.

tools/call
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":"warehouses","limit":3}}}'

More in the Store API

categories (8) · products (2,000) · customers (800) · orders (3,000) · order items (6,219) · reviews (2,500) · inventory (6,000) · 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.