example-data.com
Menu
Browse docs and collections

Overview

orders / #18

orders #18

userId
Norbert Jacobi @norbert_jacobi92
status
delivered
currency
USD
subtotal
2522.48
tax
220.72
shipping
0
total
2743.2
placedAt
shippedAt
deliveredAt
createdAt
updatedAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 18,
  "userId": 101,
  "status": "delivered",
  "currency": "USD",
  "subtotal": 2522.48,
  "tax": 220.72,
  "shipping": 0,
  "total": 2743.2,
  "placedAt": "2025-03-14T22:40:41.992Z",
  "shippedAt": "2025-03-17T09:01:37.025Z",
  "deliveredAt": "2025-03-21T01:01:34.765Z",
  "createdAt": "2025-03-14T22:40:41.992Z",
  "updatedAt": "2025-03-21T01:01:34.765Z"
}