sondahub

sondahub / Store API / Orders

Fake orders API

3,000 orders from the Store API, a fake e-commerce API. An order and its money. Line items live in order_items (also at /orders/{id}/items and ?expand=items).

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

Sample records

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

[
  {
    "id": 1,
    "created_at": "2025-11-20T00:24:59Z",
    "updated_at": "2025-11-23T02:06:59Z",
    "number": "SH-100001",
    "customer_id": 662,
    "status": "delivered",
    "subtotal": 1270.25,
    "shipping": 14.99,
    "tax": 88.92,
    "discount": 0,
    "total": 1374.16,
    "currency": "USD",
    "payment_method": "cash_on_delivery",
    "shipping_address": {
      "line1": "2003 Market Ave",
      "city": "Paris",
      "region": "Île-de-France",
      "postal_code": "6SM4RR",
      "country": "FR"
    },
    "shipping_method": "express",
    "tracking_number": "1ZE8DLO57GBU47MW6F",
    "placed_at": "2025-11-20T00:24:59Z",
    "paid_at": "2025-11-20T00:51:59Z",
    "shipped_at": "2025-11-21T19:35:59Z",
    "delivered_at": "2025-11-23T02:06:59Z",
    "notes": null
  },
  {
    "id": 2,
    "created_at": "2026-08-25T02:18:09Z",
    "updated_at": "2026-08-26T07:06:09Z",
    "number": "SH-100002",
    "customer_id": 171,
    "status": "shipped",
    "subtotal": 2366.35,
    "shipping": 5.99,
    "tax": 165.64,
    "discount": 0,
    "total": 2537.98,
    "currency": "USD",
    "payment_method": "card",
    "shipping_address": {
      "line1": "921 Chestnut Pl",
      "city": "Miami",
      "region": "FL",
      "postal_code": "55114",
      "country": "US"
    },
    "shipping_method": "standard",
    "tracking_number": "1Z6XEPKSG1X89FVRPS",
    "placed_at": "2026-08-25T02:18:09Z",
    "paid_at": "2026-08-25T03:10:09Z",
    "shipped_at": "2026-08-26T07:06:09Z",
    "delivered_at": null,
    "notes": null
  },
  {
    "id": 3,
    "created_at": "2026-03-23T09:47:26Z",
    "updated_at": "2026-03-28T07:33:26Z",
    "number": "SH-100003",
    "customer_id": 374,
    "status": "delivered",
    "subtotal": 479.44,
    "shipping": 29.99,
    "tax": 28.86,
    "discount": 67.12,
    "total": 471.17,
    "currency": "USD",
    "payment_method": "card",
    "shipping_address": {
      "line1": "7468 Spring Ave",
      "city": "Madrid",
      "region": "Madrid",
      "postal_code": "3V3VBJ",
      "country": "ES",
      "line2": "Suite 540"
    },
    "shipping_method": "overnight",
    "tracking_number": "1ZV42SVI8V2F3NFJB4",
    "placed_at": "2026-03-23T09:47:26Z",
    "paid_at": "2026-03-23T11:44:26Z",
    "shipped_at": "2026-03-23T16:10:26Z",
    "delivered_at": "2026-03-28T07:33:26Z",
    "notes": "Call on arrival."
  }
]

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.
numberread-onlystringHuman order number.
customer_idrequiredint → customers
statusenumpending paid shipped delivered cancelled refunded
subtotalfloatmin 0
shippingfloatmin 0
taxfloatmin 0
discountfloatmin 0
totalfloatmin 0
currencystring
payment_methodenumcard paypal bank_transfer cash_on_delivery
shipping_addressjson { line1, line2?, city, region, postal_code, country }
shipping_methodenumstandard express overnight pickup
tracking_numberstring
placed_atdatetimeDefaults to now on POST.
paid_atdatetime
shipped_atdatetime
delivered_atdatetime
notestext

Relations: customer → one customer through customer_id; items → the order items whose order_id is this order. Use ?expand=customer,items to embed them, or the nested routes.

Endpoints

POST may carry items: [{ product_id, quantity }]: the hub prices them from the products, computes subtotal, shipping, tax and total, creates the order items and returns them inline. PATCH to shipped stamps shipped_at and a tracking number; delivered stamps delivered_at.
GET/v1/store/ordersA page, with every filter, sort, search, field and expand option.
POST/v1/store/ordersCreate 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/orders/{id}One record, with an ETag; If-None-Match earns a 304.
PATCH/v1/store/orders/{id}Change the fields you send.
PUT/v1/store/orders/{id}Replace the record; required fields must all be there.
DELETE/v1/store/orders/{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/orders/{id}/customerThe customer this record points at.
GET/v1/store/orders/{id}/itemsIts order items, as a page with all the list options.

Try it

List with a filter
curl "https://api.sondahub.com/v1/store/orders?status=paid&subtotal_gte=10&expand=customer&limit=3"
One record
curl https://api.sondahub.com/v1/store/orders/1?expand=customer
Its items
curl "https://api.sondahub.com/v1/store/orders/1/items?limit=5"
Create
curl -i -X POST https://api.sondahub.com/v1/store/orders \
  -H "Content-Type: application/json" \
  -d '{"customer_id":1,"status":"paid","currency":"USD","payment_method":"card","shipping_method":"standard","items":[{"product_id":1,"quantity":2}]}'
Read it back: newest first (send the session token)
curl "https://api.sondahub.com/v1/store/orders?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/orders/1 \
  -H "Content-Type: application/json" \
  -d '{"status":"paid"}'
Delete the one you created
curl -X DELETE https://api.sondahub.com/v1/store/orders/3001 \
  -H "X-Sondahub-Session: THE_TOKEN_FROM_THE_CREATE"

Query recipes

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

WhatRequest
Page 2, 50 at a time (of 3,000)/v1/store/orders?page=2&limit=50
Only status = pending/v1/store/orders?status=pending
Subtotal between two values, largest first/v1/store/orders?subtotal_gte=1&subtotal_lte=500&sort=-subtotal
Newest first by created at/v1/store/orders?sort=-created_at&limit=5
Currency contains “usd”/v1/store/orders?currency_like=usd
Full-text search/v1/store/orders?q=usd
Only some fields/v1/store/orders?fields=id,currency&limit=5
Embed the customer/v1/store/orders/1?expand=customer
Its items (nested route)/v1/store/orders/1/items?limit=5
Just the count/v1/store/orders?limit=1&fields=id

GraphQL

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

{
  orders(limit: 3, sort: "-id", filter: { status: pending }) {
    total
    data {
      id number customer_id status
      customer { name }
      items(limit: 2) { id }
    }
  }
}
Run it
curl https://api.sondahub.com/v1/store/graphql -H "Content-Type: application/json" -d '{"query": "{ orders(limit: 3, sort: \"-id\", filter: { status: pending }) { total data { id number customer_id status customer { name } items(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/orders.

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":"orders","filters":{"status":"pending"},"limit":3}}}'

More in the Store API

categories (8) · products (2,000) · customers (800) · 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.