example-data.com
Menu
Browse docs and collections

Overview

orders / #899

orders #899

userId
Melba Collier @melba.collier
status
delivered
currency
USD
subtotal
316.72
tax
27.71
shipping
0
total
344.43
placedAt
shippedAt
deliveredAt
createdAt
updatedAt

Component variants

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/orders/899"
);
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/899"
);
const order = (await res.json()) as Order;

Python example

import requests

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

Response

{
  "id": 899,
  "userId": 19,
  "status": "delivered",
  "currency": "USD",
  "subtotal": 316.72,
  "tax": 27.71,
  "shipping": 0,
  "total": 344.43,
  "placedAt": "2025-04-26T06:44:11.609Z",
  "shippedAt": "2025-04-29T03:12:37.077Z",
  "deliveredAt": "2025-05-04T20:42:58.348Z",
  "createdAt": "2025-04-26T06:44:11.609Z",
  "updatedAt": "2025-05-04T20:42:58.348Z"
}