example-data.com

food-orders / #19

userId
Phyllis Hyatt @phyllis_hyatt83
restaurantId
Goldner - Labadie · Kylechester · ★ 3.3
items
[
  {
    "menuItemId": 972,
    "quantity": 2,
    "unitPrice": 5.47,
    "lineTotal": 10.94
  },
  {
    "menuItemId": 976,
    "quantity": 1,
    "unitPrice": 38.67,
    "lineTotal": 38.67
  },
  {
    "menuItemId": 973,
    "quantity": 2,
    "unitPrice": 78.69,
    "lineTotal": 157.38
  }
]
subtotal
206.99
deliveryFee
5.98
tip
10.68
total
223.65
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/19"
)
food_order = res.json()
{
  "id": 19,
  "userId": 84,
  "restaurantId": 65,
  "items": [
    {
      "menuItemId": 972,
      "quantity": 2,
      "unitPrice": 5.47,
      "lineTotal": 10.94
    },
    {
      "menuItemId": 976,
      "quantity": 1,
      "unitPrice": 38.67,
      "lineTotal": 38.67
    },
    {
      "menuItemId": 973,
      "quantity": 2,
      "unitPrice": 78.69,
      "lineTotal": 157.38
    }
  ],
  "subtotal": 206.99,
  "deliveryFee": 5.98,
  "tip": 10.68,
  "total": 223.65,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2024-10-28T18:54:44.500Z",
  "deliveredAt": "2024-10-28T22:21:51.255Z"
}
Draftbit