example-data.com
Menu
Browse docs and collections

Overview

orders / #455

orders #455

userId
Diana Murazik @diana.murazik31
status
shipped
currency
USD
subtotal
820.88
tax
71.83
shipping
0
total
892.71
placedAt
shippedAt
deliveredAt
createdAt
updatedAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 455,
  "userId": 125,
  "status": "shipped",
  "currency": "USD",
  "subtotal": 820.88,
  "tax": 71.83,
  "shipping": 0,
  "total": 892.71,
  "placedAt": "2024-06-23T23:57:03.698Z",
  "shippedAt": "2024-06-26T14:32:09.411Z",
  "deliveredAt": null,
  "createdAt": "2024-06-23T23:57:03.698Z",
  "updatedAt": "2024-06-26T14:32:09.411Z"
}