example-data.com

food-orders / #83

userId
Phyllis Hyatt @phyllis_hyatt83
restaurantId
Gulgowski, Terry and Funk · North Stephaniefort · ★ 4.9
items
[
  {
    "menuItemId": 650,
    "quantity": 2,
    "unitPrice": 51,
    "lineTotal": 102
  },
  {
    "menuItemId": 658,
    "quantity": 4,
    "unitPrice": 28.13,
    "lineTotal": 112.52
  },
  {
    "menuItemId": 639,
    "quantity": 1,
    "unitPrice": 39.16,
    "lineTotal": 39.16
  }
]
subtotal
253.68
deliveryFee
1.15
tip
5.97
total
260.8
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/83"
)
food_order = res.json()
{
  "id": 83,
  "userId": 84,
  "restaurantId": 44,
  "items": [
    {
      "menuItemId": 650,
      "quantity": 2,
      "unitPrice": 51,
      "lineTotal": 102
    },
    {
      "menuItemId": 658,
      "quantity": 4,
      "unitPrice": 28.13,
      "lineTotal": 112.52
    },
    {
      "menuItemId": 639,
      "quantity": 1,
      "unitPrice": 39.16,
      "lineTotal": 39.16
    }
  ],
  "subtotal": 253.68,
  "deliveryFee": 1.15,
  "tip": 5.97,
  "total": 260.8,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2024-12-06T17:02:25.729Z",
  "deliveredAt": "2024-12-06T19:57:15.345Z"
}
Draftbit