example-data.com
Menu
Browse docs and collections

Overview

food-orders / #324

food-orders #324

userId
Terence Lemke @terence.lemke85
restaurantId
Ortiz, Torp and Howell · Fort Devanside · ★ 2.9
items
              [
  {
    "menuItemId": 72,
    "quantity": 4,
    "unitPrice": 56.62,
    "lineTotal": 226.48
  },
  {
    "menuItemId": 84,
    "quantity": 4,
    "unitPrice": 60.85,
    "lineTotal": 243.4
  },
  {
    "menuItemId": 82,
    "quantity": 1,
    "unitPrice": 7.84,
    "lineTotal": 7.84
  },
  {
    "menuItemId": 79,
    "quantity": 1,
    "unitPrice": 20.75,
    "lineTotal": 20.75
  },
  {
    "menuItemId": 66,
    "quantity": 3,
    "unitPrice": 21.76,
    "lineTotal": 65.28
  }
]
            
subtotal
563.75
deliveryFee
2.23
tip
11.26
total
577.24
currency
USD
status
placed
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 324,
  "userId": 74,
  "restaurantId": 7,
  "items": [
    {
      "menuItemId": 72,
      "quantity": 4,
      "unitPrice": 56.62,
      "lineTotal": 226.48
    },
    {
      "menuItemId": 84,
      "quantity": 4,
      "unitPrice": 60.85,
      "lineTotal": 243.4
    },
    {
      "menuItemId": 82,
      "quantity": 1,
      "unitPrice": 7.84,
      "lineTotal": 7.84
    },
    {
      "menuItemId": 79,
      "quantity": 1,
      "unitPrice": 20.75,
      "lineTotal": 20.75
    },
    {
      "menuItemId": 66,
      "quantity": 3,
      "unitPrice": 21.76,
      "lineTotal": 65.28
    }
  ],
  "subtotal": 563.75,
  "deliveryFee": 2.23,
  "tip": 11.26,
  "total": 577.24,
  "currency": "USD",
  "status": "placed",
  "placedAt": "2025-09-10T07:07:56.383Z",
  "deliveredAt": null
}