example-data.com

food-orders / #32

userId
Lamont Huel @lamont.huel
restaurantId
Harber, Wolf and Reynolds · Providencifurt · ★ 4.5
items
[
  {
    "menuItemId": 32,
    "quantity": 3,
    "unitPrice": 48.94,
    "lineTotal": 146.82
  },
  {
    "menuItemId": 35,
    "quantity": 1,
    "unitPrice": 35.98,
    "lineTotal": 35.98
  },
  {
    "menuItemId": 30,
    "quantity": 2,
    "unitPrice": 76.01,
    "lineTotal": 152.02
  },
  {
    "menuItemId": 36,
    "quantity": 4,
    "unitPrice": 20.66,
    "lineTotal": 82.64
  },
  {
    "menuItemId": 33,
    "quantity": 3,
    "unitPrice": 28.94,
    "lineTotal": 86.82
  }
]
subtotal
504.28
deliveryFee
2.1
tip
8.9
total
515.28
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/32"
)
food_order = res.json()
{
  "id": 32,
  "userId": 69,
  "restaurantId": 3,
  "items": [
    {
      "menuItemId": 32,
      "quantity": 3,
      "unitPrice": 48.94,
      "lineTotal": 146.82
    },
    {
      "menuItemId": 35,
      "quantity": 1,
      "unitPrice": 35.98,
      "lineTotal": 35.98
    },
    {
      "menuItemId": 30,
      "quantity": 2,
      "unitPrice": 76.01,
      "lineTotal": 152.02
    },
    {
      "menuItemId": 36,
      "quantity": 4,
      "unitPrice": 20.66,
      "lineTotal": 82.64
    },
    {
      "menuItemId": 33,
      "quantity": 3,
      "unitPrice": 28.94,
      "lineTotal": 86.82
    }
  ],
  "subtotal": 504.28,
  "deliveryFee": 2.1,
  "tip": 8.9,
  "total": 515.28,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2024-10-02T05:42:46.247Z",
  "deliveredAt": null
}
Draftbit