example-data.com
Menu
Browse docs and collections

Overview

food-orders / #356

food-orders #356

userId
Della Labadie @della_labadie
restaurantId
O'Hara and Sons · New Eloisaboro · ★ 4.4
items
              [
  {
    "menuItemId": 7,
    "quantity": 1,
    "unitPrice": 35.62,
    "lineTotal": 35.62
  },
  {
    "menuItemId": 5,
    "quantity": 3,
    "unitPrice": 16.36,
    "lineTotal": 49.08
  },
  {
    "menuItemId": 2,
    "quantity": 3,
    "unitPrice": 4.82,
    "lineTotal": 14.46
  }
]
            
subtotal
99.16
deliveryFee
1.77
tip
3.4
total
104.33
currency
USD
status
placed
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 356,
  "userId": 46,
  "restaurantId": 1,
  "items": [
    {
      "menuItemId": 7,
      "quantity": 1,
      "unitPrice": 35.62,
      "lineTotal": 35.62
    },
    {
      "menuItemId": 5,
      "quantity": 3,
      "unitPrice": 16.36,
      "lineTotal": 49.08
    },
    {
      "menuItemId": 2,
      "quantity": 3,
      "unitPrice": 4.82,
      "lineTotal": 14.46
    }
  ],
  "subtotal": 99.16,
  "deliveryFee": 1.77,
  "tip": 3.4,
  "total": 104.33,
  "currency": "USD",
  "status": "placed",
  "placedAt": "2025-06-19T20:17:20.341Z",
  "deliveredAt": null
}