example-data.com
Menu
Browse docs and collections

Overview

food-orders / #374

food-orders #374

userId
Matt Kuhic @matt_kuhic57
restaurantId
Stroman - Wolf · Hoboken · ★ 3.7
items
              [
  {
    "menuItemId": 573,
    "quantity": 2,
    "unitPrice": 36.05,
    "lineTotal": 72.1
  },
  {
    "menuItemId": 572,
    "quantity": 4,
    "unitPrice": 10.45,
    "lineTotal": 41.8
  },
  {
    "menuItemId": 571,
    "quantity": 1,
    "unitPrice": 33.01,
    "lineTotal": 33.01
  },
  {
    "menuItemId": 569,
    "quantity": 2,
    "unitPrice": 24.94,
    "lineTotal": 49.88
  },
  {
    "menuItemId": 570,
    "quantity": 2,
    "unitPrice": 55.72,
    "lineTotal": 111.44
  }
]
            
subtotal
308.23
deliveryFee
0.45
tip
5.18
total
313.86
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 374,
  "userId": 226,
  "restaurantId": 39,
  "items": [
    {
      "menuItemId": 573,
      "quantity": 2,
      "unitPrice": 36.05,
      "lineTotal": 72.1
    },
    {
      "menuItemId": 572,
      "quantity": 4,
      "unitPrice": 10.45,
      "lineTotal": 41.8
    },
    {
      "menuItemId": 571,
      "quantity": 1,
      "unitPrice": 33.01,
      "lineTotal": 33.01
    },
    {
      "menuItemId": 569,
      "quantity": 2,
      "unitPrice": 24.94,
      "lineTotal": 49.88
    },
    {
      "menuItemId": 570,
      "quantity": 2,
      "unitPrice": 55.72,
      "lineTotal": 111.44
    }
  ],
  "subtotal": 308.23,
  "deliveryFee": 0.45,
  "tip": 5.18,
  "total": 313.86,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-12-18T01:56:48.139Z",
  "deliveredAt": "2025-12-18T04:15:09.176Z"
}