example-data.com

food-orders / #7

userId
Maryam Kunze @maryam_kunze
restaurantId
Pouros, O'Reilly and Block · Lake Chandler · ★ 3.5
items
[
  {
    "menuItemId": 703,
    "quantity": 1,
    "unitPrice": 48.53,
    "lineTotal": 48.53
  },
  {
    "menuItemId": 724,
    "quantity": 3,
    "unitPrice": 73.54,
    "lineTotal": 220.62
  },
  {
    "menuItemId": 705,
    "quantity": 2,
    "unitPrice": 49.17,
    "lineTotal": 98.34
  }
]
subtotal
367.49
deliveryFee
0.41
tip
11.17
total
379.07
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/7"
)
food_order = res.json()
{
  "id": 7,
  "userId": 195,
  "restaurantId": 47,
  "items": [
    {
      "menuItemId": 703,
      "quantity": 1,
      "unitPrice": 48.53,
      "lineTotal": 48.53
    },
    {
      "menuItemId": 724,
      "quantity": 3,
      "unitPrice": 73.54,
      "lineTotal": 220.62
    },
    {
      "menuItemId": 705,
      "quantity": 2,
      "unitPrice": 49.17,
      "lineTotal": 98.34
    }
  ],
  "subtotal": 367.49,
  "deliveryFee": 0.41,
  "tip": 11.17,
  "total": 379.07,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2024-11-04T04:54:09.974Z",
  "deliveredAt": "2024-11-04T08:10:31.321Z"
}
Draftbit