example-data.com

order-items / #124

orderId
orders/42
productId
Luxurious Wooden Table USD195.98
quantity
1
unitPrice
195.98
lineTotal
195.98

Component variants

Related

curl -sS \
  "https://example-data.com/api/v1/order-items/124" \
  -H "Accept: application/json"
const res = await fetch(
  "https://example-data.com/api/v1/order-items/124"
);
const orderItem = await res.json();
import type { OrderItem } from "https://example-data.com/types/order-items.d.ts";

const res = await fetch(
  "https://example-data.com/api/v1/order-items/124"
);
const orderItem = (await res.json()) as OrderItem;
import requests

res = requests.get(
    "https://example-data.com/api/v1/order-items/124"
)
order_item = res.json()
{
  "id": 124,
  "orderId": 42,
  "productId": 190,
  "quantity": 1,
  "unitPrice": 195.98,
  "lineTotal": 195.98
}
Draftbit