example-data.com
Menu
Browse docs and collections

Overview

food-orders / #330

food-orders #330

userId
Maryam Kunze @maryam_kunze
restaurantId
Johns - Adams · Bradleyburgh · ★ 2.6
items
              [
  {
    "menuItemId": 873,
    "quantity": 4,
    "unitPrice": 11.97,
    "lineTotal": 47.88
  },
  {
    "menuItemId": 879,
    "quantity": 1,
    "unitPrice": 46.4,
    "lineTotal": 46.4
  },
  {
    "menuItemId": 880,
    "quantity": 4,
    "unitPrice": 72.27,
    "lineTotal": 289.08
  },
  {
    "menuItemId": 883,
    "quantity": 2,
    "unitPrice": 54.27,
    "lineTotal": 108.54
  },
  {
    "menuItemId": 876,
    "quantity": 3,
    "unitPrice": 26.65,
    "lineTotal": 79.95
  }
]
            
subtotal
571.85
deliveryFee
4.21
tip
7.53
total
583.59
currency
USD
status
preparing
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 330,
  "userId": 195,
  "restaurantId": 58,
  "items": [
    {
      "menuItemId": 873,
      "quantity": 4,
      "unitPrice": 11.97,
      "lineTotal": 47.88
    },
    {
      "menuItemId": 879,
      "quantity": 1,
      "unitPrice": 46.4,
      "lineTotal": 46.4
    },
    {
      "menuItemId": 880,
      "quantity": 4,
      "unitPrice": 72.27,
      "lineTotal": 289.08
    },
    {
      "menuItemId": 883,
      "quantity": 2,
      "unitPrice": 54.27,
      "lineTotal": 108.54
    },
    {
      "menuItemId": 876,
      "quantity": 3,
      "unitPrice": 26.65,
      "lineTotal": 79.95
    }
  ],
  "subtotal": 571.85,
  "deliveryFee": 4.21,
  "tip": 7.53,
  "total": 583.59,
  "currency": "USD",
  "status": "preparing",
  "placedAt": "2025-12-12T08:24:21.135Z",
  "deliveredAt": null
}