example-data.com
Menu
Browse docs and collections

Overview

food-orders / #112

food-orders #112

userId
Ressie Howell-Hodkiewicz @ressie_howell-hodkiewicz35
restaurantId
Lehner - Smith · Larkinfurt · ★ 3.0
items
              [
  {
    "menuItemId": 1354,
    "quantity": 3,
    "unitPrice": 44.06,
    "lineTotal": 132.18
  },
  {
    "menuItemId": 1348,
    "quantity": 1,
    "unitPrice": 68.59,
    "lineTotal": 68.59
  },
  {
    "menuItemId": 1359,
    "quantity": 4,
    "unitPrice": 66.05,
    "lineTotal": 264.2
  },
  {
    "menuItemId": 1360,
    "quantity": 2,
    "unitPrice": 53.67,
    "lineTotal": 107.34
  },
  {
    "menuItemId": 1355,
    "quantity": 1,
    "unitPrice": 79.15,
    "lineTotal": 79.15
  }
]
            
subtotal
651.46
deliveryFee
3.38
tip
6.42
total
661.26
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 112,
  "userId": 214,
  "restaurantId": 93,
  "items": [
    {
      "menuItemId": 1354,
      "quantity": 3,
      "unitPrice": 44.06,
      "lineTotal": 132.18
    },
    {
      "menuItemId": 1348,
      "quantity": 1,
      "unitPrice": 68.59,
      "lineTotal": 68.59
    },
    {
      "menuItemId": 1359,
      "quantity": 4,
      "unitPrice": 66.05,
      "lineTotal": 264.2
    },
    {
      "menuItemId": 1360,
      "quantity": 2,
      "unitPrice": 53.67,
      "lineTotal": 107.34
    },
    {
      "menuItemId": 1355,
      "quantity": 1,
      "unitPrice": 79.15,
      "lineTotal": 79.15
    }
  ],
  "subtotal": 651.46,
  "deliveryFee": 3.38,
  "tip": 6.42,
  "total": 661.26,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-02-02T05:25:12.657Z",
  "deliveredAt": "2025-02-02T07:13:01.682Z"
}