orders #843
- userId
-
Whitney O'Reilly @whitney.oreilly
- status
- delivered
- currency
- USD
- subtotal
- 804.95
- tax
- 70.43
- shipping
- 0
- total
- 875.38
- placedAt
- shippedAt
- deliveredAt
- createdAt
- updatedAt
Overview
orders / #843
#843
#843
Request
curl example
curl -sS \ "https://example-data.com/api/v1/orders/843" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/orders/843" ); 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/843"
);
const order = (await res.json()) as Order; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/orders/843"
)
order = res.json() Response
{
"id": 843,
"userId": 99,
"status": "delivered",
"currency": "USD",
"subtotal": 804.95,
"tax": 70.43,
"shipping": 0,
"total": 875.38,
"placedAt": "2024-07-29T07:38:23.309Z",
"shippedAt": "2024-07-31T00:51:30.882Z",
"deliveredAt": "2024-08-02T18:34:54.851Z",
"createdAt": "2024-07-29T07:38:23.309Z",
"updatedAt": "2024-08-02T18:34:54.851Z"
}