example-data.com
Menu
Browse docs and collections

Overview

food-orders / #395

food-orders #395

userId
Jewell Olson @jewell_olson2
restaurantId
Collins Group · Murrieta · ★ 2.8
items
              [
  {
    "menuItemId": 301,
    "quantity": 2,
    "unitPrice": 35.73,
    "lineTotal": 71.46
  },
  {
    "menuItemId": 295,
    "quantity": 2,
    "unitPrice": 55.31,
    "lineTotal": 110.62
  }
]
            
subtotal
182.08
deliveryFee
0.75
tip
2.06
total
184.89
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 395,
  "userId": 68,
  "restaurantId": 19,
  "items": [
    {
      "menuItemId": 301,
      "quantity": 2,
      "unitPrice": 35.73,
      "lineTotal": 71.46
    },
    {
      "menuItemId": 295,
      "quantity": 2,
      "unitPrice": 55.31,
      "lineTotal": 110.62
    }
  ],
  "subtotal": 182.08,
  "deliveryFee": 0.75,
  "tip": 2.06,
  "total": 184.89,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2025-07-26T13:18:13.861Z",
  "deliveredAt": null
}