example-data.com

food-orders / #202

userId
Celia D'Amore @celia_damore
restaurantId
McKenzie - Toy · Hattiesburg · ★ 2.8
items
[
  {
    "menuItemId": 38,
    "quantity": 4,
    "unitPrice": 30.15,
    "lineTotal": 120.6
  },
  {
    "menuItemId": 43,
    "quantity": 1,
    "unitPrice": 52.11,
    "lineTotal": 52.11
  },
  {
    "menuItemId": 42,
    "quantity": 4,
    "unitPrice": 34.57,
    "lineTotal": 138.28
  }
]
subtotal
310.99
deliveryFee
0.7
tip
8.19
total
319.88
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/202"
)
food_order = res.json()
{
  "id": 202,
  "userId": 24,
  "restaurantId": 4,
  "items": [
    {
      "menuItemId": 38,
      "quantity": 4,
      "unitPrice": 30.15,
      "lineTotal": 120.6
    },
    {
      "menuItemId": 43,
      "quantity": 1,
      "unitPrice": 52.11,
      "lineTotal": 52.11
    },
    {
      "menuItemId": 42,
      "quantity": 4,
      "unitPrice": 34.57,
      "lineTotal": 138.28
    }
  ],
  "subtotal": 310.99,
  "deliveryFee": 0.7,
  "tip": 8.19,
  "total": 319.88,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-02-03T16:38:50.736Z",
  "deliveredAt": "2025-02-03T20:13:18.774Z"
}
Draftbit