example-data.com
Menu
Browse docs and collections

Overview

food-orders / #177

food-orders #177

userId
Maymie Boehm @maymie.boehm90
restaurantId
McDermott - Metz · East Darlene · ★ 2.7
items
              [
  {
    "menuItemId": 63,
    "quantity": 1,
    "unitPrice": 48.84,
    "lineTotal": 48.84
  },
  {
    "menuItemId": 56,
    "quantity": 1,
    "unitPrice": 55.67,
    "lineTotal": 55.67
  },
  {
    "menuItemId": 58,
    "quantity": 3,
    "unitPrice": 33.94,
    "lineTotal": 101.82
  },
  {
    "menuItemId": 57,
    "quantity": 4,
    "unitPrice": 33.8,
    "lineTotal": 135.2
  }
]
            
subtotal
341.53
deliveryFee
4.39
tip
4.41
total
350.33
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 177,
  "userId": 48,
  "restaurantId": 6,
  "items": [
    {
      "menuItemId": 63,
      "quantity": 1,
      "unitPrice": 48.84,
      "lineTotal": 48.84
    },
    {
      "menuItemId": 56,
      "quantity": 1,
      "unitPrice": 55.67,
      "lineTotal": 55.67
    },
    {
      "menuItemId": 58,
      "quantity": 3,
      "unitPrice": 33.94,
      "lineTotal": 101.82
    },
    {
      "menuItemId": 57,
      "quantity": 4,
      "unitPrice": 33.8,
      "lineTotal": 135.2
    }
  ],
  "subtotal": 341.53,
  "deliveryFee": 4.39,
  "tip": 4.41,
  "total": 350.33,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2025-06-28T16:33:36.089Z",
  "deliveredAt": null
}