example-data.com
Menu
Browse docs and collections

Overview

food-orders / #209

food-orders #209

userId
Ike Breitenberg @ike.breitenberg
restaurantId
Howe, Kunde and Ortiz · Rosemead · ★ 4.9
items
              [
  {
    "menuItemId": 1155,
    "quantity": 1,
    "unitPrice": 27.12,
    "lineTotal": 27.12
  },
  {
    "menuItemId": 1157,
    "quantity": 3,
    "unitPrice": 3.82,
    "lineTotal": 11.46
  },
  {
    "menuItemId": 1154,
    "quantity": 1,
    "unitPrice": 68.24,
    "lineTotal": 68.24
  },
  {
    "menuItemId": 1162,
    "quantity": 1,
    "unitPrice": 13.8,
    "lineTotal": 13.8
  }
]
            
subtotal
120.62
deliveryFee
3.47
tip
3.65
total
127.74
currency
USD
status
preparing
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 209,
  "userId": 72,
  "restaurantId": 79,
  "items": [
    {
      "menuItemId": 1155,
      "quantity": 1,
      "unitPrice": 27.12,
      "lineTotal": 27.12
    },
    {
      "menuItemId": 1157,
      "quantity": 3,
      "unitPrice": 3.82,
      "lineTotal": 11.46
    },
    {
      "menuItemId": 1154,
      "quantity": 1,
      "unitPrice": 68.24,
      "lineTotal": 68.24
    },
    {
      "menuItemId": 1162,
      "quantity": 1,
      "unitPrice": 13.8,
      "lineTotal": 13.8
    }
  ],
  "subtotal": 120.62,
  "deliveryFee": 3.47,
  "tip": 3.65,
  "total": 127.74,
  "currency": "USD",
  "status": "preparing",
  "placedAt": "2025-03-20T05:11:19.339Z",
  "deliveredAt": null
}