example-data.com
Menu
Browse docs and collections

Overview

food-orders / #272

food-orders #272

userId
Lacy Gusikowski @lacy.gusikowski
restaurantId
Hauck, Larson and West · Port Shayna · ★ 4.4
items
              [
  {
    "menuItemId": 1094,
    "quantity": 2,
    "unitPrice": 40.46,
    "lineTotal": 80.92
  },
  {
    "menuItemId": 1092,
    "quantity": 3,
    "unitPrice": 62.5,
    "lineTotal": 187.5
  },
  {
    "menuItemId": 1091,
    "quantity": 3,
    "unitPrice": 40.42,
    "lineTotal": 121.26
  }
]
            
subtotal
389.68
deliveryFee
0.56
tip
6.32
total
396.56
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 272,
  "userId": 47,
  "restaurantId": 73,
  "items": [
    {
      "menuItemId": 1094,
      "quantity": 2,
      "unitPrice": 40.46,
      "lineTotal": 80.92
    },
    {
      "menuItemId": 1092,
      "quantity": 3,
      "unitPrice": 62.5,
      "lineTotal": 187.5
    },
    {
      "menuItemId": 1091,
      "quantity": 3,
      "unitPrice": 40.42,
      "lineTotal": 121.26
    }
  ],
  "subtotal": 389.68,
  "deliveryFee": 0.56,
  "tip": 6.32,
  "total": 396.56,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2025-05-18T13:49:32.235Z",
  "deliveredAt": null
}