example-data.com
Menu
Browse docs and collections

Overview

food-orders / #348

food-orders #348

userId
Wendy Borer @wendy_borer
restaurantId
Macejkovic - Lehner · Petertown · ★ 4.3
items
              [
  {
    "menuItemId": 729,
    "quantity": 1,
    "unitPrice": 25.05,
    "lineTotal": 25.05
  },
  {
    "menuItemId": 728,
    "quantity": 3,
    "unitPrice": 23.09,
    "lineTotal": 69.27
  },
  {
    "menuItemId": 732,
    "quantity": 2,
    "unitPrice": 58.7,
    "lineTotal": 117.4
  },
  {
    "menuItemId": 733,
    "quantity": 4,
    "unitPrice": 63.26,
    "lineTotal": 253.04
  },
  {
    "menuItemId": 730,
    "quantity": 1,
    "unitPrice": 58.77,
    "lineTotal": 58.77
  }
]
            
subtotal
523.53
deliveryFee
0.29
tip
4.13
total
527.95
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 348,
  "userId": 141,
  "restaurantId": 48,
  "items": [
    {
      "menuItemId": 729,
      "quantity": 1,
      "unitPrice": 25.05,
      "lineTotal": 25.05
    },
    {
      "menuItemId": 728,
      "quantity": 3,
      "unitPrice": 23.09,
      "lineTotal": 69.27
    },
    {
      "menuItemId": 732,
      "quantity": 2,
      "unitPrice": 58.7,
      "lineTotal": 117.4
    },
    {
      "menuItemId": 733,
      "quantity": 4,
      "unitPrice": 63.26,
      "lineTotal": 253.04
    },
    {
      "menuItemId": 730,
      "quantity": 1,
      "unitPrice": 58.77,
      "lineTotal": 58.77
    }
  ],
  "subtotal": 523.53,
  "deliveryFee": 0.29,
  "tip": 4.13,
  "total": 527.95,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-06-02T22:52:54.237Z",
  "deliveredAt": "2025-06-03T02:34:36.148Z"
}