example-data.com
Menu
Browse docs and collections

Overview

food-orders / #455

food-orders #455

userId
Loren Schmidt @loren_schmidt
restaurantId
Simonis, Reynolds and Harber · Dahliastead · ★ 3.5
items
              [
  {
    "menuItemId": 258,
    "quantity": 2,
    "unitPrice": 42.86,
    "lineTotal": 85.72
  },
  {
    "menuItemId": 272,
    "quantity": 4,
    "unitPrice": 17.33,
    "lineTotal": 69.32
  },
  {
    "menuItemId": 250,
    "quantity": 4,
    "unitPrice": 40.15,
    "lineTotal": 160.6
  },
  {
    "menuItemId": 256,
    "quantity": 3,
    "unitPrice": 6.93,
    "lineTotal": 20.79
  },
  {
    "menuItemId": 260,
    "quantity": 4,
    "unitPrice": 36.04,
    "lineTotal": 144.16
  }
]
            
subtotal
480.59
deliveryFee
5.76
tip
7.57
total
493.92
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 455,
  "userId": 222,
  "restaurantId": 17,
  "items": [
    {
      "menuItemId": 258,
      "quantity": 2,
      "unitPrice": 42.86,
      "lineTotal": 85.72
    },
    {
      "menuItemId": 272,
      "quantity": 4,
      "unitPrice": 17.33,
      "lineTotal": 69.32
    },
    {
      "menuItemId": 250,
      "quantity": 4,
      "unitPrice": 40.15,
      "lineTotal": 160.6
    },
    {
      "menuItemId": 256,
      "quantity": 3,
      "unitPrice": 6.93,
      "lineTotal": 20.79
    },
    {
      "menuItemId": 260,
      "quantity": 4,
      "unitPrice": 36.04,
      "lineTotal": 144.16
    }
  ],
  "subtotal": 480.59,
  "deliveryFee": 5.76,
  "tip": 7.57,
  "total": 493.92,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2025-12-04T05:10:45.711Z",
  "deliveredAt": null
}