example-data.com

food-orders / #54

userId
Loren Schmidt @loren_schmidt
restaurantId
Effertz, Langworth and Walsh · Lake Maudiehaven · ★ 2.7
items
[
  {
    "menuItemId": 333,
    "quantity": 2,
    "unitPrice": 59.47,
    "lineTotal": 118.94
  },
  {
    "menuItemId": 332,
    "quantity": 2,
    "unitPrice": 49.4,
    "lineTotal": 98.8
  },
  {
    "menuItemId": 327,
    "quantity": 3,
    "unitPrice": 17.94,
    "lineTotal": 53.82
  }
]
subtotal
271.56
deliveryFee
4.42
tip
5.9
total
281.88
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/54"
)
food_order = res.json()
{
  "id": 54,
  "userId": 222,
  "restaurantId": 21,
  "items": [
    {
      "menuItemId": 333,
      "quantity": 2,
      "unitPrice": 59.47,
      "lineTotal": 118.94
    },
    {
      "menuItemId": 332,
      "quantity": 2,
      "unitPrice": 49.4,
      "lineTotal": 98.8
    },
    {
      "menuItemId": 327,
      "quantity": 3,
      "unitPrice": 17.94,
      "lineTotal": 53.82
    }
  ],
  "subtotal": 271.56,
  "deliveryFee": 4.42,
  "tip": 5.9,
  "total": 281.88,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2025-01-13T00:39:32.786Z",
  "deliveredAt": null
}
Draftbit