Skip to main content

Fake Order Data API

MOCK DATA

Internally consistent fake orders with exact line-item totals, currency precision, lifecycle dates, payment state and generic tracking fixtures.

Generated test data for fixtures and development

Base URL
/api/orders
Capabilities
1 route Seedable
Last updated
July 29, 2026

GET /api/orders

Live requestRuns against the public API
No key required
GET/api/orders?status=delivered&count=5&seed=42

Request parameters

Pin every generated order to this lifecycle status. Omit for a weighted mix.

Active ISO 4217 currency code. Case-insensitive; output is canonical uppercase and amounts use its 0, 2 or 3 minor-unit digits.

Minimum number of distinct line items per order (inclusive).

Maximum number of distinct line items per order (inclusive). Must be ≥ minItems.

Earliest placedAt timestamp. Defaults to 365 days before the resolved to date.

Latest placedAt timestamp (through 9998-12-31). Defaults to the current UTC-day boundary.

Advanced response options7 options

How many records to generate (1–100).

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Response format: json envelope, ndjson (one record per line) or csv.

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/orders?status=delivered&count=5&seed=42"
const res = await fetch("https://randomapi.dev/api/orders?status=delivered&count=5&seed=42");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/orders?status=delivered&count=5&seed=42").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/orders?status=delivered&count=5&seed=42"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 6
status enum

Pin every generated order to this lifecycle status. Omit for a weighted mix.

allowed: pending | processing | shipped | delivered | cancelled
example: status=shipped
currency string

Active ISO 4217 currency code. Case-insensitive; output is canonical uppercase and amounts use its 0, 2 or 3 minor-unit digits.

default: USD
example: currency=KWD
minItems int

Minimum number of distinct line items per order (inclusive).

default: 1
allowed: 1 – 10
example: minItems=2
maxItems int

Maximum number of distinct line items per order (inclusive). Must be ≥ minItems.

default: 4
allowed: 1 – 10
example: maxItems=5
from date

Earliest placedAt timestamp. Defaults to 365 days before the resolved to date.

example: from=2025-01-01
to date

Latest placedAt timestamp (through 9998-12-31). Defaults to the current UTC-day boundary.

example: to=2025-12-31
Universal parameters Shared response and formatting options 7
count int

How many records to generate (1–100).

default: 10
allowed: 1 – 100
example: count=3
seed int

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

example: seed=42
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=id,orderNumber
exclude list

Return all fields except these (comma-separated).

example: exclude=trackingNumber
format enum

Response format: json envelope, ndjson (one record per line) or csv.

default: json
allowed: json | ndjson | csv
example: format=csv
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 18
id string

Distinct synthetic order ID.

example: ord_4c8a6e209d54e2340000

orderNumber string

Human-readable synthetic order number.

example: ORD-2025-X8FQ-001

status string

pending | processing | shipped | delivered | cancelled.

example: shipped

currency string

Canonical active ISO 4217 code.

example: USD

customer object

Synthetic customer: id, name and reserved-domain email.

example: {"id":"cus_123","name":"Avery Chen","email":"avery.chen@example.com"}

shippingAddress object

Synthetic recipient, street, city, postal code and country.

example: {"recipient":"Avery Chen","street":"42 Market Street","city":"Portland","postalCode":"97205","country":"United States","countryCode":"US"}

lineItems object[]

1–10 items with sku, name, quantity, unitPrice and exact lineTotal.

example: [{"sku":"SKU-A8F2","name":"Soft Cotton Chair","quantity":2,"unitPrice":24.5,"lineTotal":49}]

subtotal number

Sum of line totals, in the selected currency.

example: 98

discount number

Discount subtracted from subtotal.

example: 9.8

shipping number

Shipping charge added after discount.

example: 5

tax number

Tax calculated from the discounted amount plus shipping.

example: 18.64

total number

Exactly subtotal - discount + shipping + tax.

example: 111.84

paymentStatus string

pending | paid | refunded, coherent with order status.

example: paid

placedAt string (ISO 8601)

Order placement time inside from..to.

example: 2025-05-10T12:30:00.000Z

shippedAt string (ISO 8601) nullable

Shipment time for shipped/delivered orders, else null.

example: 2025-05-12T12:30:00.000Z

deliveredAt string (ISO 8601) nullable

Delivery time for delivered orders, else null.

example: null

cancelledAt string (ISO 8601) nullable

Cancellation time for cancelled orders, else null.

example: null

trackingNumber string nullable

Generic TRK-prefixed fixture for shipped/delivered orders; not a real carrier format.

example: TRK-8QL7M2NP9X

Documented examples

