example-data.com
Menu
Browse docs and collections

Overview

orders / #151

orders #151

userId
Daren Lockman @daren_lockman67
status
delivered
currency
USD
subtotal
1183.16
tax
103.53
shipping
0
total
1286.69
placedAt
shippedAt
deliveredAt
createdAt
updatedAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 151,
  "userId": 116,
  "status": "delivered",
  "currency": "USD",
  "subtotal": 1183.16,
  "tax": 103.53,
  "shipping": 0,
  "total": 1286.69,
  "placedAt": "2025-01-10T23:22:02.842Z",
  "shippedAt": "2025-01-13T07:08:41.936Z",
  "deliveredAt": "2025-01-19T19:32:36.404Z",
  "createdAt": "2025-01-10T23:22:02.842Z",
  "updatedAt": "2025-01-19T19:32:36.404Z"
}