example-data.com
Menu
Browse docs and collections

Overview

food-orders / #458

food-orders #458

userId
Jolie Abernathy @jolie_abernathy33
restaurantId
Mills, Kassulke and Marquardt · Jeffersonville · ★ 3.6
items
              [
  {
    "menuItemId": 451,
    "quantity": 2,
    "unitPrice": 15.67,
    "lineTotal": 31.34
  },
  {
    "menuItemId": 448,
    "quantity": 3,
    "unitPrice": 72.84,
    "lineTotal": 218.52
  },
  {
    "menuItemId": 444,
    "quantity": 3,
    "unitPrice": 24.4,
    "lineTotal": 73.2
  }
]
            
subtotal
323.06
deliveryFee
4.59
tip
7.29
total
334.94
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/food-orders/458" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/food-orders/458"
);
const foodOrder = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/food-orders.d.ts https://example-data.com/types/food-orders.d.ts
import type { FoodOrder } from "./types/food-orders";

const res = await fetch(
  "https://example-data.com/api/v1/food-orders/458"
);
const foodOrder = (await res.json()) as FoodOrder;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/food-orders/458"
)
food_order = res.json()

Response

{
  "id": 458,
  "userId": 50,
  "restaurantId": 30,
  "items": [
    {
      "menuItemId": 451,
      "quantity": 2,
      "unitPrice": 15.67,
      "lineTotal": 31.34
    },
    {
      "menuItemId": 448,
      "quantity": 3,
      "unitPrice": 72.84,
      "lineTotal": 218.52
    },
    {
      "menuItemId": 444,
      "quantity": 3,
      "unitPrice": 24.4,
      "lineTotal": 73.2
    }
  ],
  "subtotal": 323.06,
  "deliveryFee": 4.59,
  "tip": 7.29,
  "total": 334.94,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-12-18T04:19:46.205Z",
  "deliveredAt": "2025-12-18T08:14:00.655Z"
}