example-data.com

food-orders / #40

userId
Lamar Wilkinson @lamar_wilkinson43
restaurantId
Halvorson - Olson · Lake Angeloton · ★ 3.7
items
[
  {
    "menuItemId": 111,
    "quantity": 4,
    "unitPrice": 59.91,
    "lineTotal": 239.64
  },
  {
    "menuItemId": 96,
    "quantity": 2,
    "unitPrice": 60.13,
    "lineTotal": 120.26
  }
]
subtotal
359.9
deliveryFee
3.98
tip
3.71
total
367.59
currency
USD
status
cancelled
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/40"
)
food_order = res.json()
{
  "id": 40,
  "userId": 43,
  "restaurantId": 8,
  "items": [
    {
      "menuItemId": 111,
      "quantity": 4,
      "unitPrice": 59.91,
      "lineTotal": 239.64
    },
    {
      "menuItemId": 96,
      "quantity": 2,
      "unitPrice": 60.13,
      "lineTotal": 120.26
    }
  ],
  "subtotal": 359.9,
  "deliveryFee": 3.98,
  "tip": 3.71,
  "total": 367.59,
  "currency": "USD",
  "status": "cancelled",
  "placedAt": "2025-02-06T07:36:11.675Z",
  "deliveredAt": null
}
Draftbit