example-data.com
Menu
Browse docs and collections

Overview

food-orders / #419

food-orders #419

userId
Jewell Olson @jewell_olson2
restaurantId
Walker - Botsford · Zulaufburgh · ★ 3.7
items
              [
  {
    "menuItemId": 480,
    "quantity": 1,
    "unitPrice": 66.92,
    "lineTotal": 66.92
  },
  {
    "menuItemId": 479,
    "quantity": 1,
    "unitPrice": 40.31,
    "lineTotal": 40.31
  },
  {
    "menuItemId": 477,
    "quantity": 3,
    "unitPrice": 68.24,
    "lineTotal": 204.72
  }
]
            
subtotal
311.95
deliveryFee
6.4
tip
10.19
total
328.54
currency
USD
status
preparing
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 419,
  "userId": 68,
  "restaurantId": 32,
  "items": [
    {
      "menuItemId": 480,
      "quantity": 1,
      "unitPrice": 66.92,
      "lineTotal": 66.92
    },
    {
      "menuItemId": 479,
      "quantity": 1,
      "unitPrice": 40.31,
      "lineTotal": 40.31
    },
    {
      "menuItemId": 477,
      "quantity": 3,
      "unitPrice": 68.24,
      "lineTotal": 204.72
    }
  ],
  "subtotal": 311.95,
  "deliveryFee": 6.4,
  "tip": 10.19,
  "total": 328.54,
  "currency": "USD",
  "status": "preparing",
  "placedAt": "2025-03-17T20:49:19.288Z",
  "deliveredAt": null
}