example-data.com
Menu
Browse docs and collections

Overview

food-orders / #102

food-orders #102

userId
Orrin Grant @orrin.grant42
restaurantId
Heathcote Group · New Eduardoboro · ★ 4.0
items
              [
  {
    "menuItemId": 1192,
    "quantity": 2,
    "unitPrice": 56.59,
    "lineTotal": 113.18
  },
  {
    "menuItemId": 1181,
    "quantity": 4,
    "unitPrice": 52.58,
    "lineTotal": 210.32
  },
  {
    "menuItemId": 1173,
    "quantity": 1,
    "unitPrice": 38.19,
    "lineTotal": 38.19
  }
]
            
subtotal
361.69
deliveryFee
0.89
tip
11.54
total
374.12
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 102,
  "userId": 152,
  "restaurantId": 80,
  "items": [
    {
      "menuItemId": 1192,
      "quantity": 2,
      "unitPrice": 56.59,
      "lineTotal": 113.18
    },
    {
      "menuItemId": 1181,
      "quantity": 4,
      "unitPrice": 52.58,
      "lineTotal": 210.32
    },
    {
      "menuItemId": 1173,
      "quantity": 1,
      "unitPrice": 38.19,
      "lineTotal": 38.19
    }
  ],
  "subtotal": 361.69,
  "deliveryFee": 0.89,
  "tip": 11.54,
  "total": 374.12,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2026-04-25T23:05:14.682Z",
  "deliveredAt": null
}