example-data.com
Menu
Browse docs and collections

Overview

food-orders / #63

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 63,
  "userId": 32,
  "restaurantId": 51,
  "items": [
    {
      "menuItemId": 771,
      "quantity": 2,
      "unitPrice": 17.95,
      "lineTotal": 35.9
    }
  ],
  "subtotal": 35.9,
  "deliveryFee": 6.77,
  "tip": 3.65,
  "total": 46.32,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-11-22T07:39:04.849Z",
  "deliveredAt": "2025-11-22T10:06:17.385Z"
}