example-data.com

food-orders / #200

userId
General Morissette @general_morissette47
restaurantId
Spinka, Runolfsdottir and Brown · Costa Mesa · ★ 3.1
items
[
  {
    "menuItemId": 1268,
    "quantity": 2,
    "unitPrice": 63.73,
    "lineTotal": 127.46
  },
  {
    "menuItemId": 1265,
    "quantity": 2,
    "unitPrice": 58.27,
    "lineTotal": 116.54
  },
  {
    "menuItemId": 1263,
    "quantity": 2,
    "unitPrice": 71.13,
    "lineTotal": 142.26
  },
  {
    "menuItemId": 1267,
    "quantity": 2,
    "unitPrice": 48.13,
    "lineTotal": 96.26
  },
  {
    "menuItemId": 1264,
    "quantity": 2,
    "unitPrice": 25.94,
    "lineTotal": 51.88
  }
]
subtotal
534.4
deliveryFee
3.42
tip
10.27
total
548.09
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/200"
)
food_order = res.json()
{
  "id": 200,
  "userId": 184,
  "restaurantId": 87,
  "items": [
    {
      "menuItemId": 1268,
      "quantity": 2,
      "unitPrice": 63.73,
      "lineTotal": 127.46
    },
    {
      "menuItemId": 1265,
      "quantity": 2,
      "unitPrice": 58.27,
      "lineTotal": 116.54
    },
    {
      "menuItemId": 1263,
      "quantity": 2,
      "unitPrice": 71.13,
      "lineTotal": 142.26
    },
    {
      "menuItemId": 1267,
      "quantity": 2,
      "unitPrice": 48.13,
      "lineTotal": 96.26
    },
    {
      "menuItemId": 1264,
      "quantity": 2,
      "unitPrice": 25.94,
      "lineTotal": 51.88
    }
  ],
  "subtotal": 534.4,
  "deliveryFee": 3.42,
  "tip": 10.27,
  "total": 548.09,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2024-12-05T09:28:23.547Z",
  "deliveredAt": "2024-12-05T10:52:50.316Z"
}
Draftbit