example-data.com

food-orders / #138

userId
Ruben Terry @ruben.terry
restaurantId
Hamill, Flatley and Pfeffer · North Trevacester · ★ 4.3
items
[
  {
    "menuItemId": 776,
    "quantity": 1,
    "unitPrice": 30.26,
    "lineTotal": 30.26
  },
  {
    "menuItemId": 778,
    "quantity": 4,
    "unitPrice": 41.69,
    "lineTotal": 166.76
  },
  {
    "menuItemId": 770,
    "quantity": 2,
    "unitPrice": 48.12,
    "lineTotal": 96.24
  }
]
subtotal
293.26
deliveryFee
4.93
tip
5.65
total
303.84
currency
USD
status
placed
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/138"
)
food_order = res.json()
{
  "id": 138,
  "userId": 91,
  "restaurantId": 51,
  "items": [
    {
      "menuItemId": 776,
      "quantity": 1,
      "unitPrice": 30.26,
      "lineTotal": 30.26
    },
    {
      "menuItemId": 778,
      "quantity": 4,
      "unitPrice": 41.69,
      "lineTotal": 166.76
    },
    {
      "menuItemId": 770,
      "quantity": 2,
      "unitPrice": 48.12,
      "lineTotal": 96.24
    }
  ],
  "subtotal": 293.26,
  "deliveryFee": 4.93,
  "tip": 5.65,
  "total": 303.84,
  "currency": "USD",
  "status": "placed",
  "placedAt": "2025-01-10T18:25:41.072Z",
  "deliveredAt": null
}
Draftbit