example-data.com
Menu
Browse docs and collections

Overview

food-orders / #251

food-orders #251

userId
Consuelo Borer @consuelo.borer
restaurantId
Larson Group · Lehnerville · ★ 2.9
items
              [
  {
    "menuItemId": 519,
    "quantity": 3,
    "unitPrice": 64.62,
    "lineTotal": 193.86
  },
  {
    "menuItemId": 517,
    "quantity": 1,
    "unitPrice": 56.54,
    "lineTotal": 56.54
  },
  {
    "menuItemId": 520,
    "quantity": 3,
    "unitPrice": 18.41,
    "lineTotal": 55.23
  },
  {
    "menuItemId": 518,
    "quantity": 4,
    "unitPrice": 73.88,
    "lineTotal": 295.52
  }
]
            
subtotal
601.15
deliveryFee
5.16
tip
1.72
total
608.03
currency
USD
status
placed
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 251,
  "userId": 200,
  "restaurantId": 35,
  "items": [
    {
      "menuItemId": 519,
      "quantity": 3,
      "unitPrice": 64.62,
      "lineTotal": 193.86
    },
    {
      "menuItemId": 517,
      "quantity": 1,
      "unitPrice": 56.54,
      "lineTotal": 56.54
    },
    {
      "menuItemId": 520,
      "quantity": 3,
      "unitPrice": 18.41,
      "lineTotal": 55.23
    },
    {
      "menuItemId": 518,
      "quantity": 4,
      "unitPrice": 73.88,
      "lineTotal": 295.52
    }
  ],
  "subtotal": 601.15,
  "deliveryFee": 5.16,
  "tip": 1.72,
  "total": 608.03,
  "currency": "USD",
  "status": "placed",
  "placedAt": "2025-07-01T08:01:59.301Z",
  "deliveredAt": null
}