example-data.com

food-orders / #194

userId
Jamil Mayer @jamil.mayer
restaurantId
Marks Inc · East Dena · ★ 4.1
items
[
  {
    "menuItemId": 813,
    "quantity": 3,
    "unitPrice": 70.63,
    "lineTotal": 211.89
  },
  {
    "menuItemId": 812,
    "quantity": 1,
    "unitPrice": 71.08,
    "lineTotal": 71.08
  },
  {
    "menuItemId": 806,
    "quantity": 4,
    "unitPrice": 46.54,
    "lineTotal": 186.16
  }
]
subtotal
469.13
deliveryFee
6.4
tip
1.11
total
476.64
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/194"
)
food_order = res.json()
{
  "id": 194,
  "userId": 233,
  "restaurantId": 54,
  "items": [
    {
      "menuItemId": 813,
      "quantity": 3,
      "unitPrice": 70.63,
      "lineTotal": 211.89
    },
    {
      "menuItemId": 812,
      "quantity": 1,
      "unitPrice": 71.08,
      "lineTotal": 71.08
    },
    {
      "menuItemId": 806,
      "quantity": 4,
      "unitPrice": 46.54,
      "lineTotal": 186.16
    }
  ],
  "subtotal": 469.13,
  "deliveryFee": 6.4,
  "tip": 1.11,
  "total": 476.64,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2024-06-29T15:58:32.429Z",
  "deliveredAt": "2024-06-29T18:43:19.983Z"
}
Draftbit