example-data.com
Menu
Browse docs and collections

Overview

food-orders / #418

food-orders #418

userId
Merl Jenkins @merl.jenkins6
restaurantId
Gerhold - Dietrich · North Joshua · ★ 4.9
items
              [
  {
    "menuItemId": 960,
    "quantity": 1,
    "unitPrice": 48.69,
    "lineTotal": 48.69
  },
  {
    "menuItemId": 961,
    "quantity": 4,
    "unitPrice": 43.49,
    "lineTotal": 173.96
  },
  {
    "menuItemId": 949,
    "quantity": 4,
    "unitPrice": 24.93,
    "lineTotal": 99.72
  }
]
            
subtotal
322.37
deliveryFee
6.84
tip
3.13
total
332.34
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 418,
  "userId": 60,
  "restaurantId": 63,
  "items": [
    {
      "menuItemId": 960,
      "quantity": 1,
      "unitPrice": 48.69,
      "lineTotal": 48.69
    },
    {
      "menuItemId": 961,
      "quantity": 4,
      "unitPrice": 43.49,
      "lineTotal": 173.96
    },
    {
      "menuItemId": 949,
      "quantity": 4,
      "unitPrice": 24.93,
      "lineTotal": 99.72
    }
  ],
  "subtotal": 322.37,
  "deliveryFee": 6.84,
  "tip": 3.13,
  "total": 332.34,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-12-30T07:12:42.863Z",
  "deliveredAt": "2025-12-30T09:55:39.375Z"
}