example-data.com

food-orders / #198

userId
Vidal Parker @vidal_parker12
restaurantId
Brown - Johnson · West Bernie · ★ 3.3
items
[
  {
    "menuItemId": 625,
    "quantity": 2,
    "unitPrice": 6.11,
    "lineTotal": 12.22
  },
  {
    "menuItemId": 636,
    "quantity": 4,
    "unitPrice": 59.18,
    "lineTotal": 236.72
  },
  {
    "menuItemId": 621,
    "quantity": 2,
    "unitPrice": 45.28,
    "lineTotal": 90.56
  },
  {
    "menuItemId": 627,
    "quantity": 4,
    "unitPrice": 5.52,
    "lineTotal": 22.08
  }
]
subtotal
361.58
deliveryFee
4.28
tip
5.92
total
371.78
currency
USD
status
cancelled
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/198"
)
food_order = res.json()
{
  "id": 198,
  "userId": 203,
  "restaurantId": 43,
  "items": [
    {
      "menuItemId": 625,
      "quantity": 2,
      "unitPrice": 6.11,
      "lineTotal": 12.22
    },
    {
      "menuItemId": 636,
      "quantity": 4,
      "unitPrice": 59.18,
      "lineTotal": 236.72
    },
    {
      "menuItemId": 621,
      "quantity": 2,
      "unitPrice": 45.28,
      "lineTotal": 90.56
    },
    {
      "menuItemId": 627,
      "quantity": 4,
      "unitPrice": 5.52,
      "lineTotal": 22.08
    }
  ],
  "subtotal": 361.58,
  "deliveryFee": 4.28,
  "tip": 5.92,
  "total": 371.78,
  "currency": "USD",
  "status": "cancelled",
  "placedAt": "2025-04-25T23:24:08.848Z",
  "deliveredAt": null
}
Draftbit