example-data.com

food-orders / #51

userId
Alexa Rippin @alexa_rippin25
restaurantId
Goldner - Labadie · Kylechester · ★ 3.3
items
[
  {
    "menuItemId": 974,
    "quantity": 2,
    "unitPrice": 76.81,
    "lineTotal": 153.62
  },
  {
    "menuItemId": 987,
    "quantity": 4,
    "unitPrice": 32.67,
    "lineTotal": 130.68
  },
  {
    "menuItemId": 978,
    "quantity": 1,
    "unitPrice": 15.99,
    "lineTotal": 15.99
  }
]
subtotal
300.29
deliveryFee
7.6
tip
2.01
total
309.9
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/51"
)
food_order = res.json()
{
  "id": 51,
  "userId": 235,
  "restaurantId": 65,
  "items": [
    {
      "menuItemId": 974,
      "quantity": 2,
      "unitPrice": 76.81,
      "lineTotal": 153.62
    },
    {
      "menuItemId": 987,
      "quantity": 4,
      "unitPrice": 32.67,
      "lineTotal": 130.68
    },
    {
      "menuItemId": 978,
      "quantity": 1,
      "unitPrice": 15.99,
      "lineTotal": 15.99
    }
  ],
  "subtotal": 300.29,
  "deliveryFee": 7.6,
  "tip": 2.01,
  "total": 309.9,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-04-18T05:51:48.288Z",
  "deliveredAt": "2025-04-18T09:41:39.596Z"
}
Draftbit