example-data.com
Menu
Browse docs and collections

Overview

food-orders / #316

food-orders #316

userId
Ressie Howell-Hodkiewicz @ressie_howell-hodkiewicz35
restaurantId
Mills, Kassulke and Marquardt · Jeffersonville · ★ 3.6
items
              [
  {
    "menuItemId": 449,
    "quantity": 3,
    "unitPrice": 45.27,
    "lineTotal": 135.81
  },
  {
    "menuItemId": 445,
    "quantity": 1,
    "unitPrice": 49.85,
    "lineTotal": 49.85
  },
  {
    "menuItemId": 454,
    "quantity": 2,
    "unitPrice": 31.41,
    "lineTotal": 62.82
  },
  {
    "menuItemId": 443,
    "quantity": 4,
    "unitPrice": 17.94,
    "lineTotal": 71.76
  }
]
            
subtotal
320.24
deliveryFee
3.76
tip
7.35
total
331.35
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 316,
  "userId": 214,
  "restaurantId": 30,
  "items": [
    {
      "menuItemId": 449,
      "quantity": 3,
      "unitPrice": 45.27,
      "lineTotal": 135.81
    },
    {
      "menuItemId": 445,
      "quantity": 1,
      "unitPrice": 49.85,
      "lineTotal": 49.85
    },
    {
      "menuItemId": 454,
      "quantity": 2,
      "unitPrice": 31.41,
      "lineTotal": 62.82
    },
    {
      "menuItemId": 443,
      "quantity": 4,
      "unitPrice": 17.94,
      "lineTotal": 71.76
    }
  ],
  "subtotal": 320.24,
  "deliveryFee": 3.76,
  "tip": 7.35,
  "total": 331.35,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2025-03-29T07:39:50.274Z",
  "deliveredAt": null
}