example-data.com
Menu
Browse docs and collections

Overview

food-orders / #457

food-orders #457

userId
Pinkie Denesik @pinkie_denesik32
restaurantId
Auer, Franey and Nicolas · Lake Kacey · ★ 4.1
items
              [
  {
    "menuItemId": 395,
    "quantity": 3,
    "unitPrice": 65.51,
    "lineTotal": 196.53
  },
  {
    "menuItemId": 397,
    "quantity": 1,
    "unitPrice": 11.75,
    "lineTotal": 11.75
  },
  {
    "menuItemId": 398,
    "quantity": 1,
    "unitPrice": 24.39,
    "lineTotal": 24.39
  },
  {
    "menuItemId": 399,
    "quantity": 3,
    "unitPrice": 25.49,
    "lineTotal": 76.47
  }
]
            
subtotal
309.14
deliveryFee
6.28
tip
10.22
total
325.64
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 457,
  "userId": 88,
  "restaurantId": 26,
  "items": [
    {
      "menuItemId": 395,
      "quantity": 3,
      "unitPrice": 65.51,
      "lineTotal": 196.53
    },
    {
      "menuItemId": 397,
      "quantity": 1,
      "unitPrice": 11.75,
      "lineTotal": 11.75
    },
    {
      "menuItemId": 398,
      "quantity": 1,
      "unitPrice": 24.39,
      "lineTotal": 24.39
    },
    {
      "menuItemId": 399,
      "quantity": 3,
      "unitPrice": 25.49,
      "lineTotal": 76.47
    }
  ],
  "subtotal": 309.14,
  "deliveryFee": 6.28,
  "tip": 10.22,
  "total": 325.64,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-10-31T06:53:38.787Z",
  "deliveredAt": "2025-10-31T08:56:23.026Z"
}