example-data.com

food-orders / #157

userId
Jabari Farrell @jabari_farrell75
restaurantId
Hudson - Lueilwitz · South Lesliefurt · ★ 4.9
items
[
  {
    "menuItemId": 579,
    "quantity": 2,
    "unitPrice": 17.49,
    "lineTotal": 34.98
  },
  {
    "menuItemId": 578,
    "quantity": 4,
    "unitPrice": 66.39,
    "lineTotal": 265.56
  },
  {
    "menuItemId": 580,
    "quantity": 4,
    "unitPrice": 18.03,
    "lineTotal": 72.12
  },
  {
    "menuItemId": 583,
    "quantity": 3,
    "unitPrice": 49.02,
    "lineTotal": 147.06
  },
  {
    "menuItemId": 581,
    "quantity": 1,
    "unitPrice": 13.34,
    "lineTotal": 13.34
  }
]
subtotal
533.06
deliveryFee
6.3
tip
10.47
total
549.83
currency
USD
status
cancelled
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/157"
)
food_order = res.json()
{
  "id": 157,
  "userId": 240,
  "restaurantId": 40,
  "items": [
    {
      "menuItemId": 579,
      "quantity": 2,
      "unitPrice": 17.49,
      "lineTotal": 34.98
    },
    {
      "menuItemId": 578,
      "quantity": 4,
      "unitPrice": 66.39,
      "lineTotal": 265.56
    },
    {
      "menuItemId": 580,
      "quantity": 4,
      "unitPrice": 18.03,
      "lineTotal": 72.12
    },
    {
      "menuItemId": 583,
      "quantity": 3,
      "unitPrice": 49.02,
      "lineTotal": 147.06
    },
    {
      "menuItemId": 581,
      "quantity": 1,
      "unitPrice": 13.34,
      "lineTotal": 13.34
    }
  ],
  "subtotal": 533.06,
  "deliveryFee": 6.3,
  "tip": 10.47,
  "total": 549.83,
  "currency": "USD",
  "status": "cancelled",
  "placedAt": "2024-08-27T06:52:31.786Z",
  "deliveredAt": null
}
Draftbit