example-data.com

food-orders / #93

userId
General Morissette @general_morissette47
restaurantId
Gerhold - Dietrich · North Joshua · ★ 4.9
items
[
  {
    "menuItemId": 949,
    "quantity": 3,
    "unitPrice": 24.93,
    "lineTotal": 74.79
  },
  {
    "menuItemId": 960,
    "quantity": 2,
    "unitPrice": 48.69,
    "lineTotal": 97.38
  },
  {
    "menuItemId": 947,
    "quantity": 3,
    "unitPrice": 74.6,
    "lineTotal": 223.8
  },
  {
    "menuItemId": 945,
    "quantity": 3,
    "unitPrice": 53.91,
    "lineTotal": 161.73
  }
]
subtotal
557.7
deliveryFee
1.2
tip
1.48
total
560.38
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/93"
)
food_order = res.json()
{
  "id": 93,
  "userId": 184,
  "restaurantId": 63,
  "items": [
    {
      "menuItemId": 949,
      "quantity": 3,
      "unitPrice": 24.93,
      "lineTotal": 74.79
    },
    {
      "menuItemId": 960,
      "quantity": 2,
      "unitPrice": 48.69,
      "lineTotal": 97.38
    },
    {
      "menuItemId": 947,
      "quantity": 3,
      "unitPrice": 74.6,
      "lineTotal": 223.8
    },
    {
      "menuItemId": 945,
      "quantity": 3,
      "unitPrice": 53.91,
      "lineTotal": 161.73
    }
  ],
  "subtotal": 557.7,
  "deliveryFee": 1.2,
  "tip": 1.48,
  "total": 560.38,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2024-07-26T07:55:43.837Z",
  "deliveredAt": "2024-07-26T10:17:48.934Z"
}
Draftbit