example-data.com
Menu
Browse docs and collections

Overview

food-orders / #283

food-orders #283

userId
Marlin Goldner @marlin_goldner6
restaurantId
Aufderhar - Johns · East Lorenside · ★ 4.5
items
              [
  {
    "menuItemId": 1421,
    "quantity": 4,
    "unitPrice": 30.72,
    "lineTotal": 122.88
  },
  {
    "menuItemId": 1424,
    "quantity": 2,
    "unitPrice": 65.44,
    "lineTotal": 130.88
  },
  {
    "menuItemId": 1417,
    "quantity": 1,
    "unitPrice": 20.71,
    "lineTotal": 20.71
  },
  {
    "menuItemId": 1426,
    "quantity": 2,
    "unitPrice": 75.59,
    "lineTotal": 151.18
  }
]
            
subtotal
425.65
deliveryFee
7.3
tip
0.91
total
433.86
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 283,
  "userId": 160,
  "restaurantId": 98,
  "items": [
    {
      "menuItemId": 1421,
      "quantity": 4,
      "unitPrice": 30.72,
      "lineTotal": 122.88
    },
    {
      "menuItemId": 1424,
      "quantity": 2,
      "unitPrice": 65.44,
      "lineTotal": 130.88
    },
    {
      "menuItemId": 1417,
      "quantity": 1,
      "unitPrice": 20.71,
      "lineTotal": 20.71
    },
    {
      "menuItemId": 1426,
      "quantity": 2,
      "unitPrice": 75.59,
      "lineTotal": 151.18
    }
  ],
  "subtotal": 425.65,
  "deliveryFee": 7.3,
  "tip": 0.91,
  "total": 433.86,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-11-01T15:10:14.925Z",
  "deliveredAt": "2025-11-01T17:03:17.235Z"
}