example-data.com
Menu
Browse docs and collections

Overview

food-orders / #315

food-orders #315

userId
Era Mitchell @era.mitchell21
restaurantId
Hamill, Flatley and Pfeffer · North Trevacester · ★ 4.3
items
              [
  {
    "menuItemId": 766,
    "quantity": 3,
    "unitPrice": 5.29,
    "lineTotal": 15.87
  },
  {
    "menuItemId": 764,
    "quantity": 3,
    "unitPrice": 78.32,
    "lineTotal": 234.96
  },
  {
    "menuItemId": 772,
    "quantity": 2,
    "unitPrice": 34.94,
    "lineTotal": 69.88
  },
  {
    "menuItemId": 769,
    "quantity": 1,
    "unitPrice": 13.47,
    "lineTotal": 13.47
  }
]
            
subtotal
334.18
deliveryFee
3.35
tip
11.07
total
348.6
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 315,
  "userId": 243,
  "restaurantId": 51,
  "items": [
    {
      "menuItemId": 766,
      "quantity": 3,
      "unitPrice": 5.29,
      "lineTotal": 15.87
    },
    {
      "menuItemId": 764,
      "quantity": 3,
      "unitPrice": 78.32,
      "lineTotal": 234.96
    },
    {
      "menuItemId": 772,
      "quantity": 2,
      "unitPrice": 34.94,
      "lineTotal": 69.88
    },
    {
      "menuItemId": 769,
      "quantity": 1,
      "unitPrice": 13.47,
      "lineTotal": 13.47
    }
  ],
  "subtotal": 334.18,
  "deliveryFee": 3.35,
  "tip": 11.07,
  "total": 348.6,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2026-02-08T04:20:56.028Z",
  "deliveredAt": "2026-02-08T07:39:18.445Z"
}