example-data.com
Menu
Browse docs and collections

Overview

orders / #941

orders #941

userId
Simeon Heathcote @simeon_heathcote75
status
delivered
currency
USD
subtotal
1041.78
tax
91.16
shipping
0
total
1132.94
placedAt
shippedAt
deliveredAt
createdAt
updatedAt

Component variants

Related

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/orders/941" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/orders/941"
);
const order = 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 } from "./types/orders";

const res = await fetch(
  "https://example-data.com/api/v1/orders/941"
);
const order = (await res.json()) as Order;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/orders/941"
)
order = res.json()

Response

{
  "id": 941,
  "userId": 224,
  "status": "delivered",
  "currency": "USD",
  "subtotal": 1041.78,
  "tax": 91.16,
  "shipping": 0,
  "total": 1132.94,
  "placedAt": "2025-05-10T02:53:52.165Z",
  "shippedAt": "2025-05-13T00:35:14.518Z",
  "deliveredAt": "2025-05-19T00:45:12.211Z",
  "createdAt": "2025-05-10T02:53:52.165Z",
  "updatedAt": "2025-05-19T00:45:12.211Z"
}