example-data.com

food-orders / #191

userId
Jonas Rath @jonas.rath
restaurantId
Klocko, Gusikowski and Lockman · Lake Vern · ★ 2.9
items
[
  {
    "menuItemId": 1338,
    "quantity": 4,
    "unitPrice": 24.18,
    "lineTotal": 96.72
  },
  {
    "menuItemId": 1333,
    "quantity": 3,
    "unitPrice": 40.39,
    "lineTotal": 121.17
  }
]
subtotal
217.89
deliveryFee
3.26
tip
6.19
total
227.34
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/191"
)
food_order = res.json()
{
  "id": 191,
  "userId": 138,
  "restaurantId": 92,
  "items": [
    {
      "menuItemId": 1338,
      "quantity": 4,
      "unitPrice": 24.18,
      "lineTotal": 96.72
    },
    {
      "menuItemId": 1333,
      "quantity": 3,
      "unitPrice": 40.39,
      "lineTotal": 121.17
    }
  ],
  "subtotal": 217.89,
  "deliveryFee": 3.26,
  "tip": 6.19,
  "total": 227.34,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2025-01-04T11:49:36.093Z",
  "deliveredAt": null
}
Draftbit