orders #43
- userId
-
Mia Renner @mia.renner47
- status
- delivered
- currency
- USD
- subtotal
- 646.4
- tax
- 56.56
- shipping
- 0
- total
- 702.96
- placedAt
- shippedAt
- deliveredAt
- createdAt
- updatedAt
Overview
orders / #43
Request
curl example
curl -sS \ "https://example-data.com/api/v1/orders/43" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/orders/43" ); 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/43"
);
const order = (await res.json()) as Order; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/orders/43"
)
order = res.json() Response
{
"id": 43,
"userId": 212,
"status": "delivered",
"currency": "USD",
"subtotal": 646.4,
"tax": 56.56,
"shipping": 0,
"total": 702.96,
"placedAt": "2024-11-08T03:25:19.347Z",
"shippedAt": "2024-11-09T08:53:53.947Z",
"deliveredAt": "2024-11-17T04:15:03.102Z",
"createdAt": "2024-11-08T03:25:19.347Z",
"updatedAt": "2024-11-17T04:15:03.102Z"
}