example-data.com
Menu
Browse docs and collections

Overview

food-orders / #179

food-orders #179

userId
Rupert Lebsack @rupert.lebsack
restaurantId
Parisian and Sons · New Timmothy · ★ 3.9
items
              [
  {
    "menuItemId": 1047,
    "quantity": 3,
    "unitPrice": 56.65,
    "lineTotal": 169.95
  },
  {
    "menuItemId": 1043,
    "quantity": 3,
    "unitPrice": 55.21,
    "lineTotal": 165.63
  }
]
            
subtotal
335.58
deliveryFee
2.18
tip
2.75
total
340.51
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 179,
  "userId": 249,
  "restaurantId": 70,
  "items": [
    {
      "menuItemId": 1047,
      "quantity": 3,
      "unitPrice": 56.65,
      "lineTotal": 169.95
    },
    {
      "menuItemId": 1043,
      "quantity": 3,
      "unitPrice": 55.21,
      "lineTotal": 165.63
    }
  ],
  "subtotal": 335.58,
  "deliveryFee": 2.18,
  "tip": 2.75,
  "total": 340.51,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-04-24T15:54:03.682Z",
  "deliveredAt": "2025-04-24T18:41:32.453Z"
}