example-data.com

food-orders / #46

userId
Era Mitchell @era.mitchell21
restaurantId
Mills, Kassulke and Marquardt · Jeffersonville · ★ 3.6
items
[
  {
    "menuItemId": 450,
    "quantity": 4,
    "unitPrice": 16.3,
    "lineTotal": 65.2
  },
  {
    "menuItemId": 445,
    "quantity": 3,
    "unitPrice": 49.85,
    "lineTotal": 149.55
  },
  {
    "menuItemId": 449,
    "quantity": 3,
    "unitPrice": 45.27,
    "lineTotal": 135.81
  },
  {
    "menuItemId": 442,
    "quantity": 4,
    "unitPrice": 55.4,
    "lineTotal": 221.6
  }
]
subtotal
572.16
deliveryFee
0.67
tip
5.34
total
578.17
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/46"
)
food_order = res.json()
{
  "id": 46,
  "userId": 243,
  "restaurantId": 30,
  "items": [
    {
      "menuItemId": 450,
      "quantity": 4,
      "unitPrice": 16.3,
      "lineTotal": 65.2
    },
    {
      "menuItemId": 445,
      "quantity": 3,
      "unitPrice": 49.85,
      "lineTotal": 149.55
    },
    {
      "menuItemId": 449,
      "quantity": 3,
      "unitPrice": 45.27,
      "lineTotal": 135.81
    },
    {
      "menuItemId": 442,
      "quantity": 4,
      "unitPrice": 55.4,
      "lineTotal": 221.6
    }
  ],
  "subtotal": 572.16,
  "deliveryFee": 0.67,
  "tip": 5.34,
  "total": 578.17,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2024-08-21T04:05:23.581Z",
  "deliveredAt": "2024-08-21T07:58:06.133Z"
}
Draftbit