example-data.com
Menu
Browse docs and collections

Overview

food-orders / #349

food-orders #349

userId
Gerald Lind @gerald_lind57
restaurantId
Heathcote Inc · Schmidtfield · ★ 2.7
items
              [
  {
    "menuItemId": 787,
    "quantity": 3,
    "unitPrice": 76.11,
    "lineTotal": 228.33
  },
  {
    "menuItemId": 794,
    "quantity": 2,
    "unitPrice": 74.92,
    "lineTotal": 149.84
  },
  {
    "menuItemId": 786,
    "quantity": 3,
    "unitPrice": 8.76,
    "lineTotal": 26.28
  },
  {
    "menuItemId": 798,
    "quantity": 2,
    "unitPrice": 73.44,
    "lineTotal": 146.88
  }
]
            
subtotal
551.33
deliveryFee
7.38
tip
3.33
total
562.04
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 349,
  "userId": 179,
  "restaurantId": 53,
  "items": [
    {
      "menuItemId": 787,
      "quantity": 3,
      "unitPrice": 76.11,
      "lineTotal": 228.33
    },
    {
      "menuItemId": 794,
      "quantity": 2,
      "unitPrice": 74.92,
      "lineTotal": 149.84
    },
    {
      "menuItemId": 786,
      "quantity": 3,
      "unitPrice": 8.76,
      "lineTotal": 26.28
    },
    {
      "menuItemId": 798,
      "quantity": 2,
      "unitPrice": 73.44,
      "lineTotal": 146.88
    }
  ],
  "subtotal": 551.33,
  "deliveryFee": 7.38,
  "tip": 3.33,
  "total": 562.04,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-03-24T02:16:11.256Z",
  "deliveredAt": "2025-03-24T05:32:39.360Z"
}