example-data.com

food-orders / #16

userId
Simeon Heathcote @simeon_heathcote75
restaurantId
Stroman - Wolf · Hoboken · ★ 3.7
items
[
  {
    "menuItemId": 569,
    "quantity": 4,
    "unitPrice": 24.94,
    "lineTotal": 99.76
  },
  {
    "menuItemId": 571,
    "quantity": 2,
    "unitPrice": 33.01,
    "lineTotal": 66.02
  },
  {
    "menuItemId": 574,
    "quantity": 1,
    "unitPrice": 8.52,
    "lineTotal": 8.52
  },
  {
    "menuItemId": 576,
    "quantity": 2,
    "unitPrice": 30.55,
    "lineTotal": 61.1
  }
]
subtotal
235.4
deliveryFee
6.58
tip
6.23
total
248.21
currency
USD
status
placed
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/16"
)
food_order = res.json()
{
  "id": 16,
  "userId": 224,
  "restaurantId": 39,
  "items": [
    {
      "menuItemId": 569,
      "quantity": 4,
      "unitPrice": 24.94,
      "lineTotal": 99.76
    },
    {
      "menuItemId": 571,
      "quantity": 2,
      "unitPrice": 33.01,
      "lineTotal": 66.02
    },
    {
      "menuItemId": 574,
      "quantity": 1,
      "unitPrice": 8.52,
      "lineTotal": 8.52
    },
    {
      "menuItemId": 576,
      "quantity": 2,
      "unitPrice": 30.55,
      "lineTotal": 61.1
    }
  ],
  "subtotal": 235.4,
  "deliveryFee": 6.58,
  "tip": 6.23,
  "total": 248.21,
  "currency": "USD",
  "status": "placed",
  "placedAt": "2024-06-13T18:16:47.063Z",
  "deliveredAt": null
}
Draftbit