example-data.com
Menu
Browse docs and collections

Overview

food-orders / #284

food-orders #284

userId
Leora Doyle @leora_doyle
restaurantId
Stroman - Wolf · Hoboken · ★ 3.7
items
              [
  {
    "menuItemId": 571,
    "quantity": 3,
    "unitPrice": 33.01,
    "lineTotal": 99.03
  },
  {
    "menuItemId": 573,
    "quantity": 3,
    "unitPrice": 36.05,
    "lineTotal": 108.15
  }
]
            
subtotal
207.18
deliveryFee
7.02
tip
3.6
total
217.8
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 284,
  "userId": 117,
  "restaurantId": 39,
  "items": [
    {
      "menuItemId": 571,
      "quantity": 3,
      "unitPrice": 33.01,
      "lineTotal": 99.03
    },
    {
      "menuItemId": 573,
      "quantity": 3,
      "unitPrice": 36.05,
      "lineTotal": 108.15
    }
  ],
  "subtotal": 207.18,
  "deliveryFee": 7.02,
  "tip": 3.6,
  "total": 217.8,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-11-05T21:27:41.488Z",
  "deliveredAt": "2025-11-06T01:10:48.654Z"
}