example-data.com

food-orders / #56

userId
Alexander Beahan @alexander.beahan57
restaurantId
Aufderhar - Johns · East Lorenside · ★ 4.5
items
[
  {
    "menuItemId": 1417,
    "quantity": 1,
    "unitPrice": 20.71,
    "lineTotal": 20.71
  },
  {
    "menuItemId": 1430,
    "quantity": 4,
    "unitPrice": 27.65,
    "lineTotal": 110.6
  }
]
subtotal
131.31
deliveryFee
5.21
tip
7.17
total
143.69
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/56"
)
food_order = res.json()
{
  "id": 56,
  "userId": 169,
  "restaurantId": 98,
  "items": [
    {
      "menuItemId": 1417,
      "quantity": 1,
      "unitPrice": 20.71,
      "lineTotal": 20.71
    },
    {
      "menuItemId": 1430,
      "quantity": 4,
      "unitPrice": 27.65,
      "lineTotal": 110.6
    }
  ],
  "subtotal": 131.31,
  "deliveryFee": 5.21,
  "tip": 7.17,
  "total": 143.69,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2024-05-31T23:37:04.082Z",
  "deliveredAt": null
}
Draftbit