example-data.com
Menu
Browse docs and collections

Overview

food-orders / #383

food-orders #383

userId
Einar Volkman @einar_volkman69
restaurantId
Larson, Keeling and Klocko · Aidanboro · ★ 4.4
items
              [
  {
    "menuItemId": 127,
    "quantity": 3,
    "unitPrice": 38.16,
    "lineTotal": 114.48
  },
  {
    "menuItemId": 120,
    "quantity": 1,
    "unitPrice": 43.59,
    "lineTotal": 43.59
  },
  {
    "menuItemId": 113,
    "quantity": 1,
    "unitPrice": 42.84,
    "lineTotal": 42.84
  },
  {
    "menuItemId": 114,
    "quantity": 2,
    "unitPrice": 41.7,
    "lineTotal": 83.4
  },
  {
    "menuItemId": 117,
    "quantity": 2,
    "unitPrice": 34.45,
    "lineTotal": 68.9
  }
]
            
subtotal
353.21
deliveryFee
4.62
tip
11.17
total
369
currency
USD
status
cancelled
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 383,
  "userId": 7,
  "restaurantId": 9,
  "items": [
    {
      "menuItemId": 127,
      "quantity": 3,
      "unitPrice": 38.16,
      "lineTotal": 114.48
    },
    {
      "menuItemId": 120,
      "quantity": 1,
      "unitPrice": 43.59,
      "lineTotal": 43.59
    },
    {
      "menuItemId": 113,
      "quantity": 1,
      "unitPrice": 42.84,
      "lineTotal": 42.84
    },
    {
      "menuItemId": 114,
      "quantity": 2,
      "unitPrice": 41.7,
      "lineTotal": 83.4
    },
    {
      "menuItemId": 117,
      "quantity": 2,
      "unitPrice": 34.45,
      "lineTotal": 68.9
    }
  ],
  "subtotal": 353.21,
  "deliveryFee": 4.62,
  "tip": 11.17,
  "total": 369,
  "currency": "USD",
  "status": "cancelled",
  "placedAt": "2026-04-01T00:53:03.948Z",
  "deliveredAt": null
}