example-data.com
Menu
Browse docs and collections

Overview

food-orders / #275

food-orders #275

userId
Enos Hamill @enos_hamill
restaurantId
Marks Inc · East Dena · ★ 4.1
items
              [
  {
    "menuItemId": 799,
    "quantity": 3,
    "unitPrice": 24.51,
    "lineTotal": 73.53
  },
  {
    "menuItemId": 815,
    "quantity": 3,
    "unitPrice": 51.34,
    "lineTotal": 154.02
  }
]
            
subtotal
227.55
deliveryFee
5.13
tip
0.71
total
233.39
currency
USD
status
placed
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 275,
  "userId": 65,
  "restaurantId": 54,
  "items": [
    {
      "menuItemId": 799,
      "quantity": 3,
      "unitPrice": 24.51,
      "lineTotal": 73.53
    },
    {
      "menuItemId": 815,
      "quantity": 3,
      "unitPrice": 51.34,
      "lineTotal": 154.02
    }
  ],
  "subtotal": 227.55,
  "deliveryFee": 5.13,
  "tip": 0.71,
  "total": 233.39,
  "currency": "USD",
  "status": "placed",
  "placedAt": "2025-08-23T16:32:34.672Z",
  "deliveredAt": null
}