example-data.com

food-orders / #12

userId
Jennifer Stoltenberg @jennifer_stoltenberg
restaurantId
Hauck, Larson and West · Port Shayna · ★ 4.4
items
[
  {
    "menuItemId": 1093,
    "quantity": 3,
    "unitPrice": 30.64,
    "lineTotal": 91.92
  },
  {
    "menuItemId": 1092,
    "quantity": 2,
    "unitPrice": 62.5,
    "lineTotal": 125
  }
]
subtotal
216.92
deliveryFee
3.48
tip
5.53
total
225.93
currency
USD
status
placed
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/12"
)
food_order = res.json()
{
  "id": 12,
  "userId": 25,
  "restaurantId": 73,
  "items": [
    {
      "menuItemId": 1093,
      "quantity": 3,
      "unitPrice": 30.64,
      "lineTotal": 91.92
    },
    {
      "menuItemId": 1092,
      "quantity": 2,
      "unitPrice": 62.5,
      "lineTotal": 125
    }
  ],
  "subtotal": 216.92,
  "deliveryFee": 3.48,
  "tip": 5.53,
  "total": 225.93,
  "currency": "USD",
  "status": "placed",
  "placedAt": "2024-10-16T18:13:14.633Z",
  "deliveredAt": null
}
Draftbit