example-data.com
Menu
Browse docs and collections

Overview

food-orders / #438

food-orders #438

userId
Cyril Frami @cyril_frami88
restaurantId
Blanda and Sons · New Odashire · ★ 4.1
items
              [
  {
    "menuItemId": 897,
    "quantity": 3,
    "unitPrice": 27.35,
    "lineTotal": 82.05
  },
  {
    "menuItemId": 900,
    "quantity": 4,
    "unitPrice": 31.5,
    "lineTotal": 126
  }
]
            
subtotal
208.05
deliveryFee
7.85
tip
2.88
total
218.78
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 438,
  "userId": 182,
  "restaurantId": 59,
  "items": [
    {
      "menuItemId": 897,
      "quantity": 3,
      "unitPrice": 27.35,
      "lineTotal": 82.05
    },
    {
      "menuItemId": 900,
      "quantity": 4,
      "unitPrice": 31.5,
      "lineTotal": 126
    }
  ],
  "subtotal": 208.05,
  "deliveryFee": 7.85,
  "tip": 2.88,
  "total": 218.78,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-07-30T10:21:29.836Z",
  "deliveredAt": "2025-07-30T13:36:39.998Z"
}