example-data.com

food-orders / #18

userId
Anne Hamill @anne_hamill75
restaurantId
Rutherford - Mosciski · Feestport · ★ 4.8
items
[
  {
    "menuItemId": 202,
    "quantity": 1,
    "unitPrice": 67.75,
    "lineTotal": 67.75
  }
]
subtotal
67.75
deliveryFee
7.08
tip
1.62
total
76.45
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/18"
)
food_order = res.json()
{
  "id": 18,
  "userId": 9,
  "restaurantId": 15,
  "items": [
    {
      "menuItemId": 202,
      "quantity": 1,
      "unitPrice": 67.75,
      "lineTotal": 67.75
    }
  ],
  "subtotal": 67.75,
  "deliveryFee": 7.08,
  "tip": 1.62,
  "total": 76.45,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2024-07-10T13:22:18.961Z",
  "deliveredAt": "2024-07-10T14:41:49.637Z"
}
Draftbit