example-data.com
Menu
Browse docs and collections

Overview

food-orders / #409

food-orders #409

userId
Gavin Lowe @gavin_lowe
restaurantId
Simonis, Reynolds and Harber · Dahliastead · ★ 3.5
items
              [
  {
    "menuItemId": 269,
    "quantity": 4,
    "unitPrice": 66.78,
    "lineTotal": 267.12
  },
  {
    "menuItemId": 255,
    "quantity": 4,
    "unitPrice": 45.53,
    "lineTotal": 182.12
  },
  {
    "menuItemId": 275,
    "quantity": 2,
    "unitPrice": 67.32,
    "lineTotal": 134.64
  },
  {
    "menuItemId": 273,
    "quantity": 3,
    "unitPrice": 59.36,
    "lineTotal": 178.08
  }
]
            
subtotal
761.96
deliveryFee
6.01
tip
2.76
total
770.73
currency
USD
status
preparing
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 409,
  "userId": 17,
  "restaurantId": 17,
  "items": [
    {
      "menuItemId": 269,
      "quantity": 4,
      "unitPrice": 66.78,
      "lineTotal": 267.12
    },
    {
      "menuItemId": 255,
      "quantity": 4,
      "unitPrice": 45.53,
      "lineTotal": 182.12
    },
    {
      "menuItemId": 275,
      "quantity": 2,
      "unitPrice": 67.32,
      "lineTotal": 134.64
    },
    {
      "menuItemId": 273,
      "quantity": 3,
      "unitPrice": 59.36,
      "lineTotal": 178.08
    }
  ],
  "subtotal": 761.96,
  "deliveryFee": 6.01,
  "tip": 2.76,
  "total": 770.73,
  "currency": "USD",
  "status": "preparing",
  "placedAt": "2025-08-08T12:39:07.208Z",
  "deliveredAt": null
}