example-data.com

food-orders / #85

userId
Nikko Kuhlman @nikko_kuhlman
restaurantId
D'Amore, Quitzon and Satterfield · Bruenberg · ★ 4.6
items
[
  {
    "menuItemId": 513,
    "quantity": 4,
    "unitPrice": 74.29,
    "lineTotal": 297.16
  },
  {
    "menuItemId": 514,
    "quantity": 2,
    "unitPrice": 77.2,
    "lineTotal": 154.4
  },
  {
    "menuItemId": 500,
    "quantity": 2,
    "unitPrice": 11.73,
    "lineTotal": 23.46
  }
]
subtotal
475.02
deliveryFee
5.61
tip
3.14
total
483.77
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/85"
)
food_order = res.json()
{
  "id": 85,
  "userId": 122,
  "restaurantId": 34,
  "items": [
    {
      "menuItemId": 513,
      "quantity": 4,
      "unitPrice": 74.29,
      "lineTotal": 297.16
    },
    {
      "menuItemId": 514,
      "quantity": 2,
      "unitPrice": 77.2,
      "lineTotal": 154.4
    },
    {
      "menuItemId": 500,
      "quantity": 2,
      "unitPrice": 11.73,
      "lineTotal": 23.46
    }
  ],
  "subtotal": 475.02,
  "deliveryFee": 5.61,
  "tip": 3.14,
  "total": 483.77,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2024-12-28T11:40:47.208Z",
  "deliveredAt": "2024-12-28T14:41:56.398Z"
}
Draftbit