example-data.com
Menu
Browse docs and collections

Overview

food-orders / #255

food-orders #255

userId
Koby Pouros @koby_pouros60
restaurantId
Klocko, Gusikowski and Lockman · Lake Vern · ★ 2.9
items
              [
  {
    "menuItemId": 1333,
    "quantity": 3,
    "unitPrice": 40.39,
    "lineTotal": 121.17
  },
  {
    "menuItemId": 1337,
    "quantity": 4,
    "unitPrice": 7.45,
    "lineTotal": 29.8
  },
  {
    "menuItemId": 1339,
    "quantity": 4,
    "unitPrice": 5.4,
    "lineTotal": 21.6
  },
  {
    "menuItemId": 1330,
    "quantity": 4,
    "unitPrice": 27.43,
    "lineTotal": 109.72
  }
]
            
subtotal
282.29
deliveryFee
4.52
tip
3.87
total
290.68
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 255,
  "userId": 34,
  "restaurantId": 92,
  "items": [
    {
      "menuItemId": 1333,
      "quantity": 3,
      "unitPrice": 40.39,
      "lineTotal": 121.17
    },
    {
      "menuItemId": 1337,
      "quantity": 4,
      "unitPrice": 7.45,
      "lineTotal": 29.8
    },
    {
      "menuItemId": 1339,
      "quantity": 4,
      "unitPrice": 5.4,
      "lineTotal": 21.6
    },
    {
      "menuItemId": 1330,
      "quantity": 4,
      "unitPrice": 27.43,
      "lineTotal": 109.72
    }
  ],
  "subtotal": 282.29,
  "deliveryFee": 4.52,
  "tip": 3.87,
  "total": 290.68,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2025-11-04T16:36:53.562Z",
  "deliveredAt": null
}