example-data.com
Menu
Browse docs and collections

Overview

food-orders / #298

food-orders #298

userId
Perry Kerluke @perry_kerluke83
restaurantId
Lehner - Smith · Larkinfurt · ★ 3.0
items
              [
  {
    "menuItemId": 1349,
    "quantity": 2,
    "unitPrice": 43.63,
    "lineTotal": 87.26
  },
  {
    "menuItemId": 1357,
    "quantity": 1,
    "unitPrice": 30.02,
    "lineTotal": 30.02
  },
  {
    "menuItemId": 1359,
    "quantity": 3,
    "unitPrice": 66.05,
    "lineTotal": 198.15
  },
  {
    "menuItemId": 1353,
    "quantity": 1,
    "unitPrice": 5.73,
    "lineTotal": 5.73
  },
  {
    "menuItemId": 1361,
    "quantity": 3,
    "unitPrice": 61.25,
    "lineTotal": 183.75
  }
]
            
subtotal
504.91
deliveryFee
5.96
tip
2.4
total
513.27
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 298,
  "userId": 174,
  "restaurantId": 93,
  "items": [
    {
      "menuItemId": 1349,
      "quantity": 2,
      "unitPrice": 43.63,
      "lineTotal": 87.26
    },
    {
      "menuItemId": 1357,
      "quantity": 1,
      "unitPrice": 30.02,
      "lineTotal": 30.02
    },
    {
      "menuItemId": 1359,
      "quantity": 3,
      "unitPrice": 66.05,
      "lineTotal": 198.15
    },
    {
      "menuItemId": 1353,
      "quantity": 1,
      "unitPrice": 5.73,
      "lineTotal": 5.73
    },
    {
      "menuItemId": 1361,
      "quantity": 3,
      "unitPrice": 61.25,
      "lineTotal": 183.75
    }
  ],
  "subtotal": 504.91,
  "deliveryFee": 5.96,
  "tip": 2.4,
  "total": 513.27,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2025-10-18T09:04:34.334Z",
  "deliveredAt": null
}