example-data.com
Menu
Browse docs and collections

Overview

orders / #224

orders #224

userId
Fritz Skiles @fritz_skiles
status
delivered
currency
USD
subtotal
2880.71
tax
252.06
shipping
0
total
3132.77
placedAt
shippedAt
deliveredAt
createdAt
updatedAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 224,
  "userId": 144,
  "status": "delivered",
  "currency": "USD",
  "subtotal": 2880.71,
  "tax": 252.06,
  "shipping": 0,
  "total": 3132.77,
  "placedAt": "2025-02-27T21:08:17.995Z",
  "shippedAt": "2025-03-01T22:14:44.296Z",
  "deliveredAt": "2025-03-05T00:34:00.187Z",
  "createdAt": "2025-02-27T21:08:17.995Z",
  "updatedAt": "2025-03-05T00:34:00.187Z"
}