example-data.com

food-orders / #184

userId
Brock Hackett @brock.hackett
restaurantId
Walker - Botsford · Zulaufburgh · ★ 3.7
items
[
  {
    "menuItemId": 479,
    "quantity": 3,
    "unitPrice": 40.31,
    "lineTotal": 120.93
  },
  {
    "menuItemId": 477,
    "quantity": 4,
    "unitPrice": 68.24,
    "lineTotal": 272.96
  },
  {
    "menuItemId": 480,
    "quantity": 3,
    "unitPrice": 66.92,
    "lineTotal": 200.76
  },
  {
    "menuItemId": 478,
    "quantity": 4,
    "unitPrice": 27.27,
    "lineTotal": 109.08
  },
  {
    "menuItemId": 481,
    "quantity": 2,
    "unitPrice": 32.94,
    "lineTotal": 65.88
  }
]
subtotal
769.61
deliveryFee
1.93
tip
2.6
total
774.14
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/184"
)
food_order = res.json()
{
  "id": 184,
  "userId": 161,
  "restaurantId": 32,
  "items": [
    {
      "menuItemId": 479,
      "quantity": 3,
      "unitPrice": 40.31,
      "lineTotal": 120.93
    },
    {
      "menuItemId": 477,
      "quantity": 4,
      "unitPrice": 68.24,
      "lineTotal": 272.96
    },
    {
      "menuItemId": 480,
      "quantity": 3,
      "unitPrice": 66.92,
      "lineTotal": 200.76
    },
    {
      "menuItemId": 478,
      "quantity": 4,
      "unitPrice": 27.27,
      "lineTotal": 109.08
    },
    {
      "menuItemId": 481,
      "quantity": 2,
      "unitPrice": 32.94,
      "lineTotal": 65.88
    }
  ],
  "subtotal": 769.61,
  "deliveryFee": 1.93,
  "tip": 2.6,
  "total": 774.14,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2024-06-22T07:06:40.464Z",
  "deliveredAt": null
}
Draftbit