example-data.com
Menu
Browse docs and collections

Overview

food-orders / #404

food-orders #404

userId
Vincenza Zemlak-Collier @vincenza_zemlak-collier
restaurantId
Ritchie - Rowe · Trompfort · ★ 2.9
items
              [
  {
    "menuItemId": 1242,
    "quantity": 1,
    "unitPrice": 55.8,
    "lineTotal": 55.8
  },
  {
    "menuItemId": 1237,
    "quantity": 3,
    "unitPrice": 76.78,
    "lineTotal": 230.34
  },
  {
    "menuItemId": 1239,
    "quantity": 1,
    "unitPrice": 34.8,
    "lineTotal": 34.8
  }
]
            
subtotal
320.94
deliveryFee
0.39
tip
10.48
total
331.81
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 404,
  "userId": 168,
  "restaurantId": 85,
  "items": [
    {
      "menuItemId": 1242,
      "quantity": 1,
      "unitPrice": 55.8,
      "lineTotal": 55.8
    },
    {
      "menuItemId": 1237,
      "quantity": 3,
      "unitPrice": 76.78,
      "lineTotal": 230.34
    },
    {
      "menuItemId": 1239,
      "quantity": 1,
      "unitPrice": 34.8,
      "lineTotal": 34.8
    }
  ],
  "subtotal": 320.94,
  "deliveryFee": 0.39,
  "tip": 10.48,
  "total": 331.81,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-04-16T20:21:36.613Z",
  "deliveredAt": "2025-04-16T23:55:17.305Z"
}