example-data.com
Menu
Browse docs and collections

Overview

food-orders / #296

food-orders #296

userId
Hilda Crooks @hilda_crooks61
restaurantId
Cummings and Sons · Rodriguezville · ★ 3.5
items
              [
  {
    "menuItemId": 553,
    "quantity": 2,
    "unitPrice": 51.57,
    "lineTotal": 103.14
  },
  {
    "menuItemId": 538,
    "quantity": 2,
    "unitPrice": 26.76,
    "lineTotal": 53.52
  },
  {
    "menuItemId": 543,
    "quantity": 1,
    "unitPrice": 26.3,
    "lineTotal": 26.3
  },
  {
    "menuItemId": 545,
    "quantity": 3,
    "unitPrice": 57.51,
    "lineTotal": 172.53
  },
  {
    "menuItemId": 552,
    "quantity": 1,
    "unitPrice": 27.42,
    "lineTotal": 27.42
  }
]
            
subtotal
382.91
deliveryFee
4.39
tip
2.98
total
390.28
currency
USD
status
placed
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 296,
  "userId": 187,
  "restaurantId": 37,
  "items": [
    {
      "menuItemId": 553,
      "quantity": 2,
      "unitPrice": 51.57,
      "lineTotal": 103.14
    },
    {
      "menuItemId": 538,
      "quantity": 2,
      "unitPrice": 26.76,
      "lineTotal": 53.52
    },
    {
      "menuItemId": 543,
      "quantity": 1,
      "unitPrice": 26.3,
      "lineTotal": 26.3
    },
    {
      "menuItemId": 545,
      "quantity": 3,
      "unitPrice": 57.51,
      "lineTotal": 172.53
    },
    {
      "menuItemId": 552,
      "quantity": 1,
      "unitPrice": 27.42,
      "lineTotal": 27.42
    }
  ],
  "subtotal": 382.91,
  "deliveryFee": 4.39,
  "tip": 2.98,
  "total": 390.28,
  "currency": "USD",
  "status": "placed",
  "placedAt": "2025-08-23T15:20:09.284Z",
  "deliveredAt": null
}