example-data.com
Menu
Browse docs and collections

Overview

food-orders / #309

food-orders #309

userId
Charlene Roberts @charlene_roberts
restaurantId
McGlynn, Bosco and Gusikowski · Altadena · ★ 3.8
items
              [
  {
    "menuItemId": 485,
    "quantity": 2,
    "unitPrice": 18.98,
    "lineTotal": 37.96
  },
  {
    "menuItemId": 491,
    "quantity": 4,
    "unitPrice": 7.12,
    "lineTotal": 28.48
  },
  {
    "menuItemId": 492,
    "quantity": 2,
    "unitPrice": 10.03,
    "lineTotal": 20.06
  }
]
            
subtotal
86.5
deliveryFee
0.02
tip
3.66
total
90.18
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 309,
  "userId": 1,
  "restaurantId": 33,
  "items": [
    {
      "menuItemId": 485,
      "quantity": 2,
      "unitPrice": 18.98,
      "lineTotal": 37.96
    },
    {
      "menuItemId": 491,
      "quantity": 4,
      "unitPrice": 7.12,
      "lineTotal": 28.48
    },
    {
      "menuItemId": 492,
      "quantity": 2,
      "unitPrice": 10.03,
      "lineTotal": 20.06
    }
  ],
  "subtotal": 86.5,
  "deliveryFee": 0.02,
  "tip": 3.66,
  "total": 90.18,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-08-18T17:01:58.085Z",
  "deliveredAt": "2025-08-18T19:28:00.290Z"
}