example-data.com

food-orders / #1

userId
Roberta Mueller-Yundt @roberta_mueller-yundt
restaurantId
Medhurst, Effertz and Brown · Franeckiburgh · ★ 3.2
items
[
  {
    "menuItemId": 1146,
    "quantity": 2,
    "unitPrice": 37.77,
    "lineTotal": 75.54
  },
  {
    "menuItemId": 1143,
    "quantity": 2,
    "unitPrice": 15.09,
    "lineTotal": 30.18
  }
]
subtotal
105.72
deliveryFee
5.19
tip
10.31
total
121.22
currency
USD
status
placed
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/1"
)
food_order = res.json()
{
  "id": 1,
  "userId": 162,
  "restaurantId": 78,
  "items": [
    {
      "menuItemId": 1146,
      "quantity": 2,
      "unitPrice": 37.77,
      "lineTotal": 75.54
    },
    {
      "menuItemId": 1143,
      "quantity": 2,
      "unitPrice": 15.09,
      "lineTotal": 30.18
    }
  ],
  "subtotal": 105.72,
  "deliveryFee": 5.19,
  "tip": 10.31,
  "total": 121.22,
  "currency": "USD",
  "status": "placed",
  "placedAt": "2024-06-15T20:59:09.714Z",
  "deliveredAt": null
}
Draftbit