example-data.com
Menu
Browse docs and collections

Overview

food-orders / #402

food-orders #402

userId
Cassidy Boehm @cassidy_boehm22
restaurantId
Welch LLC · North Brando · ★ 4.0
items
              [
  {
    "menuItemId": 1385,
    "quantity": 2,
    "unitPrice": 65.71,
    "lineTotal": 131.42
  },
  {
    "menuItemId": 1372,
    "quantity": 4,
    "unitPrice": 13.53,
    "lineTotal": 54.12
  },
  {
    "menuItemId": 1378,
    "quantity": 4,
    "unitPrice": 76.5,
    "lineTotal": 306
  },
  {
    "menuItemId": 1389,
    "quantity": 4,
    "unitPrice": 61.5,
    "lineTotal": 246
  }
]
            
subtotal
737.54
deliveryFee
1.72
tip
2.1
total
741.36
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 402,
  "userId": 204,
  "restaurantId": 95,
  "items": [
    {
      "menuItemId": 1385,
      "quantity": 2,
      "unitPrice": 65.71,
      "lineTotal": 131.42
    },
    {
      "menuItemId": 1372,
      "quantity": 4,
      "unitPrice": 13.53,
      "lineTotal": 54.12
    },
    {
      "menuItemId": 1378,
      "quantity": 4,
      "unitPrice": 76.5,
      "lineTotal": 306
    },
    {
      "menuItemId": 1389,
      "quantity": 4,
      "unitPrice": 61.5,
      "lineTotal": 246
    }
  ],
  "subtotal": 737.54,
  "deliveryFee": 1.72,
  "tip": 2.1,
  "total": 741.36,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-11-25T16:29:32.935Z",
  "deliveredAt": "2025-11-25T18:38:47.458Z"
}