example-data.com

food-orders / #217

userId
Perry Kerluke @perry_kerluke83
restaurantId
Kertzmann - Boyer · Chicago · ★ 4.1
items
[
  {
    "menuItemId": 1313,
    "quantity": 1,
    "unitPrice": 11.71,
    "lineTotal": 11.71
  },
  {
    "menuItemId": 1295,
    "quantity": 1,
    "unitPrice": 69.87,
    "lineTotal": 69.87
  },
  {
    "menuItemId": 1302,
    "quantity": 4,
    "unitPrice": 51.25,
    "lineTotal": 205
  }
]
subtotal
286.58
deliveryFee
4.07
tip
0.5
total
291.15
currency
USD
status
preparing
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/217"
)
food_order = res.json()
{
  "id": 217,
  "userId": 174,
  "restaurantId": 90,
  "items": [
    {
      "menuItemId": 1313,
      "quantity": 1,
      "unitPrice": 11.71,
      "lineTotal": 11.71
    },
    {
      "menuItemId": 1295,
      "quantity": 1,
      "unitPrice": 69.87,
      "lineTotal": 69.87
    },
    {
      "menuItemId": 1302,
      "quantity": 4,
      "unitPrice": 51.25,
      "lineTotal": 205
    }
  ],
  "subtotal": 286.58,
  "deliveryFee": 4.07,
  "tip": 0.5,
  "total": 291.15,
  "currency": "USD",
  "status": "preparing",
  "placedAt": "2024-08-30T19:17:15.112Z",
  "deliveredAt": null
}
Draftbit