example-data.com
Menu
Browse docs and collections

Overview

orders / #439

orders #439

userId
Colby Kovacek @colby_kovacek40
status
delivered
currency
USD
subtotal
2239.76
tax
195.98
shipping
0
total
2435.74
placedAt
shippedAt
deliveredAt
createdAt
updatedAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 439,
  "userId": 85,
  "status": "delivered",
  "currency": "USD",
  "subtotal": 2239.76,
  "tax": 195.98,
  "shipping": 0,
  "total": 2435.74,
  "placedAt": "2024-12-25T08:31:32.143Z",
  "shippedAt": "2024-12-27T02:48:28.012Z",
  "deliveredAt": "2024-12-29T08:51:01.708Z",
  "createdAt": "2024-12-25T08:31:32.143Z",
  "updatedAt": "2024-12-29T08:51:01.708Z"
}