example-data.com
Menu
Browse docs and collections

Overview

food-orders / #367

food-orders #367

userId
Roma Durgan @roma.durgan
restaurantId
Trantow - Jerde · Zaneberg · ★ 2.7
items
              [
  {
    "menuItemId": 435,
    "quantity": 1,
    "unitPrice": 75.39,
    "lineTotal": 75.39
  },
  {
    "menuItemId": 437,
    "quantity": 3,
    "unitPrice": 62.77,
    "lineTotal": 188.31
  },
  {
    "menuItemId": 438,
    "quantity": 2,
    "unitPrice": 56.74,
    "lineTotal": 113.48
  },
  {
    "menuItemId": 436,
    "quantity": 3,
    "unitPrice": 69.78,
    "lineTotal": 209.34
  },
  {
    "menuItemId": 439,
    "quantity": 3,
    "unitPrice": 19.18,
    "lineTotal": 57.54
  }
]
            
subtotal
644.06
deliveryFee
5.84
tip
3.66
total
653.56
currency
USD
status
placed
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 367,
  "userId": 215,
  "restaurantId": 29,
  "items": [
    {
      "menuItemId": 435,
      "quantity": 1,
      "unitPrice": 75.39,
      "lineTotal": 75.39
    },
    {
      "menuItemId": 437,
      "quantity": 3,
      "unitPrice": 62.77,
      "lineTotal": 188.31
    },
    {
      "menuItemId": 438,
      "quantity": 2,
      "unitPrice": 56.74,
      "lineTotal": 113.48
    },
    {
      "menuItemId": 436,
      "quantity": 3,
      "unitPrice": 69.78,
      "lineTotal": 209.34
    },
    {
      "menuItemId": 439,
      "quantity": 3,
      "unitPrice": 19.18,
      "lineTotal": 57.54
    }
  ],
  "subtotal": 644.06,
  "deliveryFee": 5.84,
  "tip": 3.66,
  "total": 653.56,
  "currency": "USD",
  "status": "placed",
  "placedAt": "2025-07-13T04:38:57.424Z",
  "deliveredAt": null
}