example-data.com
Menu
Browse docs and collections

Overview

orders / #749

orders #749

userId
Brycen Bayer @brycen_bayer60
status
delivered
currency
USD
subtotal
2297.53
tax
201.03
shipping
0
total
2498.56
placedAt
shippedAt
deliveredAt
createdAt
updatedAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 749,
  "userId": 6,
  "status": "delivered",
  "currency": "USD",
  "subtotal": 2297.53,
  "tax": 201.03,
  "shipping": 0,
  "total": 2498.56,
  "placedAt": "2025-03-23T13:33:33.370Z",
  "shippedAt": "2025-03-25T01:14:17.667Z",
  "deliveredAt": "2025-03-29T04:33:55.470Z",
  "createdAt": "2025-03-23T13:33:33.370Z",
  "updatedAt": "2025-03-29T04:33:55.470Z"
}