example-data.com
Menu
Browse docs and collections

Overview

food-orders / #257

food-orders #257

userId
Sarah West @sarah.west
restaurantId
Larson Group · Lehnerville · ★ 2.9
items
              [
  {
    "menuItemId": 519,
    "quantity": 4,
    "unitPrice": 64.62,
    "lineTotal": 258.48
  },
  {
    "menuItemId": 520,
    "quantity": 4,
    "unitPrice": 18.41,
    "lineTotal": 73.64
  },
  {
    "menuItemId": 518,
    "quantity": 2,
    "unitPrice": 73.88,
    "lineTotal": 147.76
  },
  {
    "menuItemId": 516,
    "quantity": 4,
    "unitPrice": 34.59,
    "lineTotal": 138.36
  }
]
            
subtotal
618.24
deliveryFee
3.38
tip
3.12
total
624.74
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 257,
  "userId": 217,
  "restaurantId": 35,
  "items": [
    {
      "menuItemId": 519,
      "quantity": 4,
      "unitPrice": 64.62,
      "lineTotal": 258.48
    },
    {
      "menuItemId": 520,
      "quantity": 4,
      "unitPrice": 18.41,
      "lineTotal": 73.64
    },
    {
      "menuItemId": 518,
      "quantity": 2,
      "unitPrice": 73.88,
      "lineTotal": 147.76
    },
    {
      "menuItemId": 516,
      "quantity": 4,
      "unitPrice": 34.59,
      "lineTotal": 138.36
    }
  ],
  "subtotal": 618.24,
  "deliveryFee": 3.38,
  "tip": 3.12,
  "total": 624.74,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2026-04-28T22:25:23.866Z",
  "deliveredAt": "2026-04-29T01:18:45.937Z"
}