example-data.com
Menu
Browse docs and collections

Overview

food-orders / #206

food-orders #206

userId
Jewell Olson @jewell_olson2
restaurantId
Cruickshank - Jacobi · Vandervortfield · ★ 3.0
items
              [
  {
    "menuItemId": 135,
    "quantity": 4,
    "unitPrice": 79.99,
    "lineTotal": 319.96
  },
  {
    "menuItemId": 142,
    "quantity": 4,
    "unitPrice": 29.8,
    "lineTotal": 119.2
  }
]
            
subtotal
439.16
deliveryFee
1.31
tip
5.73
total
446.2
currency
USD
status
cancelled
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 206,
  "userId": 68,
  "restaurantId": 10,
  "items": [
    {
      "menuItemId": 135,
      "quantity": 4,
      "unitPrice": 79.99,
      "lineTotal": 319.96
    },
    {
      "menuItemId": 142,
      "quantity": 4,
      "unitPrice": 29.8,
      "lineTotal": 119.2
    }
  ],
  "subtotal": 439.16,
  "deliveryFee": 1.31,
  "tip": 5.73,
  "total": 446.2,
  "currency": "USD",
  "status": "cancelled",
  "placedAt": "2025-11-03T11:23:34.716Z",
  "deliveredAt": null
}