example-data.com
Menu
Browse docs and collections

Overview

food-orders / #270

food-orders #270

userId
Ryan Conroy @ryan_conroy
restaurantId
Rutherford - Mosciski · Feestport · ★ 4.8
items
              [
  {
    "menuItemId": 220,
    "quantity": 4,
    "unitPrice": 6.08,
    "lineTotal": 24.32
  },
  {
    "menuItemId": 208,
    "quantity": 2,
    "unitPrice": 64.6,
    "lineTotal": 129.2
  },
  {
    "menuItemId": 203,
    "quantity": 4,
    "unitPrice": 29.07,
    "lineTotal": 116.28
  },
  {
    "menuItemId": 207,
    "quantity": 4,
    "unitPrice": 47.12,
    "lineTotal": 188.48
  }
]
            
subtotal
458.28
deliveryFee
3.89
tip
9.54
total
471.71
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 270,
  "userId": 73,
  "restaurantId": 15,
  "items": [
    {
      "menuItemId": 220,
      "quantity": 4,
      "unitPrice": 6.08,
      "lineTotal": 24.32
    },
    {
      "menuItemId": 208,
      "quantity": 2,
      "unitPrice": 64.6,
      "lineTotal": 129.2
    },
    {
      "menuItemId": 203,
      "quantity": 4,
      "unitPrice": 29.07,
      "lineTotal": 116.28
    },
    {
      "menuItemId": 207,
      "quantity": 4,
      "unitPrice": 47.12,
      "lineTotal": 188.48
    }
  ],
  "subtotal": 458.28,
  "deliveryFee": 3.89,
  "tip": 9.54,
  "total": 471.71,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2026-04-11T15:05:38.592Z",
  "deliveredAt": "2026-04-11T16:44:33.071Z"
}