example-data.com
Menu
Browse docs and collections

Overview

food-orders / #410

food-orders #410

userId
Audreanne Will @audreanne_will
restaurantId
Lehner - Smith · Larkinfurt · ★ 3.0
items
              [
  {
    "menuItemId": 1349,
    "quantity": 2,
    "unitPrice": 43.63,
    "lineTotal": 87.26
  },
  {
    "menuItemId": 1353,
    "quantity": 1,
    "unitPrice": 5.73,
    "lineTotal": 5.73
  }
]
            
subtotal
92.99
deliveryFee
4.15
tip
2.08
total
99.22
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 410,
  "userId": 127,
  "restaurantId": 93,
  "items": [
    {
      "menuItemId": 1349,
      "quantity": 2,
      "unitPrice": 43.63,
      "lineTotal": 87.26
    },
    {
      "menuItemId": 1353,
      "quantity": 1,
      "unitPrice": 5.73,
      "lineTotal": 5.73
    }
  ],
  "subtotal": 92.99,
  "deliveryFee": 4.15,
  "tip": 2.08,
  "total": 99.22,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-11-14T13:52:03.154Z",
  "deliveredAt": "2025-11-14T15:25:36.665Z"
}