example-data.com
Menu
Browse docs and collections

Overview

food-orders / #446

food-orders #446

userId
Green Kozey @green_kozey22
restaurantId
Johns - Adams · Bradleyburgh · ★ 2.6
items
              [
  {
    "menuItemId": 882,
    "quantity": 2,
    "unitPrice": 68.35,
    "lineTotal": 136.7
  },
  {
    "menuItemId": 879,
    "quantity": 4,
    "unitPrice": 46.4,
    "lineTotal": 185.6
  }
]
            
subtotal
322.3
deliveryFee
7.82
tip
7.78
total
337.9
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 446,
  "userId": 49,
  "restaurantId": 58,
  "items": [
    {
      "menuItemId": 882,
      "quantity": 2,
      "unitPrice": 68.35,
      "lineTotal": 136.7
    },
    {
      "menuItemId": 879,
      "quantity": 4,
      "unitPrice": 46.4,
      "lineTotal": 185.6
    }
  ],
  "subtotal": 322.3,
  "deliveryFee": 7.82,
  "tip": 7.78,
  "total": 337.9,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-06-24T15:13:47.066Z",
  "deliveredAt": "2025-06-24T18:57:46.737Z"
}