example-data.com
Menu
Browse docs and collections

Overview

food-orders / #365

food-orders #365

userId
Dwight Dicki-Medhurst @dwight.dicki-medhurst69
restaurantId
Haley, Denesik and Walker · Port Chloe · ★ 3.3
items
              [
  {
    "menuItemId": 1431,
    "quantity": 3,
    "unitPrice": 31.53,
    "lineTotal": 94.59
  },
  {
    "menuItemId": 1443,
    "quantity": 3,
    "unitPrice": 63.95,
    "lineTotal": 191.85
  },
  {
    "menuItemId": 1432,
    "quantity": 1,
    "unitPrice": 13.28,
    "lineTotal": 13.28
  },
  {
    "menuItemId": 1436,
    "quantity": 1,
    "unitPrice": 34.63,
    "lineTotal": 34.63
  }
]
            
subtotal
334.35
deliveryFee
2.98
tip
9.95
total
347.28
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 365,
  "userId": 35,
  "restaurantId": 99,
  "items": [
    {
      "menuItemId": 1431,
      "quantity": 3,
      "unitPrice": 31.53,
      "lineTotal": 94.59
    },
    {
      "menuItemId": 1443,
      "quantity": 3,
      "unitPrice": 63.95,
      "lineTotal": 191.85
    },
    {
      "menuItemId": 1432,
      "quantity": 1,
      "unitPrice": 13.28,
      "lineTotal": 13.28
    },
    {
      "menuItemId": 1436,
      "quantity": 1,
      "unitPrice": 34.63,
      "lineTotal": 34.63
    }
  ],
  "subtotal": 334.35,
  "deliveryFee": 2.98,
  "tip": 9.95,
  "total": 347.28,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-12-03T06:16:57.164Z",
  "deliveredAt": "2025-12-03T09:50:12.585Z"
}