example-data.com
Menu
Browse docs and collections

Overview

food-orders / #449

food-orders #449

userId
Jermain Kshlerin @jermain_kshlerin51
restaurantId
Rodriguez, Nicolas and Schneider · New Anthony · ★ 4.9
items
              [
  {
    "menuItemId": 755,
    "quantity": 1,
    "unitPrice": 59.2,
    "lineTotal": 59.2
  },
  {
    "menuItemId": 760,
    "quantity": 1,
    "unitPrice": 78.81,
    "lineTotal": 78.81
  },
  {
    "menuItemId": 762,
    "quantity": 1,
    "unitPrice": 61.47,
    "lineTotal": 61.47
  }
]
            
subtotal
199.48
deliveryFee
1.4
tip
2.36
total
203.24
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 449,
  "userId": 104,
  "restaurantId": 50,
  "items": [
    {
      "menuItemId": 755,
      "quantity": 1,
      "unitPrice": 59.2,
      "lineTotal": 59.2
    },
    {
      "menuItemId": 760,
      "quantity": 1,
      "unitPrice": 78.81,
      "lineTotal": 78.81
    },
    {
      "menuItemId": 762,
      "quantity": 1,
      "unitPrice": 61.47,
      "lineTotal": 61.47
    }
  ],
  "subtotal": 199.48,
  "deliveryFee": 1.4,
  "tip": 2.36,
  "total": 203.24,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-05-22T08:33:54.930Z",
  "deliveredAt": "2025-05-22T11:13:17.491Z"
}