example-data.com
Menu
Browse docs and collections

Overview

food-orders / #368

food-orders #368

userId
Jolie Abernathy @jolie_abernathy33
restaurantId
Gislason Group · Marinafield · ★ 3.2
items
              [
  {
    "menuItemId": 1066,
    "quantity": 4,
    "unitPrice": 43.38,
    "lineTotal": 173.52
  },
  {
    "menuItemId": 1076,
    "quantity": 2,
    "unitPrice": 72.2,
    "lineTotal": 144.4
  },
  {
    "menuItemId": 1060,
    "quantity": 3,
    "unitPrice": 75.12,
    "lineTotal": 225.36
  }
]
            
subtotal
543.28
deliveryFee
0.32
tip
8.56
total
552.16
currency
USD
status
cancelled
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 368,
  "userId": 50,
  "restaurantId": 71,
  "items": [
    {
      "menuItemId": 1066,
      "quantity": 4,
      "unitPrice": 43.38,
      "lineTotal": 173.52
    },
    {
      "menuItemId": 1076,
      "quantity": 2,
      "unitPrice": 72.2,
      "lineTotal": 144.4
    },
    {
      "menuItemId": 1060,
      "quantity": 3,
      "unitPrice": 75.12,
      "lineTotal": 225.36
    }
  ],
  "subtotal": 543.28,
  "deliveryFee": 0.32,
  "tip": 8.56,
  "total": 552.16,
  "currency": "USD",
  "status": "cancelled",
  "placedAt": "2025-11-07T02:43:18.969Z",
  "deliveredAt": null
}