example-data.com

food-orders / #49

userId
Vincenza Zemlak-Collier @vincenza_zemlak-collier
restaurantId
O'Keefe - Cruickshank · Covina · ★ 4.8
items
[
  {
    "menuItemId": 1329,
    "quantity": 4,
    "unitPrice": 16.64,
    "lineTotal": 66.56
  },
  {
    "menuItemId": 1324,
    "quantity": 2,
    "unitPrice": 9.34,
    "lineTotal": 18.68
  }
]
subtotal
85.24
deliveryFee
4.77
tip
3.81
total
93.82
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/49"
)
food_order = res.json()
{
  "id": 49,
  "userId": 168,
  "restaurantId": 91,
  "items": [
    {
      "menuItemId": 1329,
      "quantity": 4,
      "unitPrice": 16.64,
      "lineTotal": 66.56
    },
    {
      "menuItemId": 1324,
      "quantity": 2,
      "unitPrice": 9.34,
      "lineTotal": 18.68
    }
  ],
  "subtotal": 85.24,
  "deliveryFee": 4.77,
  "tip": 3.81,
  "total": 93.82,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2024-10-01T13:57:58.497Z",
  "deliveredAt": "2024-10-01T16:38:33.331Z"
}
Draftbit