example-data.com
Menu
Browse docs and collections

Overview

food-orders / #291

food-orders #291

userId
Van Crona @van_crona
restaurantId
Halvorson - Torp · Tonawanda · ★ 3.3
items
              [
  {
    "menuItemId": 282,
    "quantity": 1,
    "unitPrice": 17.49,
    "lineTotal": 17.49
  }
]
            
subtotal
17.49
deliveryFee
0.38
tip
10.73
total
28.6
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 291,
  "userId": 185,
  "restaurantId": 18,
  "items": [
    {
      "menuItemId": 282,
      "quantity": 1,
      "unitPrice": 17.49,
      "lineTotal": 17.49
    }
  ],
  "subtotal": 17.49,
  "deliveryFee": 0.38,
  "tip": 10.73,
  "total": 28.6,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2026-04-05T22:30:09.734Z",
  "deliveredAt": "2026-04-06T01:45:02.555Z"
}