example-data.com
Menu
Browse docs and collections

Overview

food-orders / #474

food-orders #474

userId
Hershel Smitham @hershel.smitham
restaurantId
Rogahn - Kreiger · South Cathrynside · ★ 4.6
items
              [
  {
    "menuItemId": 1216,
    "quantity": 3,
    "unitPrice": 12.2,
    "lineTotal": 36.6
  },
  {
    "menuItemId": 1213,
    "quantity": 4,
    "unitPrice": 31.12,
    "lineTotal": 124.48
  },
  {
    "menuItemId": 1214,
    "quantity": 3,
    "unitPrice": 76.8,
    "lineTotal": 230.4
  }
]
            
subtotal
391.48
deliveryFee
1.46
tip
0.35
total
393.29
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 474,
  "userId": 147,
  "restaurantId": 82,
  "items": [
    {
      "menuItemId": 1216,
      "quantity": 3,
      "unitPrice": 12.2,
      "lineTotal": 36.6
    },
    {
      "menuItemId": 1213,
      "quantity": 4,
      "unitPrice": 31.12,
      "lineTotal": 124.48
    },
    {
      "menuItemId": 1214,
      "quantity": 3,
      "unitPrice": 76.8,
      "lineTotal": 230.4
    }
  ],
  "subtotal": 391.48,
  "deliveryFee": 1.46,
  "tip": 0.35,
  "total": 393.29,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2025-11-19T09:18:04.009Z",
  "deliveredAt": null
}