Build-generated requests and complete responses
3
Five reproducible delivered orders
GET /api/orders?status=delivered&count=5&seed=42
{
  "data": [
    {
      "id": "ord_1cff8728448a0b56b87c0000",
      "orderNumber": "ORD-2026-EKHC-001",
      "status": "delivered",
      "currency": "USD",
      "customer": {
        "id": "cus_6010d14615edf362",
        "name": "Pauline Dare",
        "email": "pauline.dare@example.com"
      },
      "shippingAddress": {
        "recipient": "Pauline Dare",
        "street": "190 E Water Street",
        "city": "Revahaven",
        "postalCode": "46706-3544",
        "country": "Sri Lanka",
        "countryCode": "LK"
      },
      "lineItems": [
        {
          "sku": "SKU-SBCP28YN",
          "name": "Oriental Plastic Mouse",
          "quantity": 3,
          "unitPrice": 162.95,
          "lineTotal": 488.85
        },
        {
          "sku": "SKU-3TL6X3LT",
          "name": "Generic Wooden Chicken",
          "quantity": 4,
          "unitPrice": 186.32,
          "lineTotal": 745.28
        },
        {
          "sku": "SKU-5KA8ZDMS",
          "name": "Elegant Bronze Bacon",
          "quantity": 5,
          "unitPrice": 431.37,
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Japanese-yen orders with 2–3 items
GET /api/orders?currency=JPY&minItems=2&maxItems=3&count=4&seed=19
{
  "data": [
    {
      "id": "ord_b5c47537fe4903453f480000",
      "orderNumber": "ORD-2025-YU7G-001",
      "status": "pending",
      "currency": "JPY",
      "customer": {
        "id": "cus_e5d72f4d3100cb03",
        "name": "Norwood Kling",
        "email": "norwood.kling@example.com"
      },
      "shippingAddress": {
        "recipient": "Norwood Kling",
        "street": "4599 Court Street",
        "city": "Lake Magdalenaboro",
        "postalCode": "97458",
        "country": "Tokelau",
        "countryCode": "TK"
      },
      "lineItems": [
        {
          "sku": "SKU-4QNRGP2V",
          "name": "Refined Bamboo Pants",
          "quantity": 5,
          "unitPrice": 143,
          "lineTotal": 715
        },
        {
          "sku": "SKU-XJFUEPKR",
          "name": "Refined Silk Mouse",
          "quantity": 1,
          "unitPrice": 203,
          "lineTotal": 203
        },
        {
          "sku": "SKU-HV74WDRD",
          "name": "Recycled Bamboo Hat",
          "quantity": 1,
          "unitPrice": 409,
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Orders placed in a fixed quarter
GET /api/orders?from=2025-01-01&to=2025-03-31&count=8&seed=7
{
  "data": [
    {
      "id": "ord_42b885d1859fba0b85c00000",
      "orderNumber": "ORD-2025-NATV-001",
      "status": "delivered",
      "currency": "USD",
      "customer": {
        "id": "cus_191526515328c4ce",
        "name": "Kristofer Price",
        "email": "kristofer.price@example.com"
      },
      "shippingAddress": {
        "recipient": "Kristofer Price",
        "street": "66983 The Sidings",
        "city": "Weymouth Town",
        "postalCode": "36801-6124",
        "country": "Cambodia",
        "countryCode": "KH"
      },
      "lineItems": [
        {
          "sku": "SKU-R7FJGP9P",
          "name": "Rustic Plastic Bike",
          "quantity": 1,
          "unitPrice": 376.69,
          "lineTotal": 376.69
        },
        {
          "sku": "SKU-346DWFHR",
          "name": "Rustic Rubber Table",
          "quantity": 1,
          "unitPrice": 375.44,
          "lineTotal": 375.44
        },
        {
          "sku": "SKU-C85VNLS3",
          "name": "Modern Granite Cheese",
          "quantity": 5,
          "unitPrice": 218.96,
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}

About this API

Coverage & behavior

Generates complete commerce-order fixtures rather than unrelated random fields. Every line total is quantity × unit price, and subtotal, discount, shipping, tax and total are calculated entirely in the currency's integer minor units before being rendered. That keeps JPY whole, USD at two decimals and KWD at three without floating-point accounting drift.

The status controls a strict lifecycle mask: pending and processing orders have no shipment dates; shipped orders have a generic fake tracking number; delivered orders have ordered shipment and delivery timestamps; cancelled orders have only a cancellation timestamp. Tracking values start with TRK- and deliberately do not claim compatibility with a real carrier.

from and to constrain placedAt. When omitted, they resolve to the 365 days ending at the current UTC-day boundary and are echoed in meta.params, keeping a seeded request stable throughout the day. The latest supported to date is 9998-12-31, leaving room for generated fulfilment dates. Country names and ISO alpha-2 codes are selected as one coherent reference pair; all customer, address, product and tracking content is synthetic test data.

Use it for

  • Populate checkout history, order-management and fulfilment interfaces
  • Test exact totals and zero-, two- and three-decimal currencies
  • Exercise pending, shipping, delivery and cancellation UI states

Frequently asked questions

Do the order totals add up exactly?

Yes. Line totals and every aggregate are computed in integer minor units, so subtotal - discount + shipping + tax always equals total.

Do order dates match the selected status?

Yes. A shipped order has shippedAt and tracking but no delivery date; a delivered order has both in order; a cancelled order has only cancelledAt.

Are the tracking numbers real carrier numbers?

No. They are clearly generic TRK-... fixtures and are not presented as valid DHL, UPS, FedEx or postal-service identifiers.