orders #510
- userId
-
Lilly Rosenbaum @lilly.rosenbaum
- status
- delivered
- currency
- USD
- subtotal
- 723.36
- tax
- 63.29
- shipping
- 0
- total
- 786.65
- placedAt
- shippedAt
- deliveredAt
- createdAt
- updatedAt
Overview
orders / #510
#510
#510
Request
curl example
curl -sS \ "https://example-data.com/api/v1/orders/510" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/orders/510" ); 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/510"
);
const order = (await res.json()) as Order; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/orders/510"
)
order = res.json() Response
{
"id": 510,
"userId": 223,
"status": "delivered",
"currency": "USD",
"subtotal": 723.36,
"tax": 63.29,
"shipping": 0,
"total": 786.65,
"placedAt": "2024-12-22T15:01:50.919Z",
"shippedAt": "2024-12-24T22:05:26.255Z",
"deliveredAt": "2024-12-28T08:40:10.244Z",
"createdAt": "2024-12-22T15:01:50.919Z",
"updatedAt": "2024-12-28T08:40:10.244Z"
}