example-data.com
Menu
Browse docs and collections

Overview

food-orders / #313

food-orders #313

userId
Conrad Connelly @conrad.connelly22
restaurantId
Blanda and Sons · New Odashire · ★ 4.1
items
              [
  {
    "menuItemId": 892,
    "quantity": 1,
    "unitPrice": 70.27,
    "lineTotal": 70.27
  },
  {
    "menuItemId": 887,
    "quantity": 1,
    "unitPrice": 78.36,
    "lineTotal": 78.36
  },
  {
    "menuItemId": 884,
    "quantity": 4,
    "unitPrice": 29.24,
    "lineTotal": 116.96
  }
]
            
subtotal
265.59
deliveryFee
3.53
tip
11.36
total
280.48
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 313,
  "userId": 30,
  "restaurantId": 59,
  "items": [
    {
      "menuItemId": 892,
      "quantity": 1,
      "unitPrice": 70.27,
      "lineTotal": 70.27
    },
    {
      "menuItemId": 887,
      "quantity": 1,
      "unitPrice": 78.36,
      "lineTotal": 78.36
    },
    {
      "menuItemId": 884,
      "quantity": 4,
      "unitPrice": 29.24,
      "lineTotal": 116.96
    }
  ],
  "subtotal": 265.59,
  "deliveryFee": 3.53,
  "tip": 11.36,
  "total": 280.48,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-08-15T16:26:32.662Z",
  "deliveredAt": "2025-08-15T18:47:02.120Z"
}