example-data.com
Menu
Browse docs and collections

Overview

food-orders / #453

food-orders #453

userId
Kamryn Rogahn @kamryn_rogahn40
restaurantId
Durgan Group · Fort Collins · ★ 3.1
items
              [
  {
    "menuItemId": 47,
    "quantity": 4,
    "unitPrice": 56.05,
    "lineTotal": 224.2
  },
  {
    "menuItemId": 48,
    "quantity": 2,
    "unitPrice": 57.67,
    "lineTotal": 115.34
  },
  {
    "menuItemId": 49,
    "quantity": 3,
    "unitPrice": 78.67,
    "lineTotal": 236.01
  },
  {
    "menuItemId": 51,
    "quantity": 1,
    "unitPrice": 58.78,
    "lineTotal": 58.78
  },
  {
    "menuItemId": 50,
    "quantity": 1,
    "unitPrice": 34.46,
    "lineTotal": 34.46
  }
]
            
subtotal
668.79
deliveryFee
3.53
tip
0.39
total
672.71
currency
USD
status
cancelled
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 453,
  "userId": 170,
  "restaurantId": 5,
  "items": [
    {
      "menuItemId": 47,
      "quantity": 4,
      "unitPrice": 56.05,
      "lineTotal": 224.2
    },
    {
      "menuItemId": 48,
      "quantity": 2,
      "unitPrice": 57.67,
      "lineTotal": 115.34
    },
    {
      "menuItemId": 49,
      "quantity": 3,
      "unitPrice": 78.67,
      "lineTotal": 236.01
    },
    {
      "menuItemId": 51,
      "quantity": 1,
      "unitPrice": 58.78,
      "lineTotal": 58.78
    },
    {
      "menuItemId": 50,
      "quantity": 1,
      "unitPrice": 34.46,
      "lineTotal": 34.46
    }
  ],
  "subtotal": 668.79,
  "deliveryFee": 3.53,
  "tip": 0.39,
  "total": 672.71,
  "currency": "USD",
  "status": "cancelled",
  "placedAt": "2025-11-10T01:01:50.841Z",
  "deliveredAt": null
}