example-data.com

food-orders / #61

userId
Einar Volkman @einar_volkman69
restaurantId
Mohr - Harvey · South Kayachester · ★ 4.8
items
[
  {
    "menuItemId": 236,
    "quantity": 4,
    "unitPrice": 20.99,
    "lineTotal": 83.96
  },
  {
    "menuItemId": 238,
    "quantity": 4,
    "unitPrice": 19.42,
    "lineTotal": 77.68
  },
  {
    "menuItemId": 241,
    "quantity": 3,
    "unitPrice": 74.46,
    "lineTotal": 223.38
  }
]
subtotal
385.02
deliveryFee
5.89
tip
0.68
total
391.59
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/61"
)
food_order = res.json()
{
  "id": 61,
  "userId": 7,
  "restaurantId": 16,
  "items": [
    {
      "menuItemId": 236,
      "quantity": 4,
      "unitPrice": 20.99,
      "lineTotal": 83.96
    },
    {
      "menuItemId": 238,
      "quantity": 4,
      "unitPrice": 19.42,
      "lineTotal": 77.68
    },
    {
      "menuItemId": 241,
      "quantity": 3,
      "unitPrice": 74.46,
      "lineTotal": 223.38
    }
  ],
  "subtotal": 385.02,
  "deliveryFee": 5.89,
  "tip": 0.68,
  "total": 391.59,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2024-10-04T16:37:07.005Z",
  "deliveredAt": "2024-10-04T18:05:12.799Z"
}
Draftbit