example-data.com
Menu
Browse docs and collections

Overview

orders / #355

orders #355

userId
Jonathan Howe @jonathan_howe77
status
delivered
currency
USD
subtotal
1022.68
tax
89.48
shipping
0
total
1112.16
placedAt
shippedAt
deliveredAt
createdAt
updatedAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 355,
  "userId": 150,
  "status": "delivered",
  "currency": "USD",
  "subtotal": 1022.68,
  "tax": 89.48,
  "shipping": 0,
  "total": 1112.16,
  "placedAt": "2025-03-20T22:26:50.723Z",
  "shippedAt": "2025-03-22T11:02:01.632Z",
  "deliveredAt": "2025-03-26T03:33:55.892Z",
  "createdAt": "2025-03-20T22:26:50.723Z",
  "updatedAt": "2025-03-26T03:33:55.892Z"
}