example-data.com
Menu
Browse docs and collections

Overview

food-orders / #464

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 464,
  "userId": 71,
  "restaurantId": 61,
  "items": [
    {
      "menuItemId": 937,
      "quantity": 2,
      "unitPrice": 26.96,
      "lineTotal": 53.92
    }
  ],
  "subtotal": 53.92,
  "deliveryFee": 1.04,
  "tip": 3.54,
  "total": 58.5,
  "currency": "USD",
  "status": "preparing",
  "placedAt": "2025-10-10T06:05:38.859Z",
  "deliveredAt": null
}