example-data.com
Menu
Browse docs and collections

Overview

food-orders / #347

food-orders #347

userId
Mable West @mable_west
restaurantId
Halvorson - Olson · Lake Angeloton · ★ 3.7
items
              [
  {
    "menuItemId": 109,
    "quantity": 2,
    "unitPrice": 4.1,
    "lineTotal": 8.2
  },
  {
    "menuItemId": 98,
    "quantity": 1,
    "unitPrice": 61.3,
    "lineTotal": 61.3
  },
  {
    "menuItemId": 101,
    "quantity": 3,
    "unitPrice": 7.91,
    "lineTotal": 23.73
  },
  {
    "menuItemId": 99,
    "quantity": 1,
    "unitPrice": 63.16,
    "lineTotal": 63.16
  },
  {
    "menuItemId": 86,
    "quantity": 4,
    "unitPrice": 25.14,
    "lineTotal": 100.56
  }
]
            
subtotal
256.95
deliveryFee
4.73
tip
10.28
total
271.96
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 347,
  "userId": 86,
  "restaurantId": 8,
  "items": [
    {
      "menuItemId": 109,
      "quantity": 2,
      "unitPrice": 4.1,
      "lineTotal": 8.2
    },
    {
      "menuItemId": 98,
      "quantity": 1,
      "unitPrice": 61.3,
      "lineTotal": 61.3
    },
    {
      "menuItemId": 101,
      "quantity": 3,
      "unitPrice": 7.91,
      "lineTotal": 23.73
    },
    {
      "menuItemId": 99,
      "quantity": 1,
      "unitPrice": 63.16,
      "lineTotal": 63.16
    },
    {
      "menuItemId": 86,
      "quantity": 4,
      "unitPrice": 25.14,
      "lineTotal": 100.56
    }
  ],
  "subtotal": 256.95,
  "deliveryFee": 4.73,
  "tip": 10.28,
  "total": 271.96,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-07-03T14:16:45.234Z",
  "deliveredAt": "2025-07-03T15:40:07.292Z"
}