example-data.com

food-orders / #205

userId
Theresia Collins @theresia_collins86
restaurantId
Huel, Stark and Zulauf · Zoiemouth · ★ 2.7
items
[
  {
    "menuItemId": 1006,
    "quantity": 4,
    "unitPrice": 51.33,
    "lineTotal": 205.32
  },
  {
    "menuItemId": 1009,
    "quantity": 3,
    "unitPrice": 53.8,
    "lineTotal": 161.4
  },
  {
    "menuItemId": 1003,
    "quantity": 1,
    "unitPrice": 28.8,
    "lineTotal": 28.8
  },
  {
    "menuItemId": 1007,
    "quantity": 3,
    "unitPrice": 26.43,
    "lineTotal": 79.29
  },
  {
    "menuItemId": 1008,
    "quantity": 2,
    "unitPrice": 25.37,
    "lineTotal": 50.74
  }
]
subtotal
525.55
deliveryFee
5.46
tip
9.19
total
540.2
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/205"
)
food_order = res.json()
{
  "id": 205,
  "userId": 63,
  "restaurantId": 67,
  "items": [
    {
      "menuItemId": 1006,
      "quantity": 4,
      "unitPrice": 51.33,
      "lineTotal": 205.32
    },
    {
      "menuItemId": 1009,
      "quantity": 3,
      "unitPrice": 53.8,
      "lineTotal": 161.4
    },
    {
      "menuItemId": 1003,
      "quantity": 1,
      "unitPrice": 28.8,
      "lineTotal": 28.8
    },
    {
      "menuItemId": 1007,
      "quantity": 3,
      "unitPrice": 26.43,
      "lineTotal": 79.29
    },
    {
      "menuItemId": 1008,
      "quantity": 2,
      "unitPrice": 25.37,
      "lineTotal": 50.74
    }
  ],
  "subtotal": 525.55,
  "deliveryFee": 5.46,
  "tip": 9.19,
  "total": 540.2,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2024-07-01T05:51:08.373Z",
  "deliveredAt": "2024-07-01T07:39:23.644Z"
}
Draftbit