example-data.com

food-orders / #11

userId
Jesse Kiehn @jesse_kiehn92
restaurantId
King - Aufderhar · Barnstable Town · ★ 4.8
items
[
  {
    "menuItemId": 922,
    "quantity": 2,
    "unitPrice": 67.82,
    "lineTotal": 135.64
  },
  {
    "menuItemId": 923,
    "quantity": 4,
    "unitPrice": 73.23,
    "lineTotal": 292.92
  },
  {
    "menuItemId": 920,
    "quantity": 4,
    "unitPrice": 25.58,
    "lineTotal": 102.32
  }
]
subtotal
530.88
deliveryFee
2.05
tip
11.85
total
544.78
currency
USD
status
placed
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/11"
)
food_order = res.json()
{
  "id": 11,
  "userId": 76,
  "restaurantId": 60,
  "items": [
    {
      "menuItemId": 922,
      "quantity": 2,
      "unitPrice": 67.82,
      "lineTotal": 135.64
    },
    {
      "menuItemId": 923,
      "quantity": 4,
      "unitPrice": 73.23,
      "lineTotal": 292.92
    },
    {
      "menuItemId": 920,
      "quantity": 4,
      "unitPrice": 25.58,
      "lineTotal": 102.32
    }
  ],
  "subtotal": 530.88,
  "deliveryFee": 2.05,
  "tip": 11.85,
  "total": 544.78,
  "currency": "USD",
  "status": "placed",
  "placedAt": "2024-08-01T08:35:43.138Z",
  "deliveredAt": null
}
Draftbit