example-data.com
Menu
Browse docs and collections

Overview

food-orders / #434

food-orders #434

userId
Einar Volkman @einar_volkman69
restaurantId
King - Aufderhar · Barnstable Town · ★ 4.8
items
              [
  {
    "menuItemId": 923,
    "quantity": 1,
    "unitPrice": 73.23,
    "lineTotal": 73.23
  },
  {
    "menuItemId": 918,
    "quantity": 3,
    "unitPrice": 45.02,
    "lineTotal": 135.06
  },
  {
    "menuItemId": 906,
    "quantity": 4,
    "unitPrice": 50.91,
    "lineTotal": 203.64
  }
]
            
subtotal
411.93
deliveryFee
2.3
tip
3.16
total
417.39
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 434,
  "userId": 7,
  "restaurantId": 60,
  "items": [
    {
      "menuItemId": 923,
      "quantity": 1,
      "unitPrice": 73.23,
      "lineTotal": 73.23
    },
    {
      "menuItemId": 918,
      "quantity": 3,
      "unitPrice": 45.02,
      "lineTotal": 135.06
    },
    {
      "menuItemId": 906,
      "quantity": 4,
      "unitPrice": 50.91,
      "lineTotal": 203.64
    }
  ],
  "subtotal": 411.93,
  "deliveryFee": 2.3,
  "tip": 3.16,
  "total": 417.39,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-08-17T11:33:42.342Z",
  "deliveredAt": "2025-08-17T15:27:39.870Z"
}