example-data.com

food-orders / #160

userId
Lazaro Herzog @lazaro_herzog
restaurantId
Hills Group · North Jaylincester · ★ 2.5
items
[
  {
    "menuItemId": 968,
    "quantity": 2,
    "unitPrice": 53.18,
    "lineTotal": 106.36
  },
  {
    "menuItemId": 966,
    "quantity": 2,
    "unitPrice": 30.7,
    "lineTotal": 61.4
  }
]
subtotal
167.76
deliveryFee
0.16
tip
10.03
total
177.95
currency
USD
status
placed
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/160"
)
food_order = res.json()
{
  "id": 160,
  "userId": 181,
  "restaurantId": 64,
  "items": [
    {
      "menuItemId": 968,
      "quantity": 2,
      "unitPrice": 53.18,
      "lineTotal": 106.36
    },
    {
      "menuItemId": 966,
      "quantity": 2,
      "unitPrice": 30.7,
      "lineTotal": 61.4
    }
  ],
  "subtotal": 167.76,
  "deliveryFee": 0.16,
  "tip": 10.03,
  "total": 177.95,
  "currency": "USD",
  "status": "placed",
  "placedAt": "2024-09-23T11:07:08.168Z",
  "deliveredAt": null
}
Draftbit