example-data.com
Menu
Browse docs and collections

Overview

food-orders / #335

food-orders #335

userId
Niko Wisozk @niko_wisozk
restaurantId
Welch LLC · North Brando · ★ 4.0
items
              [
  {
    "menuItemId": 1386,
    "quantity": 1,
    "unitPrice": 58.4,
    "lineTotal": 58.4
  },
  {
    "menuItemId": 1389,
    "quantity": 4,
    "unitPrice": 61.5,
    "lineTotal": 246
  },
  {
    "menuItemId": 1391,
    "quantity": 1,
    "unitPrice": 35.81,
    "lineTotal": 35.81
  },
  {
    "menuItemId": 1374,
    "quantity": 3,
    "unitPrice": 73.71,
    "lineTotal": 221.13
  }
]
            
subtotal
561.34
deliveryFee
1.58
tip
10.03
total
572.95
currency
USD
status
cancelled
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 335,
  "userId": 56,
  "restaurantId": 95,
  "items": [
    {
      "menuItemId": 1386,
      "quantity": 1,
      "unitPrice": 58.4,
      "lineTotal": 58.4
    },
    {
      "menuItemId": 1389,
      "quantity": 4,
      "unitPrice": 61.5,
      "lineTotal": 246
    },
    {
      "menuItemId": 1391,
      "quantity": 1,
      "unitPrice": 35.81,
      "lineTotal": 35.81
    },
    {
      "menuItemId": 1374,
      "quantity": 3,
      "unitPrice": 73.71,
      "lineTotal": 221.13
    }
  ],
  "subtotal": 561.34,
  "deliveryFee": 1.58,
  "tip": 10.03,
  "total": 572.95,
  "currency": "USD",
  "status": "cancelled",
  "placedAt": "2025-05-11T18:44:51.300Z",
  "deliveredAt": null
}