example-data.com
Menu
Browse docs and collections

Overview

food-orders / #354

food-orders #354

userId
Kathleen Lynch @kathleen_lynch1
restaurantId
Kshlerin - Champlin · Marquardtfort · ★ 4.4
items
              [
  {
    "menuItemId": 160,
    "quantity": 1,
    "unitPrice": 44.31,
    "lineTotal": 44.31
  },
  {
    "menuItemId": 149,
    "quantity": 3,
    "unitPrice": 38.74,
    "lineTotal": 116.22
  },
  {
    "menuItemId": 158,
    "quantity": 4,
    "unitPrice": 5.91,
    "lineTotal": 23.64
  },
  {
    "menuItemId": 161,
    "quantity": 3,
    "unitPrice": 48.47,
    "lineTotal": 145.41
  }
]
            
subtotal
329.58
deliveryFee
7.82
tip
1.18
total
338.58
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 354,
  "userId": 139,
  "restaurantId": 11,
  "items": [
    {
      "menuItemId": 160,
      "quantity": 1,
      "unitPrice": 44.31,
      "lineTotal": 44.31
    },
    {
      "menuItemId": 149,
      "quantity": 3,
      "unitPrice": 38.74,
      "lineTotal": 116.22
    },
    {
      "menuItemId": 158,
      "quantity": 4,
      "unitPrice": 5.91,
      "lineTotal": 23.64
    },
    {
      "menuItemId": 161,
      "quantity": 3,
      "unitPrice": 48.47,
      "lineTotal": 145.41
    }
  ],
  "subtotal": 329.58,
  "deliveryFee": 7.82,
  "tip": 1.18,
  "total": 338.58,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2026-04-25T06:15:54.635Z",
  "deliveredAt": "2026-04-25T08:04:52.789Z"
}