example-data.com
Menu
Browse docs and collections

Overview

orders / #113

orders #113

userId
Abdul Rau @abdul.rau
status
shipped
currency
USD
subtotal
2413.61
tax
211.19
shipping
0
total
2624.8
placedAt
shippedAt
deliveredAt
createdAt
updatedAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 113,
  "userId": 108,
  "status": "shipped",
  "currency": "USD",
  "subtotal": 2413.61,
  "tax": 211.19,
  "shipping": 0,
  "total": 2624.8,
  "placedAt": "2024-12-11T09:22:23.777Z",
  "shippedAt": "2024-12-13T00:00:19.000Z",
  "deliveredAt": null,
  "createdAt": "2024-12-11T09:22:23.777Z",
  "updatedAt": "2024-12-13T00:00:19.000Z"
}