example-data.com
Menu
Browse docs and collections

orders

orders

Page 5 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": 97,
      "userId": 97,
      "status": "delivered",
      "currency": "USD",
      "subtotal": 2150.47,
      "tax": 188.17,
      "shipping": 0,
      "total": 2338.64,
      "placedAt": "2024-12-15T14:50:20.228Z",
      "shippedAt": "2024-12-18T02:28:56.375Z",
      "deliveredAt": "2024-12-21T03:39:45.539Z",
      "createdAt": "2024-12-15T14:50:20.228Z",
      "updatedAt": "2024-12-21T03:39:45.539Z"
    },
    {
      "id": 98,
      "userId": 191,
      "status": "shipped",
      "currency": "USD",
      "subtotal": 3223.78,
      "tax": 282.08,
      "shipping": 0,
      "total": 3505.86,
      "placedAt": "2024-11-23T21:27:06.158Z",
      "shippedAt": "2024-11-26T04:01:31.549Z",
      "deliveredAt": null,
      "createdAt": "2024-11-23T21:27:06.158Z",
      "updatedAt": "2024-11-26T04:01:31.549Z"
    },
    {
      "id": 99,
      "userId": 37,
      "status": "shipped",
      "currency": "USD",
      "subtotal": 1021.55,
      "tax": 89.39,
      "shipping": 0,
      "total": 1110.94,
      "placedAt": "2026-02-15T14:14:25.420Z",
      "shippedAt": "2026-02-17T10:34:29.360Z",
      "deliveredAt": null,
      "createdAt": "2026-02-15T14:14:25.420Z",
      "updatedAt": "2026-02-17T10:34:29.360Z"
    }
  ],
  "meta": {
    "page": 5,
    "limit": 24,
    "total": 1000,
    "totalPages": 42
  },
  "links": {
    "self": "/api/v1/orders?page=5&limit=24",
    "first": "/api/v1/orders?page=1&limit=24",
    "last": "/api/v1/orders?page=42&limit=24",
    "next": "/api/v1/orders?page=6&limit=24",
    "prev": "/api/v1/orders?page=4&limit=24"
  }
}