example-data.com
Menu
Browse docs and collections

Overview

food-orders / #86

food-orders #86

userId
Fatima Dicki @fatima_dicki
restaurantId
Johns - Adams · Bradleyburgh · ★ 2.6
items
              [
  {
    "menuItemId": 882,
    "quantity": 4,
    "unitPrice": 68.35,
    "lineTotal": 273.4
  },
  {
    "menuItemId": 880,
    "quantity": 2,
    "unitPrice": 72.27,
    "lineTotal": 144.54
  },
  {
    "menuItemId": 877,
    "quantity": 2,
    "unitPrice": 72,
    "lineTotal": 144
  },
  {
    "menuItemId": 874,
    "quantity": 1,
    "unitPrice": 19.84,
    "lineTotal": 19.84
  }
]
            
subtotal
581.78
deliveryFee
6.83
tip
9.79
total
598.4
currency
USD
status
preparing
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 86,
  "userId": 176,
  "restaurantId": 58,
  "items": [
    {
      "menuItemId": 882,
      "quantity": 4,
      "unitPrice": 68.35,
      "lineTotal": 273.4
    },
    {
      "menuItemId": 880,
      "quantity": 2,
      "unitPrice": 72.27,
      "lineTotal": 144.54
    },
    {
      "menuItemId": 877,
      "quantity": 2,
      "unitPrice": 72,
      "lineTotal": 144
    },
    {
      "menuItemId": 874,
      "quantity": 1,
      "unitPrice": 19.84,
      "lineTotal": 19.84
    }
  ],
  "subtotal": 581.78,
  "deliveryFee": 6.83,
  "tip": 9.79,
  "total": 598.4,
  "currency": "USD",
  "status": "preparing",
  "placedAt": "2025-06-09T08:08:15.334Z",
  "deliveredAt": null
}