Back to blog
    Test Data
    API Testing
    QA Reference

    Sample JSON Files for Testing: Users, Products, Orders, and More

    Copy-paste sample JSON files for testing — users, products, orders, addresses, payments — in realistic shapes that mirror what real APIs return. Free to use in any project.

    · 7 min read

    Almost every developer needs sample JSON at some point — to seed a mock API, populate a UI before the backend exists, or feed a JSON parser test. This page collects realistic samples for the most common entities, in shapes that mirror what real APIs return.

    Sample user object

    A typical user payload includes an ID, profile fields, timestamps, and a nested address. Use this as a starting point and trim what you do not need:

    {"id":"f47ac10b-58cc-4372-a567-0e02b2c3d479","email":"jane.doe@example.com","firstName":"Jane","lastName":"Doe","role":"admin","createdAt":"2026-01-15T08:30:00Z","address":{"street":"1 Embarcadero Center","city":"San Francisco","state":"CA","postalCode":"94111","country":"US"}}

    Sample product object

    E-commerce APIs typically expose price as an integer in the smallest currency unit (cents) — never as a float. Variants live in a sub-array.

    {"id":"prod_01HX8K","sku":"WIDGET-BLU-M","name":"Blue Widget","description":"A useful blue widget.","priceCents":2499,"currency":"USD","inventory":42,"variants":[{"id":"var_01HX8L","size":"M","color":"blue"},{"id":"var_01HX8M","size":"L","color":"blue"}],"images":["https://example.com/widget-1.jpg"],"createdAt":"2026-02-01T10:00:00Z"}

    Sample order object

    Orders join a customer to one or more line items, with separate totals for subtotal, tax, shipping, and discount. Notice the status enum — most APIs use a strict whitelist.

    {"id":"ord_01HX9A","customerId":"f47ac10b-58cc-4372-a567-0e02b2c3d479","status":"paid","items":[{"productId":"prod_01HX8K","variantId":"var_01HX8L","quantity":2,"unitPriceCents":2499}],"subtotalCents":4998,"taxCents":437,"shippingCents":500,"totalCents":5935,"currency":"USD","placedAt":"2026-04-05T14:23:11Z"}

    Sample paginated list response

    Most modern APIs use cursor pagination over offset pagination — it survives inserts and deletes without skipping or duplicating records.

    {"data":[{"id":"prod_01HX8K","name":"Blue Widget"},{"id":"prod_01HX8N","name":"Red Widget"}],"pagination":{"nextCursor":"eyJpZCI6InByb2RfMDFIWDhOIn0","hasMore":true,"totalEstimate":1248}}

    Sample error response

    RFC 7807 (problem details) is the emerging standard for API errors. It uses a `type` URL, a human-readable `title`, the HTTP `status`, and a free-form `detail`.

    {"type":"https://example.com/probs/insufficient-funds","title":"Insufficient funds","status":402,"detail":"The card has insufficient funds for this transaction.","instance":"/payments/pay_01HXAA"}

    Sample webhook event

    Webhook payloads typically wrap the resource in an event envelope with an event type, ID, and timestamp. Stripe, Shopify, and GitHub all follow variants of this shape.

    {"id":"evt_01HXAB","type":"order.paid","createdAt":"2026-04-05T14:23:12Z","data":{"orderId":"ord_01HX9A","totalCents":5935,"currency":"USD"}}

    Keep your sample JSON one paste away

    These samples will not change often, but you will paste them dozens of times. Drop the ones your team uses most into a TestAssets list and pull them straight into Postman, your IDE, or an API playground from any device — instead of hunting through old PRs every time you need a known-good payload.

    We use essential cookies for core functionality and optional cookies to improve your experience. Learn more about our privacy policy