example-data.com
Menu
Browse docs and collections

Overview

food-orders / #480

food-orders #480

userId
Ricky Langosh @ricky.langosh66
restaurantId
Adams - Schimmel · Murrayburgh · ★ 2.7
items
              [
  {
    "menuItemId": 1201,
    "quantity": 4,
    "unitPrice": 73.92,
    "lineTotal": 295.68
  },
  {
    "menuItemId": 1197,
    "quantity": 2,
    "unitPrice": 9.68,
    "lineTotal": 19.36
  },
  {
    "menuItemId": 1198,
    "quantity": 4,
    "unitPrice": 77.1,
    "lineTotal": 308.4
  }
]
            
subtotal
623.44
deliveryFee
2.72
tip
8.95
total
635.11
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 480,
  "userId": 198,
  "restaurantId": 81,
  "items": [
    {
      "menuItemId": 1201,
      "quantity": 4,
      "unitPrice": 73.92,
      "lineTotal": 295.68
    },
    {
      "menuItemId": 1197,
      "quantity": 2,
      "unitPrice": 9.68,
      "lineTotal": 19.36
    },
    {
      "menuItemId": 1198,
      "quantity": 4,
      "unitPrice": 77.1,
      "lineTotal": 308.4
    }
  ],
  "subtotal": 623.44,
  "deliveryFee": 2.72,
  "tip": 8.95,
  "total": 635.11,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-10-08T19:36:41.310Z",
  "deliveredAt": "2025-10-08T23:25:23.183Z"
}