example-data.com
Menu
Browse docs and collections

Overview

food-orders / #433

food-orders #433

userId
Marta Harvey @marta.harvey68
restaurantId
Halvorson - Torp · Tonawanda · ★ 3.3
items
              [
  {
    "menuItemId": 282,
    "quantity": 3,
    "unitPrice": 17.49,
    "lineTotal": 52.47
  },
  {
    "menuItemId": 281,
    "quantity": 3,
    "unitPrice": 34.47,
    "lineTotal": 103.41
  },
  {
    "menuItemId": 280,
    "quantity": 2,
    "unitPrice": 8.15,
    "lineTotal": 16.3
  },
  {
    "menuItemId": 276,
    "quantity": 4,
    "unitPrice": 22.27,
    "lineTotal": 89.08
  },
  {
    "menuItemId": 279,
    "quantity": 1,
    "unitPrice": 73.18,
    "lineTotal": 73.18
  }
]
            
subtotal
334.44
deliveryFee
3.35
tip
6.52
total
344.31
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 433,
  "userId": 112,
  "restaurantId": 18,
  "items": [
    {
      "menuItemId": 282,
      "quantity": 3,
      "unitPrice": 17.49,
      "lineTotal": 52.47
    },
    {
      "menuItemId": 281,
      "quantity": 3,
      "unitPrice": 34.47,
      "lineTotal": 103.41
    },
    {
      "menuItemId": 280,
      "quantity": 2,
      "unitPrice": 8.15,
      "lineTotal": 16.3
    },
    {
      "menuItemId": 276,
      "quantity": 4,
      "unitPrice": 22.27,
      "lineTotal": 89.08
    },
    {
      "menuItemId": 279,
      "quantity": 1,
      "unitPrice": 73.18,
      "lineTotal": 73.18
    }
  ],
  "subtotal": 334.44,
  "deliveryFee": 3.35,
  "tip": 6.52,
  "total": 344.31,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-10-20T13:20:06.990Z",
  "deliveredAt": "2025-10-20T14:52:22.219Z"
}