example-data.com

food-orders / #150

userId
Tillman Breitenberg @tillman_breitenberg54
restaurantId
Gulgowski, Terry and Funk · North Stephaniefort · ★ 4.9
items
[
  {
    "menuItemId": 655,
    "quantity": 3,
    "unitPrice": 43.69,
    "lineTotal": 131.07
  },
  {
    "menuItemId": 647,
    "quantity": 2,
    "unitPrice": 12.05,
    "lineTotal": 24.1
  },
  {
    "menuItemId": 652,
    "quantity": 1,
    "unitPrice": 37.93,
    "lineTotal": 37.93
  },
  {
    "menuItemId": 661,
    "quantity": 4,
    "unitPrice": 31.86,
    "lineTotal": 127.44
  },
  {
    "menuItemId": 644,
    "quantity": 4,
    "unitPrice": 45.49,
    "lineTotal": 181.96
  }
]
subtotal
502.5
deliveryFee
3.85
tip
1.42
total
507.77
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/150"
)
food_order = res.json()
{
  "id": 150,
  "userId": 145,
  "restaurantId": 44,
  "items": [
    {
      "menuItemId": 655,
      "quantity": 3,
      "unitPrice": 43.69,
      "lineTotal": 131.07
    },
    {
      "menuItemId": 647,
      "quantity": 2,
      "unitPrice": 12.05,
      "lineTotal": 24.1
    },
    {
      "menuItemId": 652,
      "quantity": 1,
      "unitPrice": 37.93,
      "lineTotal": 37.93
    },
    {
      "menuItemId": 661,
      "quantity": 4,
      "unitPrice": 31.86,
      "lineTotal": 127.44
    },
    {
      "menuItemId": 644,
      "quantity": 4,
      "unitPrice": 45.49,
      "lineTotal": 181.96
    }
  ],
  "subtotal": 502.5,
  "deliveryFee": 3.85,
  "tip": 1.42,
  "total": 507.77,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2024-11-20T00:46:51.134Z",
  "deliveredAt": "2024-11-20T02:24:38.663Z"
}
Draftbit