example-data.com
Menu
Browse docs and collections

Overview

food-orders / #307

food-orders #307

userId
Kathleen Lynch @kathleen_lynch1
restaurantId
Rutherford - Mosciski · Feestport · ★ 4.8
items
              [
  {
    "menuItemId": 200,
    "quantity": 4,
    "unitPrice": 66.71,
    "lineTotal": 266.84
  },
  {
    "menuItemId": 212,
    "quantity": 2,
    "unitPrice": 73.83,
    "lineTotal": 147.66
  },
  {
    "menuItemId": 219,
    "quantity": 3,
    "unitPrice": 58.39,
    "lineTotal": 175.17
  },
  {
    "menuItemId": 218,
    "quantity": 3,
    "unitPrice": 66.74,
    "lineTotal": 200.22
  }
]
            
subtotal
789.89
deliveryFee
2.35
tip
1.75
total
793.99
currency
USD
status
placed
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 307,
  "userId": 139,
  "restaurantId": 15,
  "items": [
    {
      "menuItemId": 200,
      "quantity": 4,
      "unitPrice": 66.71,
      "lineTotal": 266.84
    },
    {
      "menuItemId": 212,
      "quantity": 2,
      "unitPrice": 73.83,
      "lineTotal": 147.66
    },
    {
      "menuItemId": 219,
      "quantity": 3,
      "unitPrice": 58.39,
      "lineTotal": 175.17
    },
    {
      "menuItemId": 218,
      "quantity": 3,
      "unitPrice": 66.74,
      "lineTotal": 200.22
    }
  ],
  "subtotal": 789.89,
  "deliveryFee": 2.35,
  "tip": 1.75,
  "total": 793.99,
  "currency": "USD",
  "status": "placed",
  "placedAt": "2025-11-30T00:16:40.654Z",
  "deliveredAt": null
}