example-data.com
Menu
Browse docs and collections

Overview

food-orders / #274

food-orders #274

userId
Conner Bernhard @conner.bernhard33
restaurantId
Rutherford - Mosciski · Feestport · ★ 4.8
items
              [
  {
    "menuItemId": 207,
    "quantity": 3,
    "unitPrice": 47.12,
    "lineTotal": 141.36
  },
  {
    "menuItemId": 211,
    "quantity": 2,
    "unitPrice": 37.21,
    "lineTotal": 74.42
  }
]
            
subtotal
215.78
deliveryFee
2.25
tip
2.55
total
220.58
currency
USD
status
cancelled
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 274,
  "userId": 3,
  "restaurantId": 15,
  "items": [
    {
      "menuItemId": 207,
      "quantity": 3,
      "unitPrice": 47.12,
      "lineTotal": 141.36
    },
    {
      "menuItemId": 211,
      "quantity": 2,
      "unitPrice": 37.21,
      "lineTotal": 74.42
    }
  ],
  "subtotal": 215.78,
  "deliveryFee": 2.25,
  "tip": 2.55,
  "total": 220.58,
  "currency": "USD",
  "status": "cancelled",
  "placedAt": "2025-12-24T11:18:08.645Z",
  "deliveredAt": null
}