example-data.com
Menu
Browse docs and collections

orders

orders

Page 7 of 42.

Overview

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/orders?limit=25"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/orders?limit=25"
);
const { data, meta } = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/orders.d.ts https://example-data.com/types/orders.d.ts
import type { Order, ListEnvelope } from "./types/orders";

const res = await fetch(
  "https://example-data.com/api/v1/orders?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Order>;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/orders",
    params={"limit": 25},
)
data = res.json()

Response

{
  "data": [
    {
      "id": 145,
      "userId": 223,
      "status": "cancelled",
      "currency": "USD",
      "subtotal": 247.02,
      "tax": 21.61,
      "shipping": 0,
      "total": 268.63,
      "placedAt": "2025-05-08T01:45:17.799Z",
      "shippedAt": null,
      "deliveredAt": null,
      "createdAt": "2025-05-08T01:45:17.799Z",
      "updatedAt": "2025-05-08T01:45:17.799Z"
    },
    {
      "id": 146,
      "userId": 115,
      "status": "delivered",
      "currency": "USD",
      "subtotal": 945.15,
      "tax": 82.7,
      "shipping": 0,
      "total": 1027.85,
      "placedAt": "2026-01-26T04:40:28.298Z",
      "shippedAt": "2026-01-28T19:11:57.675Z",
      "deliveredAt": "2026-01-31T14:25:08.646Z",
      "createdAt": "2026-01-26T04:40:28.298Z",
      "updatedAt": "2026-01-31T14:25:08.646Z"
    },
    {
      "id": 147,
      "userId": 199,
      "status": "cancelled",
      "currency": "USD",
      "subtotal": 2362.83,
      "tax": 206.75,
      "shipping": 0,
      "total": 2569.58,
      "placedAt": "2025-03-05T23:47:38.344Z",
      "shippedAt": null,
      "deliveredAt": null,
      "createdAt": "2025-03-05T23:47:38.344Z",
      "updatedAt": "2025-03-05T23:47:38.344Z"
    }
  ],
  "meta": {
    "page": 7,
    "limit": 24,
    "total": 1000,
    "totalPages": 42
  },
  "links": {
    "self": "/api/v1/orders?page=7&limit=24",
    "first": "/api/v1/orders?page=1&limit=24",
    "last": "/api/v1/orders?page=42&limit=24",
    "next": "/api/v1/orders?page=8&limit=24",
    "prev": "/api/v1/orders?page=6&limit=24"
  }
}