example-data.com
Menu
Browse docs and collections

Overview

food-orders / #475

food-orders #475

userId
Ken Towne @ken.towne
restaurantId
Marks Inc · East Dena · ★ 4.1
items
              [
  {
    "menuItemId": 803,
    "quantity": 3,
    "unitPrice": 26.13,
    "lineTotal": 78.39
  }
]
            
subtotal
78.39
deliveryFee
0.74
tip
9.98
total
89.11
currency
USD
status
preparing
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 475,
  "userId": 248,
  "restaurantId": 54,
  "items": [
    {
      "menuItemId": 803,
      "quantity": 3,
      "unitPrice": 26.13,
      "lineTotal": 78.39
    }
  ],
  "subtotal": 78.39,
  "deliveryFee": 0.74,
  "tip": 9.98,
  "total": 89.11,
  "currency": "USD",
  "status": "preparing",
  "placedAt": "2026-04-20T02:48:15.050Z",
  "deliveredAt": null
}