example-data.com
Menu
Browse docs and collections

Overview

food-orders / #321

food-orders #321

userId
Marilou Douglas @marilou.douglas
restaurantId
Robel, Walter and Davis · Honolulu · ★ 4.4
items
              [
  {
    "menuItemId": 22,
    "quantity": 1,
    "unitPrice": 20.78,
    "lineTotal": 20.78
  },
  {
    "menuItemId": 18,
    "quantity": 3,
    "unitPrice": 66.24,
    "lineTotal": 198.72
  },
  {
    "menuItemId": 9,
    "quantity": 2,
    "unitPrice": 31.3,
    "lineTotal": 62.6
  }
]
            
subtotal
282.1
deliveryFee
5.99
tip
3.15
total
291.24
currency
USD
status
cancelled
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 321,
  "userId": 78,
  "restaurantId": 2,
  "items": [
    {
      "menuItemId": 22,
      "quantity": 1,
      "unitPrice": 20.78,
      "lineTotal": 20.78
    },
    {
      "menuItemId": 18,
      "quantity": 3,
      "unitPrice": 66.24,
      "lineTotal": 198.72
    },
    {
      "menuItemId": 9,
      "quantity": 2,
      "unitPrice": 31.3,
      "lineTotal": 62.6
    }
  ],
  "subtotal": 282.1,
  "deliveryFee": 5.99,
  "tip": 3.15,
  "total": 291.24,
  "currency": "USD",
  "status": "cancelled",
  "placedAt": "2025-09-02T12:13:05.672Z",
  "deliveredAt": null
}