example-data.com
Menu
Browse docs and collections

Overview

food-orders / #397

food-orders #397

userId
Celia D'Amore @celia_damore
restaurantId
Robel, Walter and Davis · Honolulu · ★ 4.4
items
              [
  {
    "menuItemId": 25,
    "quantity": 2,
    "unitPrice": 58.88,
    "lineTotal": 117.76
  },
  {
    "menuItemId": 11,
    "quantity": 2,
    "unitPrice": 31.51,
    "lineTotal": 63.02
  },
  {
    "menuItemId": 16,
    "quantity": 4,
    "unitPrice": 49.73,
    "lineTotal": 198.92
  },
  {
    "menuItemId": 9,
    "quantity": 4,
    "unitPrice": 31.3,
    "lineTotal": 125.2
  },
  {
    "menuItemId": 10,
    "quantity": 2,
    "unitPrice": 12.52,
    "lineTotal": 25.04
  }
]
            
subtotal
529.94
deliveryFee
6.3
tip
7.45
total
543.69
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 397,
  "userId": 24,
  "restaurantId": 2,
  "items": [
    {
      "menuItemId": 25,
      "quantity": 2,
      "unitPrice": 58.88,
      "lineTotal": 117.76
    },
    {
      "menuItemId": 11,
      "quantity": 2,
      "unitPrice": 31.51,
      "lineTotal": 63.02
    },
    {
      "menuItemId": 16,
      "quantity": 4,
      "unitPrice": 49.73,
      "lineTotal": 198.92
    },
    {
      "menuItemId": 9,
      "quantity": 4,
      "unitPrice": 31.3,
      "lineTotal": 125.2
    },
    {
      "menuItemId": 10,
      "quantity": 2,
      "unitPrice": 12.52,
      "lineTotal": 25.04
    }
  ],
  "subtotal": 529.94,
  "deliveryFee": 6.3,
  "tip": 7.45,
  "total": 543.69,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2026-02-22T16:09:57.780Z",
  "deliveredAt": null
}