sondahub

sondahub / Store API / Categories

Fake categories API

8 categories from the Store API, a fake e-commerce API. The eight product categories.

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

Sample records

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

[
  {
    "id": 1,
    "created_at": "2025-07-28T12:00:00Z",
    "updated_at": "2025-07-28T12:00:00Z",
    "name": "Audio",
    "slug": "audio",
    "description": "Audio: headphones, earbuds, speaker and more.",
    "product_count": 244
  },
  {
    "id": 2,
    "created_at": "2025-07-28T12:00:00Z",
    "updated_at": "2025-07-28T12:00:00Z",
    "name": "Computers",
    "slug": "computers",
    "description": "Computers: laptop, desktop, monitor and more.",
    "product_count": 260
  },
  {
    "id": 3,
    "created_at": "2025-07-28T12:00:00Z",
    "updated_at": "2025-07-28T12:00:00Z",
    "name": "Home",
    "slug": "home",
    "description": "Home: kettle, skillet, throw blanket and more.",
    "product_count": 260
  }
]

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.
namerequiredstring
slugrequiredstring
descriptiontext
product_countread-onlyintSeed products in the category.

Relations: products → the products whose category_id is this category. Use ?expand=products to embed them, or the nested routes.

Endpoints

GET/v1/store/categoriesA page, with every filter, sort, search, field and expand option.
POST/v1/store/categoriesCreate 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/categories/{id}One record, with an ETag; If-None-Match earns a 304.
PATCH/v1/store/categories/{id}Change the fields you send.
PUT/v1/store/categories/{id}Replace the record; required fields must all be there.
DELETE/v1/store/categories/{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/categories/{id}/productsIts products, as a page with all the list options.

Try it

List with a filter
curl "https://api.sondahub.com/v1/store/categories?limit=3"
One record
curl https://api.sondahub.com/v1/store/categories/1
Its products
curl "https://api.sondahub.com/v1/store/categories/1/products?limit=5"
Create
curl -i -X POST https://api.sondahub.com/v1/store/categories \
  -H "Content-Type: application/json" \
  -d '{"name":"Audio","slug":"audio"}'
Read it back: newest first (send the session token)
curl "https://api.sondahub.com/v1/store/categories?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/categories/1 \
  -H "Content-Type: application/json" \
  -d '{"name":"Changed name"}'
Delete the one you created
curl -X DELETE https://api.sondahub.com/v1/store/categories/9 \
  -H "X-Sondahub-Session: THE_TOKEN_FROM_THE_CREATE"

Query recipes

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

WhatRequest
Page 2, 50 at a time (of 8)/v1/store/categories?page=2&limit=50
Newest first by created at/v1/store/categories?sort=-created_at&limit=5
Name contains “audio”/v1/store/categories?name_like=audio
Full-text search/v1/store/categories?q=audio
Only some fields/v1/store/categories?fields=id,name&limit=5
Its products (nested route)/v1/store/categories/1/products?limit=5
Just the count/v1/store/categories?limit=1&fields=id

GraphQL

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

{
  categories(limit: 3, sort: "-id") {
    total
    data {
      id name slug description
      products(limit: 2) { id }
    }
  }
}
Run it
curl https://api.sondahub.com/v1/store/graphql -H "Content-Type: application/json" -d '{"query": "{ categories(limit: 3, sort: \"-id\") { total data { id name slug description products(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/categories.

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":"categories","limit":3}}}'

More in the Store API

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