orders #546
- userId
-
Kevon Dickinson @kevon.dickinson
- status
- delivered
- currency
- USD
- subtotal
- 2292.92
- tax
- 200.63
- shipping
- 0
- total
- 2493.55
- placedAt
- shippedAt
- deliveredAt
- createdAt
- updatedAt
Overview
orders / #546
#546
#546
Request
curl example
curl -sS \ "https://example-data.com/api/v1/orders/546" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/orders/546" ); 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/546"
);
const order = (await res.json()) as Order; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/orders/546"
)
order = res.json() Response
{
"id": 546,
"userId": 218,
"status": "delivered",
"currency": "USD",
"subtotal": 2292.92,
"tax": 200.63,
"shipping": 0,
"total": 2493.55,
"placedAt": "2024-07-03T12:38:22.235Z",
"shippedAt": "2024-07-06T02:48:25.771Z",
"deliveredAt": "2024-07-12T09:26:34.588Z",
"createdAt": "2024-07-03T12:38:22.235Z",
"updatedAt": "2024-07-12T09:26:34.588Z"
}