example-data.com

food-orders / #37

userId
Candace Mueller @candace.mueller
restaurantId
Huel, Stark and Zulauf · Zoiemouth · ★ 2.7
items
[
  {
    "menuItemId": 1007,
    "quantity": 2,
    "unitPrice": 26.43,
    "lineTotal": 52.86
  },
  {
    "menuItemId": 1006,
    "quantity": 4,
    "unitPrice": 51.33,
    "lineTotal": 205.32
  },
  {
    "menuItemId": 1008,
    "quantity": 4,
    "unitPrice": 25.37,
    "lineTotal": 101.48
  },
  {
    "menuItemId": 1009,
    "quantity": 1,
    "unitPrice": 53.8,
    "lineTotal": 53.8
  }
]
subtotal
413.46
deliveryFee
7.91
tip
10.98
total
432.35
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/37"
)
food_order = res.json()
{
  "id": 37,
  "userId": 75,
  "restaurantId": 67,
  "items": [
    {
      "menuItemId": 1007,
      "quantity": 2,
      "unitPrice": 26.43,
      "lineTotal": 52.86
    },
    {
      "menuItemId": 1006,
      "quantity": 4,
      "unitPrice": 51.33,
      "lineTotal": 205.32
    },
    {
      "menuItemId": 1008,
      "quantity": 4,
      "unitPrice": 25.37,
      "lineTotal": 101.48
    },
    {
      "menuItemId": 1009,
      "quantity": 1,
      "unitPrice": 53.8,
      "lineTotal": 53.8
    }
  ],
  "subtotal": 413.46,
  "deliveryFee": 7.91,
  "tip": 10.98,
  "total": 432.35,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2024-06-19T07:18:31.979Z",
  "deliveredAt": "2024-06-19T09:53:56.203Z"
}
Draftbit