example-data.com
Menu
Browse docs and collections

Overview

food-orders / #279

food-orders #279

userId
Daisy Kuhic @daisy_kuhic24
restaurantId
Weimann, Herzog and Wisoky · Grahamberg · ★ 3.2
items
              [
  {
    "menuItemId": 1288,
    "quantity": 3,
    "unitPrice": 25.49,
    "lineTotal": 76.47
  },
  {
    "menuItemId": 1284,
    "quantity": 2,
    "unitPrice": 66.71,
    "lineTotal": 133.42
  },
  {
    "menuItemId": 1289,
    "quantity": 4,
    "unitPrice": 60.13,
    "lineTotal": 240.52
  }
]
            
subtotal
450.41
deliveryFee
2.23
tip
5.55
total
458.19
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 279,
  "userId": 172,
  "restaurantId": 89,
  "items": [
    {
      "menuItemId": 1288,
      "quantity": 3,
      "unitPrice": 25.49,
      "lineTotal": 76.47
    },
    {
      "menuItemId": 1284,
      "quantity": 2,
      "unitPrice": 66.71,
      "lineTotal": 133.42
    },
    {
      "menuItemId": 1289,
      "quantity": 4,
      "unitPrice": 60.13,
      "lineTotal": 240.52
    }
  ],
  "subtotal": 450.41,
  "deliveryFee": 2.23,
  "tip": 5.55,
  "total": 458.19,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2025-07-03T19:34:53.806Z",
  "deliveredAt": null
}