example-data.com

food-orders / #15

userId
Cassidy Christiansen @cassidy_christiansen38
restaurantId
Auer, Franey and Nicolas · Lake Kacey · ★ 4.1
items
[
  {
    "menuItemId": 396,
    "quantity": 3,
    "unitPrice": 31.8,
    "lineTotal": 95.4
  },
  {
    "menuItemId": 395,
    "quantity": 2,
    "unitPrice": 65.51,
    "lineTotal": 131.02
  },
  {
    "menuItemId": 399,
    "quantity": 4,
    "unitPrice": 25.49,
    "lineTotal": 101.96
  },
  {
    "menuItemId": 397,
    "quantity": 3,
    "unitPrice": 11.75,
    "lineTotal": 35.25
  },
  {
    "menuItemId": 398,
    "quantity": 3,
    "unitPrice": 24.39,
    "lineTotal": 73.17
  }
]
subtotal
436.8
deliveryFee
7.4
tip
2.04
total
446.24
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/15"
)
food_order = res.json()
{
  "id": 15,
  "userId": 33,
  "restaurantId": 26,
  "items": [
    {
      "menuItemId": 396,
      "quantity": 3,
      "unitPrice": 31.8,
      "lineTotal": 95.4
    },
    {
      "menuItemId": 395,
      "quantity": 2,
      "unitPrice": 65.51,
      "lineTotal": 131.02
    },
    {
      "menuItemId": 399,
      "quantity": 4,
      "unitPrice": 25.49,
      "lineTotal": 101.96
    },
    {
      "menuItemId": 397,
      "quantity": 3,
      "unitPrice": 11.75,
      "lineTotal": 35.25
    },
    {
      "menuItemId": 398,
      "quantity": 3,
      "unitPrice": 24.39,
      "lineTotal": 73.17
    }
  ],
  "subtotal": 436.8,
  "deliveryFee": 7.4,
  "tip": 2.04,
  "total": 446.24,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2024-10-12T07:34:20.892Z",
  "deliveredAt": "2024-10-12T09:41:45.768Z"
}
Draftbit