example-data.com
Menu
Browse docs and collections

Overview

food-orders / #80

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 80,
  "userId": 249,
  "restaurantId": 27,
  "items": [
    {
      "menuItemId": 407,
      "quantity": 3,
      "unitPrice": 51.31,
      "lineTotal": 153.93
    }
  ],
  "subtotal": 153.93,
  "deliveryFee": 0.25,
  "tip": 4.18,
  "total": 158.36,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2026-03-03T18:37:47.873Z",
  "deliveredAt": "2026-03-03T20:45:53.253Z"
}