example-data.com
Menu
Browse docs and collections

orders

orders

Page 24 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": 553,
      "userId": 227,
      "status": "confirmed",
      "currency": "USD",
      "subtotal": 1644.61,
      "tax": 143.9,
      "shipping": 0,
      "total": 1788.51,
      "placedAt": "2025-01-13T12:24:41.115Z",
      "shippedAt": null,
      "deliveredAt": null,
      "createdAt": "2025-01-13T12:24:41.115Z",
      "updatedAt": "2025-01-13T12:24:41.115Z"
    },
    {
      "id": 554,
      "userId": 101,
      "status": "shipped",
      "currency": "USD",
      "subtotal": 384.59,
      "tax": 33.65,
      "shipping": 0,
      "total": 418.24,
      "placedAt": "2024-06-28T21:14:50.586Z",
      "shippedAt": "2024-06-30T03:53:21.832Z",
      "deliveredAt": null,
      "createdAt": "2024-06-28T21:14:50.586Z",
      "updatedAt": "2024-06-30T03:53:21.832Z"
    },
    {
      "id": 555,
      "userId": 33,
      "status": "confirmed",
      "currency": "USD",
      "subtotal": 2201.42,
      "tax": 192.62,
      "shipping": 0,
      "total": 2394.04,
      "placedAt": "2025-01-30T14:18:00.132Z",
      "shippedAt": null,
      "deliveredAt": null,
      "createdAt": "2025-01-30T14:18:00.132Z",
      "updatedAt": "2025-01-30T14:18:00.132Z"
    }
  ],
  "meta": {
    "page": 24,
    "limit": 24,
    "total": 1000,
    "totalPages": 42
  },
  "links": {
    "self": "/api/v1/orders?page=24&limit=24",
    "first": "/api/v1/orders?page=1&limit=24",
    "last": "/api/v1/orders?page=42&limit=24",
    "next": "/api/v1/orders?page=25&limit=24",
    "prev": "/api/v1/orders?page=23&limit=24"
  }
}