example-data.com
Menu
Browse docs and collections

Overview

food-orders / #22

food-orders #22

userId
Antoinette Greenfelder @antoinette_greenfelder61
restaurantId
Kshlerin - Champlin · Marquardtfort · ★ 4.4
items
              [
  {
    "menuItemId": 152,
    "quantity": 1,
    "unitPrice": 23.36,
    "lineTotal": 23.36
  },
  {
    "menuItemId": 157,
    "quantity": 4,
    "unitPrice": 44.83,
    "lineTotal": 179.32
  },
  {
    "menuItemId": 155,
    "quantity": 3,
    "unitPrice": 49.99,
    "lineTotal": 149.97
  },
  {
    "menuItemId": 154,
    "quantity": 2,
    "unitPrice": 79.37,
    "lineTotal": 158.74
  }
]
            
subtotal
511.39
deliveryFee
7.19
tip
9.84
total
528.42
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 22,
  "userId": 22,
  "restaurantId": 11,
  "items": [
    {
      "menuItemId": 152,
      "quantity": 1,
      "unitPrice": 23.36,
      "lineTotal": 23.36
    },
    {
      "menuItemId": 157,
      "quantity": 4,
      "unitPrice": 44.83,
      "lineTotal": 179.32
    },
    {
      "menuItemId": 155,
      "quantity": 3,
      "unitPrice": 49.99,
      "lineTotal": 149.97
    },
    {
      "menuItemId": 154,
      "quantity": 2,
      "unitPrice": 79.37,
      "lineTotal": 158.74
    }
  ],
  "subtotal": 511.39,
  "deliveryFee": 7.19,
  "tip": 9.84,
  "total": 528.42,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-10-23T03:48:44.712Z",
  "deliveredAt": "2025-10-23T05:41:30.357Z"
}