example-data.com
Menu
Browse docs and collections

Overview

food-orders / #489

food-orders #489

userId
Adan Weber @adan.weber61
restaurantId
Schoen, Cole and Bauch · Thompsonberg · ★ 3.1
items
              [
  {
    "menuItemId": 459,
    "quantity": 3,
    "unitPrice": 41,
    "lineTotal": 123
  },
  {
    "menuItemId": 467,
    "quantity": 4,
    "unitPrice": 68.16,
    "lineTotal": 272.64
  }
]
            
subtotal
395.64
deliveryFee
1.6
tip
3.53
total
400.77
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/food-orders/489"
);
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/489"
);
const foodOrder = (await res.json()) as FoodOrder;

Python example

import requests

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

Response

{
  "id": 489,
  "userId": 155,
  "restaurantId": 31,
  "items": [
    {
      "menuItemId": 459,
      "quantity": 3,
      "unitPrice": 41,
      "lineTotal": 123
    },
    {
      "menuItemId": 467,
      "quantity": 4,
      "unitPrice": 68.16,
      "lineTotal": 272.64
    }
  ],
  "subtotal": 395.64,
  "deliveryFee": 1.6,
  "tip": 3.53,
  "total": 400.77,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-11-06T09:35:21.673Z",
  "deliveredAt": "2025-11-06T11:18:02.767Z"
}