example-data.com
Menu
Browse docs and collections

Overview

food-orders / #323

food-orders #323

userId
Webster Skiles @webster_skiles39
restaurantId
Blanda and Sons · New Odashire · ★ 4.1
items
              [
  {
    "menuItemId": 901,
    "quantity": 3,
    "unitPrice": 46.98,
    "lineTotal": 140.94
  },
  {
    "menuItemId": 889,
    "quantity": 3,
    "unitPrice": 9.6,
    "lineTotal": 28.8
  },
  {
    "menuItemId": 892,
    "quantity": 1,
    "unitPrice": 70.27,
    "lineTotal": 70.27
  },
  {
    "menuItemId": 896,
    "quantity": 4,
    "unitPrice": 33.57,
    "lineTotal": 134.28
  },
  {
    "menuItemId": 887,
    "quantity": 4,
    "unitPrice": 78.36,
    "lineTotal": 313.44
  }
]
            
subtotal
687.73
deliveryFee
2.84
tip
8.36
total
698.93
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 323,
  "userId": 5,
  "restaurantId": 59,
  "items": [
    {
      "menuItemId": 901,
      "quantity": 3,
      "unitPrice": 46.98,
      "lineTotal": 140.94
    },
    {
      "menuItemId": 889,
      "quantity": 3,
      "unitPrice": 9.6,
      "lineTotal": 28.8
    },
    {
      "menuItemId": 892,
      "quantity": 1,
      "unitPrice": 70.27,
      "lineTotal": 70.27
    },
    {
      "menuItemId": 896,
      "quantity": 4,
      "unitPrice": 33.57,
      "lineTotal": 134.28
    },
    {
      "menuItemId": 887,
      "quantity": 4,
      "unitPrice": 78.36,
      "lineTotal": 313.44
    }
  ],
  "subtotal": 687.73,
  "deliveryFee": 2.84,
  "tip": 8.36,
  "total": 698.93,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-12-31T11:41:27.032Z",
  "deliveredAt": "2025-12-31T12:56:04.330Z"
}