example-data.com

food-orders / #183

userId
Virginie O'Connell @virginie.oconnell55
restaurantId
Trantow - Jerde · Zaneberg · ★ 2.7
items
[
  {
    "menuItemId": 436,
    "quantity": 3,
    "unitPrice": 69.78,
    "lineTotal": 209.34
  },
  {
    "menuItemId": 429,
    "quantity": 3,
    "unitPrice": 68.98,
    "lineTotal": 206.94
  },
  {
    "menuItemId": 440,
    "quantity": 4,
    "unitPrice": 35.27,
    "lineTotal": 141.08
  }
]
subtotal
557.36
deliveryFee
4.65
tip
1.78
total
563.79
currency
USD
status
cancelled
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/183"
)
food_order = res.json()
{
  "id": 183,
  "userId": 70,
  "restaurantId": 29,
  "items": [
    {
      "menuItemId": 436,
      "quantity": 3,
      "unitPrice": 69.78,
      "lineTotal": 209.34
    },
    {
      "menuItemId": 429,
      "quantity": 3,
      "unitPrice": 68.98,
      "lineTotal": 206.94
    },
    {
      "menuItemId": 440,
      "quantity": 4,
      "unitPrice": 35.27,
      "lineTotal": 141.08
    }
  ],
  "subtotal": 557.36,
  "deliveryFee": 4.65,
  "tip": 1.78,
  "total": 563.79,
  "currency": "USD",
  "status": "cancelled",
  "placedAt": "2024-11-11T03:28:16.756Z",
  "deliveredAt": null
}
Draftbit