example-data.com
Menu
Browse docs and collections

Overview

food-orders / #496

food-orders #496

userId
Daisy Kuhic @daisy_kuhic24
restaurantId
Koelpin - Lueilwitz · Salem · ★ 2.7
items
              [
  {
    "menuItemId": 822,
    "quantity": 3,
    "unitPrice": 26.04,
    "lineTotal": 78.12
  },
  {
    "menuItemId": 832,
    "quantity": 2,
    "unitPrice": 67.57,
    "lineTotal": 135.14
  },
  {
    "menuItemId": 823,
    "quantity": 3,
    "unitPrice": 69.85,
    "lineTotal": 209.55
  },
  {
    "menuItemId": 829,
    "quantity": 1,
    "unitPrice": 30.76,
    "lineTotal": 30.76
  },
  {
    "menuItemId": 828,
    "quantity": 2,
    "unitPrice": 19.73,
    "lineTotal": 39.46
  }
]
            
subtotal
493.03
deliveryFee
4.18
tip
1.97
total
499.18
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 496,
  "userId": 172,
  "restaurantId": 55,
  "items": [
    {
      "menuItemId": 822,
      "quantity": 3,
      "unitPrice": 26.04,
      "lineTotal": 78.12
    },
    {
      "menuItemId": 832,
      "quantity": 2,
      "unitPrice": 67.57,
      "lineTotal": 135.14
    },
    {
      "menuItemId": 823,
      "quantity": 3,
      "unitPrice": 69.85,
      "lineTotal": 209.55
    },
    {
      "menuItemId": 829,
      "quantity": 1,
      "unitPrice": 30.76,
      "lineTotal": 30.76
    },
    {
      "menuItemId": 828,
      "quantity": 2,
      "unitPrice": 19.73,
      "lineTotal": 39.46
    }
  ],
  "subtotal": 493.03,
  "deliveryFee": 4.18,
  "tip": 1.97,
  "total": 499.18,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-05-10T16:30:30.718Z",
  "deliveredAt": "2025-05-10T17:40:09.988Z"
}