example-data.com
Menu
Browse docs and collections

Overview

food-orders / #485

food-orders #485

userId
Loren Schmidt @loren_schmidt
restaurantId
Harber, Wolf and Reynolds · Providencifurt · ★ 4.5
items
              [
  {
    "menuItemId": 33,
    "quantity": 1,
    "unitPrice": 28.94,
    "lineTotal": 28.94
  },
  {
    "menuItemId": 36,
    "quantity": 4,
    "unitPrice": 20.66,
    "lineTotal": 82.64
  },
  {
    "menuItemId": 34,
    "quantity": 3,
    "unitPrice": 67.63,
    "lineTotal": 202.89
  },
  {
    "menuItemId": 30,
    "quantity": 2,
    "unitPrice": 76.01,
    "lineTotal": 152.02
  },
  {
    "menuItemId": 31,
    "quantity": 3,
    "unitPrice": 69.17,
    "lineTotal": 207.51
  }
]
            
subtotal
674
deliveryFee
0.38
tip
5.38
total
679.76
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 485,
  "userId": 222,
  "restaurantId": 3,
  "items": [
    {
      "menuItemId": 33,
      "quantity": 1,
      "unitPrice": 28.94,
      "lineTotal": 28.94
    },
    {
      "menuItemId": 36,
      "quantity": 4,
      "unitPrice": 20.66,
      "lineTotal": 82.64
    },
    {
      "menuItemId": 34,
      "quantity": 3,
      "unitPrice": 67.63,
      "lineTotal": 202.89
    },
    {
      "menuItemId": 30,
      "quantity": 2,
      "unitPrice": 76.01,
      "lineTotal": 152.02
    },
    {
      "menuItemId": 31,
      "quantity": 3,
      "unitPrice": 69.17,
      "lineTotal": 207.51
    }
  ],
  "subtotal": 674,
  "deliveryFee": 0.38,
  "tip": 5.38,
  "total": 679.76,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-11-11T07:07:24.678Z",
  "deliveredAt": "2025-11-11T08:30:16.895Z"
}