example-data.com
Menu
Browse docs and collections

Overview

food-orders / #214

food-orders #214

userId
Mathilde Ziemann-Nienow @mathilde.ziemann-nienow6
restaurantId
Spinka, Runolfsdottir and Brown · Costa Mesa · ★ 3.1
items
              [
  {
    "menuItemId": 1268,
    "quantity": 3,
    "unitPrice": 63.73,
    "lineTotal": 191.19
  },
  {
    "menuItemId": 1265,
    "quantity": 3,
    "unitPrice": 58.27,
    "lineTotal": 174.81
  },
  {
    "menuItemId": 1266,
    "quantity": 2,
    "unitPrice": 21.83,
    "lineTotal": 43.66
  },
  {
    "menuItemId": 1264,
    "quantity": 2,
    "unitPrice": 25.94,
    "lineTotal": 51.88
  }
]
            
subtotal
461.54
deliveryFee
0.82
tip
8.58
total
470.94
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 214,
  "userId": 202,
  "restaurantId": 87,
  "items": [
    {
      "menuItemId": 1268,
      "quantity": 3,
      "unitPrice": 63.73,
      "lineTotal": 191.19
    },
    {
      "menuItemId": 1265,
      "quantity": 3,
      "unitPrice": 58.27,
      "lineTotal": 174.81
    },
    {
      "menuItemId": 1266,
      "quantity": 2,
      "unitPrice": 21.83,
      "lineTotal": 43.66
    },
    {
      "menuItemId": 1264,
      "quantity": 2,
      "unitPrice": 25.94,
      "lineTotal": 51.88
    }
  ],
  "subtotal": 461.54,
  "deliveryFee": 0.82,
  "tip": 8.58,
  "total": 470.94,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2026-03-09T03:02:22.624Z",
  "deliveredAt": "2026-03-09T04:50:06.273Z"
}