example-data.com

food-orders / #116

userId
Sammy Schmidt @sammy.schmidt
restaurantId
Jaskolski LLC · East Elmira · ★ 4.1
items
[
  {
    "menuItemId": 1127,
    "quantity": 2,
    "unitPrice": 66.54,
    "lineTotal": 133.08
  },
  {
    "menuItemId": 1130,
    "quantity": 2,
    "unitPrice": 44.29,
    "lineTotal": 88.58
  }
]
subtotal
221.66
deliveryFee
0.32
tip
9.77
total
231.75
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/116"
)
food_order = res.json()
{
  "id": 116,
  "userId": 186,
  "restaurantId": 77,
  "items": [
    {
      "menuItemId": 1127,
      "quantity": 2,
      "unitPrice": 66.54,
      "lineTotal": 133.08
    },
    {
      "menuItemId": 1130,
      "quantity": 2,
      "unitPrice": 44.29,
      "lineTotal": 88.58
    }
  ],
  "subtotal": 221.66,
  "deliveryFee": 0.32,
  "tip": 9.77,
  "total": 231.75,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2024-12-05T12:40:44.970Z",
  "deliveredAt": "2024-12-05T15:44:16.085Z"
}
Draftbit