example-data.com
Menu
Browse docs and collections

Overview

food-orders / #280

food-orders #280

userId
Zachariah Herzog @zachariah_herzog42
restaurantId
Gleichner - Kunde · New Itzel · ★ 4.9
items
              [
  {
    "menuItemId": 926,
    "quantity": 3,
    "unitPrice": 5.31,
    "lineTotal": 15.93
  },
  {
    "menuItemId": 935,
    "quantity": 3,
    "unitPrice": 6.47,
    "lineTotal": 19.41
  },
  {
    "menuItemId": 927,
    "quantity": 4,
    "unitPrice": 42.55,
    "lineTotal": 170.2
  },
  {
    "menuItemId": 931,
    "quantity": 1,
    "unitPrice": 38.42,
    "lineTotal": 38.42
  }
]
            
subtotal
243.96
deliveryFee
6.74
tip
6.77
total
257.47
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 280,
  "userId": 15,
  "restaurantId": 61,
  "items": [
    {
      "menuItemId": 926,
      "quantity": 3,
      "unitPrice": 5.31,
      "lineTotal": 15.93
    },
    {
      "menuItemId": 935,
      "quantity": 3,
      "unitPrice": 6.47,
      "lineTotal": 19.41
    },
    {
      "menuItemId": 927,
      "quantity": 4,
      "unitPrice": 42.55,
      "lineTotal": 170.2
    },
    {
      "menuItemId": 931,
      "quantity": 1,
      "unitPrice": 38.42,
      "lineTotal": 38.42
    }
  ],
  "subtotal": 243.96,
  "deliveryFee": 6.74,
  "tip": 6.77,
  "total": 257.47,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-09-11T06:28:34.262Z",
  "deliveredAt": "2025-09-11T07:52:20.010Z"
}