example-data.com
Menu
Browse docs and collections

Overview

food-orders / #345

food-orders #345

userId
Cindy Barrows @cindy_barrows20
restaurantId
Pouros, O'Reilly and Block · Lake Chandler · ★ 3.5
items
              [
  {
    "menuItemId": 702,
    "quantity": 4,
    "unitPrice": 62.38,
    "lineTotal": 249.52
  },
  {
    "menuItemId": 724,
    "quantity": 1,
    "unitPrice": 73.54,
    "lineTotal": 73.54
  },
  {
    "menuItemId": 723,
    "quantity": 3,
    "unitPrice": 39.51,
    "lineTotal": 118.53
  },
  {
    "menuItemId": 711,
    "quantity": 3,
    "unitPrice": 14.26,
    "lineTotal": 42.78
  },
  {
    "menuItemId": 727,
    "quantity": 4,
    "unitPrice": 49.16,
    "lineTotal": 196.64
  }
]
            
subtotal
681.01
deliveryFee
0.76
tip
4.71
total
686.48
currency
USD
status
cancelled
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 345,
  "userId": 165,
  "restaurantId": 47,
  "items": [
    {
      "menuItemId": 702,
      "quantity": 4,
      "unitPrice": 62.38,
      "lineTotal": 249.52
    },
    {
      "menuItemId": 724,
      "quantity": 1,
      "unitPrice": 73.54,
      "lineTotal": 73.54
    },
    {
      "menuItemId": 723,
      "quantity": 3,
      "unitPrice": 39.51,
      "lineTotal": 118.53
    },
    {
      "menuItemId": 711,
      "quantity": 3,
      "unitPrice": 14.26,
      "lineTotal": 42.78
    },
    {
      "menuItemId": 727,
      "quantity": 4,
      "unitPrice": 49.16,
      "lineTotal": 196.64
    }
  ],
  "subtotal": 681.01,
  "deliveryFee": 0.76,
  "tip": 4.71,
  "total": 686.48,
  "currency": "USD",
  "status": "cancelled",
  "placedAt": "2026-02-11T15:25:54.930Z",
  "deliveredAt": null
}