example-data.com
Menu
Browse docs and collections

orders

orders

Page 25 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": 577,
      "userId": 116,
      "status": "pending",
      "currency": "USD",
      "subtotal": 3303.72,
      "tax": 289.08,
      "shipping": 0,
      "total": 3592.8,
      "placedAt": "2025-02-23T12:53:31.411Z",
      "shippedAt": null,
      "deliveredAt": null,
      "createdAt": "2025-02-23T12:53:31.411Z",
      "updatedAt": "2025-02-23T12:53:31.411Z"
    },
    {
      "id": 578,
      "userId": 201,
      "status": "refunded",
      "currency": "USD",
      "subtotal": 396.55,
      "tax": 34.7,
      "shipping": 0,
      "total": 431.25,
      "placedAt": "2026-02-17T23:50:06.636Z",
      "shippedAt": null,
      "deliveredAt": null,
      "createdAt": "2026-02-17T23:50:06.636Z",
      "updatedAt": "2026-02-17T23:50:06.636Z"
    },
    {
      "id": 579,
      "userId": 145,
      "status": "delivered",
      "currency": "USD",
      "subtotal": 2252.01,
      "tax": 197.05,
      "shipping": 0,
      "total": 2449.06,
      "placedAt": "2026-05-19T00:30:28.500Z",
      "shippedAt": "2026-05-21T13:38:50.513Z",
      "deliveredAt": "2026-05-22T00:00:00.000Z",
      "createdAt": "2026-05-19T00:30:28.500Z",
      "updatedAt": "2026-05-22T00:00:00.000Z"
    }
  ],
  "meta": {
    "page": 25,
    "limit": 24,
    "total": 1000,
    "totalPages": 42
  },
  "links": {
    "self": "/api/v1/orders?page=25&limit=24",
    "first": "/api/v1/orders?page=1&limit=24",
    "last": "/api/v1/orders?page=42&limit=24",
    "next": "/api/v1/orders?page=26&limit=24",
    "prev": "/api/v1/orders?page=24&limit=24"
  }
}