example-data.com
Menu
Browse docs and collections

Overview

orders / #651

orders #651

userId
Sonia Nolan @sonia_nolan
status
delivered
currency
USD
subtotal
2887.12
tax
252.62
shipping
0
total
3139.74
placedAt
shippedAt
deliveredAt
createdAt
updatedAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 651,
  "userId": 208,
  "status": "delivered",
  "currency": "USD",
  "subtotal": 2887.12,
  "tax": 252.62,
  "shipping": 0,
  "total": 3139.74,
  "placedAt": "2025-05-12T01:19:16.203Z",
  "shippedAt": "2025-05-13T17:40:02.936Z",
  "deliveredAt": "2025-05-16T22:56:52.105Z",
  "createdAt": "2025-05-12T01:19:16.203Z",
  "updatedAt": "2025-05-16T22:56:52.105Z"
}