example-data.com
Menu
Browse docs and collections

Overview

food-orders / #310

food-orders #310

userId
Green Kozey @green_kozey22
restaurantId
Thiel and Sons · Shyanneville · ★ 4.0
items
              [
  {
    "menuItemId": 1413,
    "quantity": 2,
    "unitPrice": 10.43,
    "lineTotal": 20.86
  },
  {
    "menuItemId": 1412,
    "quantity": 3,
    "unitPrice": 34.84,
    "lineTotal": 104.52
  },
  {
    "menuItemId": 1410,
    "quantity": 3,
    "unitPrice": 61.31,
    "lineTotal": 183.93
  },
  {
    "menuItemId": 1415,
    "quantity": 3,
    "unitPrice": 34.56,
    "lineTotal": 103.68
  }
]
            
subtotal
412.99
deliveryFee
0.66
tip
1.87
total
415.52
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 310,
  "userId": 49,
  "restaurantId": 97,
  "items": [
    {
      "menuItemId": 1413,
      "quantity": 2,
      "unitPrice": 10.43,
      "lineTotal": 20.86
    },
    {
      "menuItemId": 1412,
      "quantity": 3,
      "unitPrice": 34.84,
      "lineTotal": 104.52
    },
    {
      "menuItemId": 1410,
      "quantity": 3,
      "unitPrice": 61.31,
      "lineTotal": 183.93
    },
    {
      "menuItemId": 1415,
      "quantity": 3,
      "unitPrice": 34.56,
      "lineTotal": 103.68
    }
  ],
  "subtotal": 412.99,
  "deliveryFee": 0.66,
  "tip": 1.87,
  "total": 415.52,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-10-22T03:01:03.628Z",
  "deliveredAt": "2025-10-22T04:59:48.270Z"
}