example-data.com
Menu
Browse docs and collections

Overview

food-orders / #262

food-orders #262

userId
Sheridan Turcotte @sheridan.turcotte
restaurantId
McGlynn, Bosco and Gusikowski · Altadena · ★ 3.8
items
              [
  {
    "menuItemId": 492,
    "quantity": 3,
    "unitPrice": 10.03,
    "lineTotal": 30.09
  },
  {
    "menuItemId": 488,
    "quantity": 3,
    "unitPrice": 75.66,
    "lineTotal": 226.98
  },
  {
    "menuItemId": 485,
    "quantity": 2,
    "unitPrice": 18.98,
    "lineTotal": 37.96
  },
  {
    "menuItemId": 490,
    "quantity": 1,
    "unitPrice": 74.37,
    "lineTotal": 74.37
  },
  {
    "menuItemId": 487,
    "quantity": 4,
    "unitPrice": 67.86,
    "lineTotal": 271.44
  }
]
            
subtotal
640.84
deliveryFee
0.18
tip
11.49
total
652.51
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 262,
  "userId": 153,
  "restaurantId": 33,
  "items": [
    {
      "menuItemId": 492,
      "quantity": 3,
      "unitPrice": 10.03,
      "lineTotal": 30.09
    },
    {
      "menuItemId": 488,
      "quantity": 3,
      "unitPrice": 75.66,
      "lineTotal": 226.98
    },
    {
      "menuItemId": 485,
      "quantity": 2,
      "unitPrice": 18.98,
      "lineTotal": 37.96
    },
    {
      "menuItemId": 490,
      "quantity": 1,
      "unitPrice": 74.37,
      "lineTotal": 74.37
    },
    {
      "menuItemId": 487,
      "quantity": 4,
      "unitPrice": 67.86,
      "lineTotal": 271.44
    }
  ],
  "subtotal": 640.84,
  "deliveryFee": 0.18,
  "tip": 11.49,
  "total": 652.51,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-09-27T17:25:34.869Z",
  "deliveredAt": "2025-09-27T21:24:56.115Z"
}