example-data.com
Menu
Browse docs and collections

Overview

food-orders / #248

food-orders #248

userId
Cassidy Christiansen @cassidy_christiansen38
restaurantId
Hartmann, Dach and Kub · Gusikowskifield · ★ 4.2
items
              [
  {
    "menuItemId": 564,
    "quantity": 2,
    "unitPrice": 50,
    "lineTotal": 100
  },
  {
    "menuItemId": 558,
    "quantity": 4,
    "unitPrice": 67.58,
    "lineTotal": 270.32
  },
  {
    "menuItemId": 555,
    "quantity": 2,
    "unitPrice": 38.64,
    "lineTotal": 77.28
  }
]
            
subtotal
447.6
deliveryFee
0.9
tip
0.28
total
448.78
currency
USD
status
cancelled
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 248,
  "userId": 33,
  "restaurantId": 38,
  "items": [
    {
      "menuItemId": 564,
      "quantity": 2,
      "unitPrice": 50,
      "lineTotal": 100
    },
    {
      "menuItemId": 558,
      "quantity": 4,
      "unitPrice": 67.58,
      "lineTotal": 270.32
    },
    {
      "menuItemId": 555,
      "quantity": 2,
      "unitPrice": 38.64,
      "lineTotal": 77.28
    }
  ],
  "subtotal": 447.6,
  "deliveryFee": 0.9,
  "tip": 0.28,
  "total": 448.78,
  "currency": "USD",
  "status": "cancelled",
  "placedAt": "2025-08-17T08:52:16.148Z",
  "deliveredAt": null
}