example-data.com

food-orders / #168

userId
Rosina Larkin @rosina.larkin75
restaurantId
Glover, Hoppe and Quigley · Reynoldscester · ★ 3.8
items
[
  {
    "menuItemId": 1108,
    "quantity": 4,
    "unitPrice": 16.81,
    "lineTotal": 67.24
  },
  {
    "menuItemId": 1111,
    "quantity": 3,
    "unitPrice": 20.6,
    "lineTotal": 61.8
  },
  {
    "menuItemId": 1107,
    "quantity": 1,
    "unitPrice": 27.51,
    "lineTotal": 27.51
  }
]
subtotal
156.55
deliveryFee
6.28
tip
6.7
total
169.53
currency
USD
status
cancelled
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/168"
)
food_order = res.json()
{
  "id": 168,
  "userId": 103,
  "restaurantId": 75,
  "items": [
    {
      "menuItemId": 1108,
      "quantity": 4,
      "unitPrice": 16.81,
      "lineTotal": 67.24
    },
    {
      "menuItemId": 1111,
      "quantity": 3,
      "unitPrice": 20.6,
      "lineTotal": 61.8
    },
    {
      "menuItemId": 1107,
      "quantity": 1,
      "unitPrice": 27.51,
      "lineTotal": 27.51
    }
  ],
  "subtotal": 156.55,
  "deliveryFee": 6.28,
  "tip": 6.7,
  "total": 169.53,
  "currency": "USD",
  "status": "cancelled",
  "placedAt": "2024-11-22T01:52:25.500Z",
  "deliveredAt": null
}
Draftbit