example-data.com

food-orders / #13

userId
Norbert Jacobi @norbert_jacobi92
restaurantId
Franey, Volkman and Kutch · Piercecester · ★ 3.5
items
[
  {
    "menuItemId": 592,
    "quantity": 3,
    "unitPrice": 62.49,
    "lineTotal": 187.47
  },
  {
    "menuItemId": 591,
    "quantity": 4,
    "unitPrice": 53.05,
    "lineTotal": 212.2
  },
  {
    "menuItemId": 586,
    "quantity": 1,
    "unitPrice": 44.85,
    "lineTotal": 44.85
  },
  {
    "menuItemId": 590,
    "quantity": 1,
    "unitPrice": 78.98,
    "lineTotal": 78.98
  }
]
subtotal
523.5
deliveryFee
5.55
tip
7.89
total
536.94
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/13"
)
food_order = res.json()
{
  "id": 13,
  "userId": 101,
  "restaurantId": 41,
  "items": [
    {
      "menuItemId": 592,
      "quantity": 3,
      "unitPrice": 62.49,
      "lineTotal": 187.47
    },
    {
      "menuItemId": 591,
      "quantity": 4,
      "unitPrice": 53.05,
      "lineTotal": 212.2
    },
    {
      "menuItemId": 586,
      "quantity": 1,
      "unitPrice": 44.85,
      "lineTotal": 44.85
    },
    {
      "menuItemId": 590,
      "quantity": 1,
      "unitPrice": 78.98,
      "lineTotal": 78.98
    }
  ],
  "subtotal": 523.5,
  "deliveryFee": 5.55,
  "tip": 7.89,
  "total": 536.94,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2024-05-31T00:28:32.149Z",
  "deliveredAt": "2024-05-31T03:12:39.488Z"
}
Draftbit