example-data.com
Menu
Browse docs and collections

Overview

food-orders / #396

food-orders #396

userId
Fatima Dicki @fatima_dicki
restaurantId
Larson Group · Lehnerville · ★ 2.9
items
              [
  {
    "menuItemId": 516,
    "quantity": 2,
    "unitPrice": 34.59,
    "lineTotal": 69.18
  },
  {
    "menuItemId": 519,
    "quantity": 4,
    "unitPrice": 64.62,
    "lineTotal": 258.48
  },
  {
    "menuItemId": 517,
    "quantity": 3,
    "unitPrice": 56.54,
    "lineTotal": 169.62
  },
  {
    "menuItemId": 518,
    "quantity": 3,
    "unitPrice": 73.88,
    "lineTotal": 221.64
  },
  {
    "menuItemId": 520,
    "quantity": 4,
    "unitPrice": 18.41,
    "lineTotal": 73.64
  }
]
            
subtotal
792.56
deliveryFee
4.6
tip
5.28
total
802.44
currency
USD
status
cancelled
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 396,
  "userId": 176,
  "restaurantId": 35,
  "items": [
    {
      "menuItemId": 516,
      "quantity": 2,
      "unitPrice": 34.59,
      "lineTotal": 69.18
    },
    {
      "menuItemId": 519,
      "quantity": 4,
      "unitPrice": 64.62,
      "lineTotal": 258.48
    },
    {
      "menuItemId": 517,
      "quantity": 3,
      "unitPrice": 56.54,
      "lineTotal": 169.62
    },
    {
      "menuItemId": 518,
      "quantity": 3,
      "unitPrice": 73.88,
      "lineTotal": 221.64
    },
    {
      "menuItemId": 520,
      "quantity": 4,
      "unitPrice": 18.41,
      "lineTotal": 73.64
    }
  ],
  "subtotal": 792.56,
  "deliveryFee": 4.6,
  "tip": 5.28,
  "total": 802.44,
  "currency": "USD",
  "status": "cancelled",
  "placedAt": "2026-05-10T18:32:01.663Z",
  "deliveredAt": null
}