example-data.com
Menu
Browse docs and collections

Overview

food-orders / #340

food-orders #340

userId
Jamil Mayer @jamil.mayer
restaurantId
Thiel and Sons · Shyanneville · ★ 4.0
items
              [
  {
    "menuItemId": 1410,
    "quantity": 4,
    "unitPrice": 61.31,
    "lineTotal": 245.24
  },
  {
    "menuItemId": 1412,
    "quantity": 1,
    "unitPrice": 34.84,
    "lineTotal": 34.84
  },
  {
    "menuItemId": 1415,
    "quantity": 1,
    "unitPrice": 34.56,
    "lineTotal": 34.56
  },
  {
    "menuItemId": 1414,
    "quantity": 4,
    "unitPrice": 71.75,
    "lineTotal": 287
  },
  {
    "menuItemId": 1413,
    "quantity": 3,
    "unitPrice": 10.43,
    "lineTotal": 31.29
  }
]
            
subtotal
632.93
deliveryFee
5.04
tip
8.15
total
646.12
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 340,
  "userId": 233,
  "restaurantId": 97,
  "items": [
    {
      "menuItemId": 1410,
      "quantity": 4,
      "unitPrice": 61.31,
      "lineTotal": 245.24
    },
    {
      "menuItemId": 1412,
      "quantity": 1,
      "unitPrice": 34.84,
      "lineTotal": 34.84
    },
    {
      "menuItemId": 1415,
      "quantity": 1,
      "unitPrice": 34.56,
      "lineTotal": 34.56
    },
    {
      "menuItemId": 1414,
      "quantity": 4,
      "unitPrice": 71.75,
      "lineTotal": 287
    },
    {
      "menuItemId": 1413,
      "quantity": 3,
      "unitPrice": 10.43,
      "lineTotal": 31.29
    }
  ],
  "subtotal": 632.93,
  "deliveryFee": 5.04,
  "tip": 8.15,
  "total": 646.12,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2026-01-03T05:33:34.730Z",
  "deliveredAt": "2026-01-03T07:04:10.725Z"
}