example-data.com
Menu
Browse docs and collections

Overview

orders / #328

orders #328

userId
Bradford Doyle @bradford.doyle42
status
delivered
currency
USD
subtotal
547.94
tax
47.94
shipping
0
total
595.88
placedAt
shippedAt
deliveredAt
createdAt
updatedAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 328,
  "userId": 79,
  "status": "delivered",
  "currency": "USD",
  "subtotal": 547.94,
  "tax": 47.94,
  "shipping": 0,
  "total": 595.88,
  "placedAt": "2024-10-24T09:52:27.833Z",
  "shippedAt": "2024-10-27T02:22:22.296Z",
  "deliveredAt": "2024-11-02T15:53:15.092Z",
  "createdAt": "2024-10-24T09:52:27.833Z",
  "updatedAt": "2024-11-02T15:53:15.092Z"
}