example-data.com
Menu
Browse docs and collections

Overview

food-orders / #490

food-orders #490

userId
Charlene Kuhic @charlene_kuhic
restaurantId
Hirthe, Klein and Baumbach · North Giles · ★ 4.2
items
              [
  {
    "menuItemId": 367,
    "quantity": 4,
    "unitPrice": 73.11,
    "lineTotal": 292.44
  },
  {
    "menuItemId": 377,
    "quantity": 2,
    "unitPrice": 54.29,
    "lineTotal": 108.58
  },
  {
    "menuItemId": 373,
    "quantity": 4,
    "unitPrice": 64.55,
    "lineTotal": 258.2
  }
]
            
subtotal
659.22
deliveryFee
1.73
tip
3.74
total
664.69
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 490,
  "userId": 244,
  "restaurantId": 24,
  "items": [
    {
      "menuItemId": 367,
      "quantity": 4,
      "unitPrice": 73.11,
      "lineTotal": 292.44
    },
    {
      "menuItemId": 377,
      "quantity": 2,
      "unitPrice": 54.29,
      "lineTotal": 108.58
    },
    {
      "menuItemId": 373,
      "quantity": 4,
      "unitPrice": 64.55,
      "lineTotal": 258.2
    }
  ],
  "subtotal": 659.22,
  "deliveryFee": 1.73,
  "tip": 3.74,
  "total": 664.69,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2025-01-14T05:05:12.298Z",
  "deliveredAt": null
}