example-data.com
Menu
Browse docs and collections

Overview

food-orders / #337

food-orders #337

userId
Cruz Okuneva @cruz.okuneva
restaurantId
Lesch - Stehr · New Winona · ★ 4.3
items
              [
  {
    "menuItemId": 423,
    "quantity": 2,
    "unitPrice": 4.26,
    "lineTotal": 8.52
  },
  {
    "menuItemId": 421,
    "quantity": 1,
    "unitPrice": 67.57,
    "lineTotal": 67.57
  },
  {
    "menuItemId": 419,
    "quantity": 1,
    "unitPrice": 77.11,
    "lineTotal": 77.11
  }
]
            
subtotal
153.2
deliveryFee
5.11
tip
11.28
total
169.59
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 337,
  "userId": 239,
  "restaurantId": 28,
  "items": [
    {
      "menuItemId": 423,
      "quantity": 2,
      "unitPrice": 4.26,
      "lineTotal": 8.52
    },
    {
      "menuItemId": 421,
      "quantity": 1,
      "unitPrice": 67.57,
      "lineTotal": 67.57
    },
    {
      "menuItemId": 419,
      "quantity": 1,
      "unitPrice": 77.11,
      "lineTotal": 77.11
    }
  ],
  "subtotal": 153.2,
  "deliveryFee": 5.11,
  "tip": 11.28,
  "total": 169.59,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2026-03-15T06:23:41.621Z",
  "deliveredAt": "2026-03-15T08:31:55.342Z"
}