example-data.com

food-orders / #96

userId
Maryam Kunze @maryam_kunze
restaurantId
Rogahn - Kreiger · South Cathrynside · ★ 4.6
items
[
  {
    "menuItemId": 1218,
    "quantity": 2,
    "unitPrice": 41.46,
    "lineTotal": 82.92
  },
  {
    "menuItemId": 1208,
    "quantity": 2,
    "unitPrice": 18.29,
    "lineTotal": 36.58
  },
  {
    "menuItemId": 1215,
    "quantity": 4,
    "unitPrice": 53.02,
    "lineTotal": 212.08
  },
  {
    "menuItemId": 1211,
    "quantity": 2,
    "unitPrice": 9.51,
    "lineTotal": 19.02
  },
  {
    "menuItemId": 1209,
    "quantity": 4,
    "unitPrice": 45.24,
    "lineTotal": 180.96
  }
]
subtotal
531.56
deliveryFee
4.58
tip
10.07
total
546.21
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

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

res = requests.get(
    "https://example-data.com/api/v1/food-orders/96"
)
food_order = res.json()
{
  "id": 96,
  "userId": 195,
  "restaurantId": 82,
  "items": [
    {
      "menuItemId": 1218,
      "quantity": 2,
      "unitPrice": 41.46,
      "lineTotal": 82.92
    },
    {
      "menuItemId": 1208,
      "quantity": 2,
      "unitPrice": 18.29,
      "lineTotal": 36.58
    },
    {
      "menuItemId": 1215,
      "quantity": 4,
      "unitPrice": 53.02,
      "lineTotal": 212.08
    },
    {
      "menuItemId": 1211,
      "quantity": 2,
      "unitPrice": 9.51,
      "lineTotal": 19.02
    },
    {
      "menuItemId": 1209,
      "quantity": 4,
      "unitPrice": 45.24,
      "lineTotal": 180.96
    }
  ],
  "subtotal": 531.56,
  "deliveryFee": 4.58,
  "tip": 10.07,
  "total": 546.21,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2024-06-08T19:36:03.707Z",
  "deliveredAt": null
}
Draftbit