example-data.com
Menu
Browse docs and collections

Overview

food-orders / #167

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 167,
  "userId": 191,
  "restaurantId": 18,
  "items": [
    {
      "menuItemId": 286,
      "quantity": 3,
      "unitPrice": 18.65,
      "lineTotal": 55.95
    }
  ],
  "subtotal": 55.95,
  "deliveryFee": 5.29,
  "tip": 8.57,
  "total": 69.81,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2026-03-15T00:10:01.033Z",
  "deliveredAt": "2026-03-15T02:51:20.998Z"
}