example-data.com
Menu
Browse docs and collections

Overview

food-orders / #415

food-orders #415

userId
Wade Upton @wade_upton78
restaurantId
Roob - Fisher · Kuhlmanshire · ★ 3.2
items
              [
  {
    "menuItemId": 1226,
    "quantity": 2,
    "unitPrice": 75.09,
    "lineTotal": 150.18
  },
  {
    "menuItemId": 1228,
    "quantity": 2,
    "unitPrice": 9.71,
    "lineTotal": 19.42
  },
  {
    "menuItemId": 1224,
    "quantity": 4,
    "unitPrice": 8.04,
    "lineTotal": 32.16
  },
  {
    "menuItemId": 1221,
    "quantity": 3,
    "unitPrice": 4.45,
    "lineTotal": 13.35
  },
  {
    "menuItemId": 1219,
    "quantity": 1,
    "unitPrice": 53.57,
    "lineTotal": 53.57
  }
]
            
subtotal
268.68
deliveryFee
7.97
tip
3.79
total
280.44
currency
USD
status
placed
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 415,
  "userId": 129,
  "restaurantId": 83,
  "items": [
    {
      "menuItemId": 1226,
      "quantity": 2,
      "unitPrice": 75.09,
      "lineTotal": 150.18
    },
    {
      "menuItemId": 1228,
      "quantity": 2,
      "unitPrice": 9.71,
      "lineTotal": 19.42
    },
    {
      "menuItemId": 1224,
      "quantity": 4,
      "unitPrice": 8.04,
      "lineTotal": 32.16
    },
    {
      "menuItemId": 1221,
      "quantity": 3,
      "unitPrice": 4.45,
      "lineTotal": 13.35
    },
    {
      "menuItemId": 1219,
      "quantity": 1,
      "unitPrice": 53.57,
      "lineTotal": 53.57
    }
  ],
  "subtotal": 268.68,
  "deliveryFee": 7.97,
  "tip": 3.79,
  "total": 280.44,
  "currency": "USD",
  "status": "placed",
  "placedAt": "2025-04-26T01:28:43.711Z",
  "deliveredAt": null
}