example-data.com
Menu
Browse docs and collections

Overview

food-orders / #344

food-orders #344

userId
Era Mitchell @era.mitchell21
restaurantId
Harber, Wolf and Reynolds · Providencifurt · ★ 4.5
items
              [
  {
    "menuItemId": 35,
    "quantity": 3,
    "unitPrice": 35.98,
    "lineTotal": 107.94
  },
  {
    "menuItemId": 33,
    "quantity": 4,
    "unitPrice": 28.94,
    "lineTotal": 115.76
  },
  {
    "menuItemId": 34,
    "quantity": 3,
    "unitPrice": 67.63,
    "lineTotal": 202.89
  }
]
            
subtotal
426.59
deliveryFee
2.92
tip
10.32
total
439.83
currency
USD
status
cancelled
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 344,
  "userId": 243,
  "restaurantId": 3,
  "items": [
    {
      "menuItemId": 35,
      "quantity": 3,
      "unitPrice": 35.98,
      "lineTotal": 107.94
    },
    {
      "menuItemId": 33,
      "quantity": 4,
      "unitPrice": 28.94,
      "lineTotal": 115.76
    },
    {
      "menuItemId": 34,
      "quantity": 3,
      "unitPrice": 67.63,
      "lineTotal": 202.89
    }
  ],
  "subtotal": 426.59,
  "deliveryFee": 2.92,
  "tip": 10.32,
  "total": 439.83,
  "currency": "USD",
  "status": "cancelled",
  "placedAt": "2025-09-22T08:29:08.356Z",
  "deliveredAt": null
}