example-data.com
Menu
Browse docs and collections

Overview

food-orders / #364

food-orders #364

userId
Jadon Nicolas @jadon.nicolas
restaurantId
Marks Inc · East Dena · ★ 4.1
items
              [
  {
    "menuItemId": 815,
    "quantity": 4,
    "unitPrice": 51.34,
    "lineTotal": 205.36
  },
  {
    "menuItemId": 813,
    "quantity": 1,
    "unitPrice": 70.63,
    "lineTotal": 70.63
  }
]
            
subtotal
275.99
deliveryFee
3.71
tip
10.57
total
290.27
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 364,
  "userId": 213,
  "restaurantId": 54,
  "items": [
    {
      "menuItemId": 815,
      "quantity": 4,
      "unitPrice": 51.34,
      "lineTotal": 205.36
    },
    {
      "menuItemId": 813,
      "quantity": 1,
      "unitPrice": 70.63,
      "lineTotal": 70.63
    }
  ],
  "subtotal": 275.99,
  "deliveryFee": 3.71,
  "tip": 10.57,
  "total": 290.27,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-07-23T22:55:52.192Z",
  "deliveredAt": "2025-07-24T00:01:50.271Z"
}