example-data.com
Menu
Browse docs and collections

Overview

food-orders / #258

food-orders #258

userId
Darian Schaden @darian_schaden36
restaurantId
Schamberger LLC · Walshville · ★ 4.1
items
              [
  {
    "menuItemId": 1082,
    "quantity": 3,
    "unitPrice": 47.41,
    "lineTotal": 142.23
  },
  {
    "menuItemId": 1083,
    "quantity": 3,
    "unitPrice": 7.25,
    "lineTotal": 21.75
  }
]
            
subtotal
163.98
deliveryFee
2.5
tip
4.27
total
170.75
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 258,
  "userId": 53,
  "restaurantId": 72,
  "items": [
    {
      "menuItemId": 1082,
      "quantity": 3,
      "unitPrice": 47.41,
      "lineTotal": 142.23
    },
    {
      "menuItemId": 1083,
      "quantity": 3,
      "unitPrice": 7.25,
      "lineTotal": 21.75
    }
  ],
  "subtotal": 163.98,
  "deliveryFee": 2.5,
  "tip": 4.27,
  "total": 170.75,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2025-09-01T07:00:44.135Z",
  "deliveredAt": null
}