example-data.com
Menu
Browse docs and collections

Overview

food-orders / #73

food-orders #73

userId
Ludwig Stiedemann @ludwig_stiedemann
restaurantId
Thiel and Sons · Shyanneville · ★ 4.0
items
              [
  {
    "menuItemId": 1414,
    "quantity": 3,
    "unitPrice": 71.75,
    "lineTotal": 215.25
  },
  {
    "menuItemId": 1411,
    "quantity": 4,
    "unitPrice": 75.28,
    "lineTotal": 301.12
  },
  {
    "menuItemId": 1415,
    "quantity": 1,
    "unitPrice": 34.56,
    "lineTotal": 34.56
  },
  {
    "menuItemId": 1413,
    "quantity": 4,
    "unitPrice": 10.43,
    "lineTotal": 41.72
  }
]
            
subtotal
592.65
deliveryFee
0.13
tip
2.78
total
595.56
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 73,
  "userId": 132,
  "restaurantId": 97,
  "items": [
    {
      "menuItemId": 1414,
      "quantity": 3,
      "unitPrice": 71.75,
      "lineTotal": 215.25
    },
    {
      "menuItemId": 1411,
      "quantity": 4,
      "unitPrice": 75.28,
      "lineTotal": 301.12
    },
    {
      "menuItemId": 1415,
      "quantity": 1,
      "unitPrice": 34.56,
      "lineTotal": 34.56
    },
    {
      "menuItemId": 1413,
      "quantity": 4,
      "unitPrice": 10.43,
      "lineTotal": 41.72
    }
  ],
  "subtotal": 592.65,
  "deliveryFee": 0.13,
  "tip": 2.78,
  "total": 595.56,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-03-16T13:23:28.567Z",
  "deliveredAt": "2025-03-16T17:19:49.939Z"
}