orders
orders
Page 38 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": 889,
"userId": 60,
"status": "shipped",
"currency": "USD",
"subtotal": 1663.99,
"tax": 145.6,
"shipping": 0,
"total": 1809.59,
"placedAt": "2024-06-14T05:31:37.718Z",
"shippedAt": "2024-06-16T11:22:10.339Z",
"deliveredAt": null,
"createdAt": "2024-06-14T05:31:37.718Z",
"updatedAt": "2024-06-16T11:22:10.339Z"
},
{
"id": 890,
"userId": 98,
"status": "refunded",
"currency": "USD",
"subtotal": 2380.94,
"tax": 208.33,
"shipping": 0,
"total": 2589.27,
"placedAt": "2026-04-05T21:52:02.489Z",
"shippedAt": null,
"deliveredAt": null,
"createdAt": "2026-04-05T21:52:02.489Z",
"updatedAt": "2026-04-05T21:52:02.489Z"
},
{
"id": 891,
"userId": 172,
"status": "cancelled",
"currency": "USD",
"subtotal": 2833.02,
"tax": 247.89,
"shipping": 0,
"total": 3080.91,
"placedAt": "2024-12-15T20:11:17.056Z",
"shippedAt": null,
"deliveredAt": null,
"createdAt": "2024-12-15T20:11:17.056Z",
"updatedAt": "2024-12-15T20:11:17.056Z"
}
],
"meta": {
"page": 38,
"limit": 24,
"total": 1000,
"totalPages": 42
},
"links": {
"self": "/api/v1/orders?page=38&limit=24",
"first": "/api/v1/orders?page=1&limit=24",
"last": "/api/v1/orders?page=42&limit=24",
"next": "/api/v1/orders?page=39&limit=24",
"prev": "/api/v1/orders?page=37&limit=24"
}
}