example-data.com
Menu
Browse docs and collections

Overview

food-orders / #278

food-orders #278

userId
Webster Skiles @webster_skiles39
restaurantId
Halvorson - Olson · Lake Angeloton · ★ 3.7
items
              [
  {
    "menuItemId": 102,
    "quantity": 4,
    "unitPrice": 49.52,
    "lineTotal": 198.08
  },
  {
    "menuItemId": 91,
    "quantity": 4,
    "unitPrice": 13.89,
    "lineTotal": 55.56
  },
  {
    "menuItemId": 90,
    "quantity": 2,
    "unitPrice": 19.65,
    "lineTotal": 39.3
  },
  {
    "menuItemId": 101,
    "quantity": 2,
    "unitPrice": 7.91,
    "lineTotal": 15.82
  },
  {
    "menuItemId": 106,
    "quantity": 3,
    "unitPrice": 15.73,
    "lineTotal": 47.19
  }
]
            
subtotal
355.95
deliveryFee
3.15
tip
2.51
total
361.61
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 278,
  "userId": 5,
  "restaurantId": 8,
  "items": [
    {
      "menuItemId": 102,
      "quantity": 4,
      "unitPrice": 49.52,
      "lineTotal": 198.08
    },
    {
      "menuItemId": 91,
      "quantity": 4,
      "unitPrice": 13.89,
      "lineTotal": 55.56
    },
    {
      "menuItemId": 90,
      "quantity": 2,
      "unitPrice": 19.65,
      "lineTotal": 39.3
    },
    {
      "menuItemId": 101,
      "quantity": 2,
      "unitPrice": 7.91,
      "lineTotal": 15.82
    },
    {
      "menuItemId": 106,
      "quantity": 3,
      "unitPrice": 15.73,
      "lineTotal": 47.19
    }
  ],
  "subtotal": 355.95,
  "deliveryFee": 3.15,
  "tip": 2.51,
  "total": 361.61,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2026-04-26T22:57:29.669Z",
  "deliveredAt": "2026-04-27T01:10:25.577Z"
}