example-data.com
Menu
Browse docs and collections

Overview

food-orders / #357

food-orders #357

userId
Nikolas Wolf @nikolas.wolf
restaurantId
Franey, Volkman and Kutch · Piercecester · ★ 3.5
items
              [
  {
    "menuItemId": 597,
    "quantity": 1,
    "unitPrice": 46.35,
    "lineTotal": 46.35
  },
  {
    "menuItemId": 584,
    "quantity": 1,
    "unitPrice": 26.23,
    "lineTotal": 26.23
  },
  {
    "menuItemId": 590,
    "quantity": 2,
    "unitPrice": 78.98,
    "lineTotal": 157.96
  }
]
            
subtotal
230.54
deliveryFee
7.14
tip
1.97
total
239.65
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 357,
  "userId": 158,
  "restaurantId": 41,
  "items": [
    {
      "menuItemId": 597,
      "quantity": 1,
      "unitPrice": 46.35,
      "lineTotal": 46.35
    },
    {
      "menuItemId": 584,
      "quantity": 1,
      "unitPrice": 26.23,
      "lineTotal": 26.23
    },
    {
      "menuItemId": 590,
      "quantity": 2,
      "unitPrice": 78.98,
      "lineTotal": 157.96
    }
  ],
  "subtotal": 230.54,
  "deliveryFee": 7.14,
  "tip": 1.97,
  "total": 239.65,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2026-01-26T03:45:01.813Z",
  "deliveredAt": "2026-01-26T04:59:26.520Z"
}