example-data.com
Menu
Browse docs and collections

Overview

food-orders / #498

food-orders #498

userId
Britney Haag @britney.haag
restaurantId
Leffler, Dibbert and Yost · Boehmcester · ★ 4.5
items
              [
  {
    "menuItemId": 1279,
    "quantity": 2,
    "unitPrice": 62.21,
    "lineTotal": 124.42
  },
  {
    "menuItemId": 1272,
    "quantity": 3,
    "unitPrice": 37.98,
    "lineTotal": 113.94
  }
]
            
subtotal
238.36
deliveryFee
4.14
tip
7.46
total
249.96
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 498,
  "userId": 133,
  "restaurantId": 88,
  "items": [
    {
      "menuItemId": 1279,
      "quantity": 2,
      "unitPrice": 62.21,
      "lineTotal": 124.42
    },
    {
      "menuItemId": 1272,
      "quantity": 3,
      "unitPrice": 37.98,
      "lineTotal": 113.94
    }
  ],
  "subtotal": 238.36,
  "deliveryFee": 4.14,
  "tip": 7.46,
  "total": 249.96,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-12-01T07:32:34.294Z",
  "deliveredAt": "2025-12-01T08:43:36.399Z"
}