example-data.com
Menu
Browse docs and collections

Overview

food-orders / #392

food-orders #392

userId
Casimir Smitham @casimir_smitham35
restaurantId
Howe, Kunde and Ortiz · Rosemead · ★ 4.9
items
              [
  {
    "menuItemId": 1162,
    "quantity": 2,
    "unitPrice": 13.8,
    "lineTotal": 27.6
  },
  {
    "menuItemId": 1150,
    "quantity": 2,
    "unitPrice": 64,
    "lineTotal": 128
  }
]
            
subtotal
155.6
deliveryFee
4.94
tip
6.53
total
167.07
currency
USD
status
preparing
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 392,
  "userId": 16,
  "restaurantId": 79,
  "items": [
    {
      "menuItemId": 1162,
      "quantity": 2,
      "unitPrice": 13.8,
      "lineTotal": 27.6
    },
    {
      "menuItemId": 1150,
      "quantity": 2,
      "unitPrice": 64,
      "lineTotal": 128
    }
  ],
  "subtotal": 155.6,
  "deliveryFee": 4.94,
  "tip": 6.53,
  "total": 167.07,
  "currency": "USD",
  "status": "preparing",
  "placedAt": "2025-04-17T15:01:07.778Z",
  "deliveredAt": null
}