example-data.com
Menu
Browse docs and collections

Overview

food-orders / #422

food-orders #422

userId
Norbert Jacobi @norbert_jacobi92
restaurantId
Braun and Sons · Deckowland · ★ 3.6
items
              [
  {
    "menuItemId": 607,
    "quantity": 2,
    "unitPrice": 76.56,
    "lineTotal": 153.12
  },
  {
    "menuItemId": 613,
    "quantity": 4,
    "unitPrice": 76.82,
    "lineTotal": 307.28
  },
  {
    "menuItemId": 616,
    "quantity": 4,
    "unitPrice": 26.72,
    "lineTotal": 106.88
  },
  {
    "menuItemId": 603,
    "quantity": 2,
    "unitPrice": 72.25,
    "lineTotal": 144.5
  },
  {
    "menuItemId": 610,
    "quantity": 4,
    "unitPrice": 7.49,
    "lineTotal": 29.96
  }
]
            
subtotal
741.74
deliveryFee
1.57
tip
9.81
total
753.12
currency
USD
status
cancelled
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 422,
  "userId": 101,
  "restaurantId": 42,
  "items": [
    {
      "menuItemId": 607,
      "quantity": 2,
      "unitPrice": 76.56,
      "lineTotal": 153.12
    },
    {
      "menuItemId": 613,
      "quantity": 4,
      "unitPrice": 76.82,
      "lineTotal": 307.28
    },
    {
      "menuItemId": 616,
      "quantity": 4,
      "unitPrice": 26.72,
      "lineTotal": 106.88
    },
    {
      "menuItemId": 603,
      "quantity": 2,
      "unitPrice": 72.25,
      "lineTotal": 144.5
    },
    {
      "menuItemId": 610,
      "quantity": 4,
      "unitPrice": 7.49,
      "lineTotal": 29.96
    }
  ],
  "subtotal": 741.74,
  "deliveryFee": 1.57,
  "tip": 9.81,
  "total": 753.12,
  "currency": "USD",
  "status": "cancelled",
  "placedAt": "2025-10-13T13:17:25.231Z",
  "deliveredAt": null
}