example-data.com
Menu
Browse docs and collections

Overview

food-orders / #294

food-orders #294

userId
Bradford Doyle @bradford.doyle42
restaurantId
Bergstrom LLC · South Gate · ★ 3.0
items
              [
  {
    "menuItemId": 994,
    "quantity": 4,
    "unitPrice": 61.13,
    "lineTotal": 244.52
  },
  {
    "menuItemId": 996,
    "quantity": 2,
    "unitPrice": 62.11,
    "lineTotal": 124.22
  },
  {
    "menuItemId": 999,
    "quantity": 2,
    "unitPrice": 38.75,
    "lineTotal": 77.5
  },
  {
    "menuItemId": 1001,
    "quantity": 4,
    "unitPrice": 79.86,
    "lineTotal": 319.44
  },
  {
    "menuItemId": 998,
    "quantity": 4,
    "unitPrice": 25.06,
    "lineTotal": 100.24
  }
]
            
subtotal
865.92
deliveryFee
0
tip
10.83
total
876.75
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 294,
  "userId": 79,
  "restaurantId": 66,
  "items": [
    {
      "menuItemId": 994,
      "quantity": 4,
      "unitPrice": 61.13,
      "lineTotal": 244.52
    },
    {
      "menuItemId": 996,
      "quantity": 2,
      "unitPrice": 62.11,
      "lineTotal": 124.22
    },
    {
      "menuItemId": 999,
      "quantity": 2,
      "unitPrice": 38.75,
      "lineTotal": 77.5
    },
    {
      "menuItemId": 1001,
      "quantity": 4,
      "unitPrice": 79.86,
      "lineTotal": 319.44
    },
    {
      "menuItemId": 998,
      "quantity": 4,
      "unitPrice": 25.06,
      "lineTotal": 100.24
    }
  ],
  "subtotal": 865.92,
  "deliveryFee": 0,
  "tip": 10.83,
  "total": 876.75,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2026-01-01T13:21:53.640Z",
  "deliveredAt": "2026-01-01T14:33:28.618Z"
}