example-data.com
Menu
Browse docs and collections

Overview

food-orders / #282

food-orders #282

userId
Ryan Conroy @ryan_conroy
restaurantId
Simonis - Kshlerin · Stanleybury · ★ 2.8
items
              [
  {
    "menuItemId": 682,
    "quantity": 1,
    "unitPrice": 5.31,
    "lineTotal": 5.31
  },
  {
    "menuItemId": 669,
    "quantity": 3,
    "unitPrice": 74.66,
    "lineTotal": 223.98
  }
]
            
subtotal
229.29
deliveryFee
4.94
tip
5.75
total
239.98
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 282,
  "userId": 73,
  "restaurantId": 45,
  "items": [
    {
      "menuItemId": 682,
      "quantity": 1,
      "unitPrice": 5.31,
      "lineTotal": 5.31
    },
    {
      "menuItemId": 669,
      "quantity": 3,
      "unitPrice": 74.66,
      "lineTotal": 223.98
    }
  ],
  "subtotal": 229.29,
  "deliveryFee": 4.94,
  "tip": 5.75,
  "total": 239.98,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-12-06T06:06:18.237Z",
  "deliveredAt": "2025-12-06T08:07:40.710Z"
}