example-data.com
Menu
Browse docs and collections

Overview

food-orders / #165

food-orders #165

userId
Allan Buckridge @allan_buckridge
restaurantId
Koelpin - Lueilwitz · Salem · ★ 2.7
items
              [
  {
    "menuItemId": 830,
    "quantity": 3,
    "unitPrice": 41.57,
    "lineTotal": 124.71
  },
  {
    "menuItemId": 835,
    "quantity": 2,
    "unitPrice": 39.53,
    "lineTotal": 79.06
  }
]
            
subtotal
203.77
deliveryFee
5.36
tip
3.57
total
212.7
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 165,
  "userId": 106,
  "restaurantId": 55,
  "items": [
    {
      "menuItemId": 830,
      "quantity": 3,
      "unitPrice": 41.57,
      "lineTotal": 124.71
    },
    {
      "menuItemId": 835,
      "quantity": 2,
      "unitPrice": 39.53,
      "lineTotal": 79.06
    }
  ],
  "subtotal": 203.77,
  "deliveryFee": 5.36,
  "tip": 3.57,
  "total": 212.7,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2025-12-30T12:44:13.116Z",
  "deliveredAt": null
}