example-data.com
Menu
Browse docs and collections

Overview

food-orders / #428

food-orders #428

userId
Cindy Barrows @cindy_barrows20
restaurantId
Ritchie - Rowe · Trompfort · ★ 2.9
items
              [
  {
    "menuItemId": 1240,
    "quantity": 2,
    "unitPrice": 16.6,
    "lineTotal": 33.2
  },
  {
    "menuItemId": 1242,
    "quantity": 4,
    "unitPrice": 55.8,
    "lineTotal": 223.2
  },
  {
    "menuItemId": 1241,
    "quantity": 3,
    "unitPrice": 11.25,
    "lineTotal": 33.75
  },
  {
    "menuItemId": 1237,
    "quantity": 1,
    "unitPrice": 76.78,
    "lineTotal": 76.78
  },
  {
    "menuItemId": 1244,
    "quantity": 1,
    "unitPrice": 23.7,
    "lineTotal": 23.7
  }
]
            
subtotal
390.63
deliveryFee
5.52
tip
10.57
total
406.72
currency
USD
status
preparing
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 428,
  "userId": 165,
  "restaurantId": 85,
  "items": [
    {
      "menuItemId": 1240,
      "quantity": 2,
      "unitPrice": 16.6,
      "lineTotal": 33.2
    },
    {
      "menuItemId": 1242,
      "quantity": 4,
      "unitPrice": 55.8,
      "lineTotal": 223.2
    },
    {
      "menuItemId": 1241,
      "quantity": 3,
      "unitPrice": 11.25,
      "lineTotal": 33.75
    },
    {
      "menuItemId": 1237,
      "quantity": 1,
      "unitPrice": 76.78,
      "lineTotal": 76.78
    },
    {
      "menuItemId": 1244,
      "quantity": 1,
      "unitPrice": 23.7,
      "lineTotal": 23.7
    }
  ],
  "subtotal": 390.63,
  "deliveryFee": 5.52,
  "tip": 10.57,
  "total": 406.72,
  "currency": "USD",
  "status": "preparing",
  "placedAt": "2025-10-13T13:58:48.895Z",
  "deliveredAt": null
}