example-data.com
Menu
Browse docs and collections

Overview

food-orders / #471

food-orders #471

userId
Loren Schmidt @loren_schmidt
restaurantId
Lesch - Stehr · New Winona · ★ 4.3
items
              [
  {
    "menuItemId": 420,
    "quantity": 2,
    "unitPrice": 25.15,
    "lineTotal": 50.3
  },
  {
    "menuItemId": 422,
    "quantity": 3,
    "unitPrice": 79.77,
    "lineTotal": 239.31
  },
  {
    "menuItemId": 421,
    "quantity": 1,
    "unitPrice": 67.57,
    "lineTotal": 67.57
  }
]
            
subtotal
357.18
deliveryFee
1.34
tip
9.92
total
368.44
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 471,
  "userId": 222,
  "restaurantId": 28,
  "items": [
    {
      "menuItemId": 420,
      "quantity": 2,
      "unitPrice": 25.15,
      "lineTotal": 50.3
    },
    {
      "menuItemId": 422,
      "quantity": 3,
      "unitPrice": 79.77,
      "lineTotal": 239.31
    },
    {
      "menuItemId": 421,
      "quantity": 1,
      "unitPrice": 67.57,
      "lineTotal": 67.57
    }
  ],
  "subtotal": 357.18,
  "deliveryFee": 1.34,
  "tip": 9.92,
  "total": 368.44,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2025-10-13T15:48:07.752Z",
  "deliveredAt": null
}