example-data.com
Menu
Browse docs and collections

Overview

food-orders / #253

food-orders #253

userId
Alanna Kilback @alanna_kilback31
restaurantId
Lehner - Smith · Larkinfurt · ★ 3.0
items
              [
  {
    "menuItemId": 1347,
    "quantity": 3,
    "unitPrice": 59.9,
    "lineTotal": 179.7
  },
  {
    "menuItemId": 1353,
    "quantity": 1,
    "unitPrice": 5.73,
    "lineTotal": 5.73
  },
  {
    "menuItemId": 1355,
    "quantity": 3,
    "unitPrice": 79.15,
    "lineTotal": 237.45
  },
  {
    "menuItemId": 1360,
    "quantity": 4,
    "unitPrice": 53.67,
    "lineTotal": 214.68
  },
  {
    "menuItemId": 1352,
    "quantity": 1,
    "unitPrice": 70.62,
    "lineTotal": 70.62
  }
]
            
subtotal
708.18
deliveryFee
1.8
tip
2.87
total
712.85
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 253,
  "userId": 14,
  "restaurantId": 93,
  "items": [
    {
      "menuItemId": 1347,
      "quantity": 3,
      "unitPrice": 59.9,
      "lineTotal": 179.7
    },
    {
      "menuItemId": 1353,
      "quantity": 1,
      "unitPrice": 5.73,
      "lineTotal": 5.73
    },
    {
      "menuItemId": 1355,
      "quantity": 3,
      "unitPrice": 79.15,
      "lineTotal": 237.45
    },
    {
      "menuItemId": 1360,
      "quantity": 4,
      "unitPrice": 53.67,
      "lineTotal": 214.68
    },
    {
      "menuItemId": 1352,
      "quantity": 1,
      "unitPrice": 70.62,
      "lineTotal": 70.62
    }
  ],
  "subtotal": 708.18,
  "deliveryFee": 1.8,
  "tip": 2.87,
  "total": 712.85,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-06-12T16:46:25.577Z",
  "deliveredAt": "2025-06-12T20:09:26.193Z"
}