example-data.com

food-orders / #230

userId
Terence Lemke @terence.lemke85
restaurantId
Lehner - Smith · Larkinfurt · ★ 3.0
items
[
  {
    "menuItemId": 1347,
    "quantity": 2,
    "unitPrice": 59.9,
    "lineTotal": 119.8
  }
]
subtotal
119.8
deliveryFee
0.66
tip
11.13
total
131.59
currency
USD
status
preparing
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/230"
)
food_order = res.json()
{
  "id": 230,
  "userId": 74,
  "restaurantId": 93,
  "items": [
    {
      "menuItemId": 1347,
      "quantity": 2,
      "unitPrice": 59.9,
      "lineTotal": 119.8
    }
  ],
  "subtotal": 119.8,
  "deliveryFee": 0.66,
  "tip": 11.13,
  "total": 131.59,
  "currency": "USD",
  "status": "preparing",
  "placedAt": "2024-06-22T00:41:18.583Z",
  "deliveredAt": null
}
Draftbit