example-data.com
Menu
Browse docs and collections

Overview

food-orders / #447

food-orders #447

userId
Mara Johnson @mara.johnson17
restaurantId
Armstrong - Rau · Uptonshire · ★ 3.9
items
              [
  {
    "menuItemId": 1040,
    "quantity": 4,
    "unitPrice": 5.6,
    "lineTotal": 22.4
  },
  {
    "menuItemId": 1041,
    "quantity": 2,
    "unitPrice": 27.39,
    "lineTotal": 54.78
  },
  {
    "menuItemId": 1033,
    "quantity": 3,
    "unitPrice": 14.36,
    "lineTotal": 43.08
  },
  {
    "menuItemId": 1039,
    "quantity": 2,
    "unitPrice": 39.51,
    "lineTotal": 79.02
  },
  {
    "menuItemId": 1032,
    "quantity": 1,
    "unitPrice": 59.81,
    "lineTotal": 59.81
  }
]
            
subtotal
259.09
deliveryFee
2.17
tip
3.15
total
264.41
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 447,
  "userId": 12,
  "restaurantId": 69,
  "items": [
    {
      "menuItemId": 1040,
      "quantity": 4,
      "unitPrice": 5.6,
      "lineTotal": 22.4
    },
    {
      "menuItemId": 1041,
      "quantity": 2,
      "unitPrice": 27.39,
      "lineTotal": 54.78
    },
    {
      "menuItemId": 1033,
      "quantity": 3,
      "unitPrice": 14.36,
      "lineTotal": 43.08
    },
    {
      "menuItemId": 1039,
      "quantity": 2,
      "unitPrice": 39.51,
      "lineTotal": 79.02
    },
    {
      "menuItemId": 1032,
      "quantity": 1,
      "unitPrice": 59.81,
      "lineTotal": 59.81
    }
  ],
  "subtotal": 259.09,
  "deliveryFee": 2.17,
  "tip": 3.15,
  "total": 264.41,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-09-06T19:47:41.289Z",
  "deliveredAt": "2025-09-06T21:31:22.432Z"
}