example-data.com

food-orders / #120

userId
Amari Koch @amari.koch
restaurantId
Adams - Schimmel · Murrayburgh · ★ 2.7
items
[
  {
    "menuItemId": 1196,
    "quantity": 2,
    "unitPrice": 57.29,
    "lineTotal": 114.58
  }
]
subtotal
114.58
deliveryFee
2.15
tip
11.55
total
128.28
currency
USD
status
preparing
placedAt
deliveredAt

Component variants

Related

curl -sS \
  "https://example-data.com/api/v1/food-orders/120" \
  -H "Accept: application/json"
const res = await fetch(
  "https://example-data.com/api/v1/food-orders/120"
);
const foodOrder = await res.json();
import type { FoodOrder } from "https://example-data.com/types/food-orders.d.ts";

const res = await fetch(
  "https://example-data.com/api/v1/food-orders/120"
);
const foodOrder = (await res.json()) as FoodOrder;
import requests

res = requests.get(
    "https://example-data.com/api/v1/food-orders/120"
)
food_order = res.json()
{
  "id": 120,
  "userId": 130,
  "restaurantId": 81,
  "items": [
    {
      "menuItemId": 1196,
      "quantity": 2,
      "unitPrice": 57.29,
      "lineTotal": 114.58
    }
  ],
  "subtotal": 114.58,
  "deliveryFee": 2.15,
  "tip": 11.55,
  "total": 128.28,
  "currency": "USD",
  "status": "preparing",
  "placedAt": "2025-03-06T07:21:21.058Z",
  "deliveredAt": null
}
Draftbit