example-data.com
Menu
Browse docs and collections

Overview

food-orders / #467

food-orders #467

userId
Leora Doyle @leora_doyle
restaurantId
Hickle, Glover and Christiansen · Zulauffurt · ★ 3.7
items
              [
  {
    "menuItemId": 315,
    "quantity": 2,
    "unitPrice": 5,
    "lineTotal": 10
  },
  {
    "menuItemId": 321,
    "quantity": 2,
    "unitPrice": 32.11,
    "lineTotal": 64.22
  },
  {
    "menuItemId": 304,
    "quantity": 2,
    "unitPrice": 21.09,
    "lineTotal": 42.18
  },
  {
    "menuItemId": 305,
    "quantity": 4,
    "unitPrice": 6.52,
    "lineTotal": 26.08
  },
  {
    "menuItemId": 325,
    "quantity": 3,
    "unitPrice": 31.4,
    "lineTotal": 94.2
  }
]
            
subtotal
236.68
deliveryFee
1.59
tip
6.6
total
244.87
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 467,
  "userId": 117,
  "restaurantId": 20,
  "items": [
    {
      "menuItemId": 315,
      "quantity": 2,
      "unitPrice": 5,
      "lineTotal": 10
    },
    {
      "menuItemId": 321,
      "quantity": 2,
      "unitPrice": 32.11,
      "lineTotal": 64.22
    },
    {
      "menuItemId": 304,
      "quantity": 2,
      "unitPrice": 21.09,
      "lineTotal": 42.18
    },
    {
      "menuItemId": 305,
      "quantity": 4,
      "unitPrice": 6.52,
      "lineTotal": 26.08
    },
    {
      "menuItemId": 325,
      "quantity": 3,
      "unitPrice": 31.4,
      "lineTotal": 94.2
    }
  ],
  "subtotal": 236.68,
  "deliveryFee": 1.59,
  "tip": 6.6,
  "total": 244.87,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-06-30T00:45:43.416Z",
  "deliveredAt": "2025-06-30T04:34:08.050Z"
}