example-data.com

food-orders / #235

userId
Mathilde Ziemann-Nienow @mathilde.ziemann-nienow6
restaurantId
Roob - Fisher · Kuhlmanshire · ★ 3.2
items
[
  {
    "menuItemId": 1219,
    "quantity": 3,
    "unitPrice": 53.57,
    "lineTotal": 160.71
  }
]
subtotal
160.71
deliveryFee
2.65
tip
10.18
total
173.54
currency
USD
status
preparing
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/235"
)
food_order = res.json()
{
  "id": 235,
  "userId": 202,
  "restaurantId": 83,
  "items": [
    {
      "menuItemId": 1219,
      "quantity": 3,
      "unitPrice": 53.57,
      "lineTotal": 160.71
    }
  ],
  "subtotal": 160.71,
  "deliveryFee": 2.65,
  "tip": 10.18,
  "total": 173.54,
  "currency": "USD",
  "status": "preparing",
  "placedAt": "2024-08-29T15:06:07.107Z",
  "deliveredAt": null
}
Draftbit