example-data.com
Menu
Browse docs and collections

Overview

orders / #114

orders #114

userId
Gwendolyn Wyman @gwendolyn.wyman87
status
delivered
currency
USD
subtotal
2990.05
tax
261.63
shipping
0
total
3251.68
placedAt
shippedAt
deliveredAt
createdAt
updatedAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 114,
  "userId": 40,
  "status": "delivered",
  "currency": "USD",
  "subtotal": 2990.05,
  "tax": 261.63,
  "shipping": 0,
  "total": 3251.68,
  "placedAt": "2024-05-26T18:24:27.835Z",
  "shippedAt": "2024-05-29T03:17:33.607Z",
  "deliveredAt": "2024-05-31T16:37:04.171Z",
  "createdAt": "2024-05-26T18:24:27.835Z",
  "updatedAt": "2024-05-31T16:37:04.171Z"
}