order-items #1586
- orderId
- orders/525
- productId
-
Recycled Plastic Tuna USD42.64
- quantity
- 2
- unitPrice
- 42.64
- lineTotal
- 85.28
Overview
order-items / #1586
#1586
#1586
Request
curl example
curl -sS \ "https://example-data.com/api/v1/order-items/1586" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/order-items/1586" ); const orderItem = await res.json();
TypeScript example
// Download once: mkdir -p types && curl -o types/order-items.d.ts https://example-data.com/types/order-items.d.ts
import type { OrderItem } from "./types/order-items";
const res = await fetch(
"https://example-data.com/api/v1/order-items/1586"
);
const orderItem = (await res.json()) as OrderItem; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/order-items/1586"
)
order_item = res.json() Response
{
"id": 1586,
"orderId": 525,
"productId": 121,
"quantity": 2,
"unitPrice": 42.64,
"lineTotal": 85.28
}