example-data.com

food-orders / #58

userId
Rosemary Krajcik @rosemary_krajcik
restaurantId
Rodriguez, Nicolas and Schneider · New Anthony · ★ 4.9
items
[
  {
    "menuItemId": 760,
    "quantity": 4,
    "unitPrice": 78.81,
    "lineTotal": 315.24
  },
  {
    "menuItemId": 761,
    "quantity": 3,
    "unitPrice": 24.15,
    "lineTotal": 72.45
  }
]
subtotal
387.69
deliveryFee
1.35
tip
8.77
total
397.81
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

curl -sS \
  "https://example-data.com/api/v1/food-orders/58" \
  -H "Accept: application/json"
const res = await fetch(
  "https://example-data.com/api/v1/food-orders/58"
);
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/58"
);
const foodOrder = (await res.json()) as FoodOrder;
import requests

res = requests.get(
    "https://example-data.com/api/v1/food-orders/58"
)
food_order = res.json()
{
  "id": 58,
  "userId": 191,
  "restaurantId": 50,
  "items": [
    {
      "menuItemId": 760,
      "quantity": 4,
      "unitPrice": 78.81,
      "lineTotal": 315.24
    },
    {
      "menuItemId": 761,
      "quantity": 3,
      "unitPrice": 24.15,
      "lineTotal": 72.45
    }
  ],
  "subtotal": 387.69,
  "deliveryFee": 1.35,
  "tip": 8.77,
  "total": 397.81,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-01-14T12:59:04.972Z",
  "deliveredAt": "2025-01-14T15:08:42.224Z"
}
Draftbit