example-data.com
Menu
Browse docs and collections

Overview

food-orders / #338

food-orders #338

userId
Theresia Collins @theresia_collins86
restaurantId
O'Hara and Sons · New Eloisaboro · ★ 4.4
items
              [
  {
    "menuItemId": 2,
    "quantity": 2,
    "unitPrice": 4.82,
    "lineTotal": 9.64
  },
  {
    "menuItemId": 3,
    "quantity": 4,
    "unitPrice": 9.71,
    "lineTotal": 38.84
  },
  {
    "menuItemId": 8,
    "quantity": 4,
    "unitPrice": 48.88,
    "lineTotal": 195.52
  },
  {
    "menuItemId": 7,
    "quantity": 4,
    "unitPrice": 35.62,
    "lineTotal": 142.48
  }
]
            
subtotal
386.48
deliveryFee
7.51
tip
11.43
total
405.42
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 338,
  "userId": 63,
  "restaurantId": 1,
  "items": [
    {
      "menuItemId": 2,
      "quantity": 2,
      "unitPrice": 4.82,
      "lineTotal": 9.64
    },
    {
      "menuItemId": 3,
      "quantity": 4,
      "unitPrice": 9.71,
      "lineTotal": 38.84
    },
    {
      "menuItemId": 8,
      "quantity": 4,
      "unitPrice": 48.88,
      "lineTotal": 195.52
    },
    {
      "menuItemId": 7,
      "quantity": 4,
      "unitPrice": 35.62,
      "lineTotal": 142.48
    }
  ],
  "subtotal": 386.48,
  "deliveryFee": 7.51,
  "tip": 11.43,
  "total": 405.42,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2026-04-30T23:12:47.197Z",
  "deliveredAt": "2026-05-01T01:59:07.133Z"
}