example-data.com
Menu
Browse docs and collections

Overview

food-orders / #371

food-orders #371

userId
Vida Kunde-Koepp @vida_kunde-koepp95
restaurantId
Bartoletti LLC · Shannychester · ★ 3.3
items
              [
  {
    "menuItemId": 750,
    "quantity": 2,
    "unitPrice": 3.17,
    "lineTotal": 6.34
  },
  {
    "menuItemId": 753,
    "quantity": 4,
    "unitPrice": 72.89,
    "lineTotal": 291.56
  },
  {
    "menuItemId": 745,
    "quantity": 4,
    "unitPrice": 57.3,
    "lineTotal": 229.2
  },
  {
    "menuItemId": 744,
    "quantity": 1,
    "unitPrice": 48.05,
    "lineTotal": 48.05
  },
  {
    "menuItemId": 748,
    "quantity": 3,
    "unitPrice": 10.89,
    "lineTotal": 32.67
  }
]
            
subtotal
607.82
deliveryFee
1.48
tip
11.39
total
620.69
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 371,
  "userId": 109,
  "restaurantId": 49,
  "items": [
    {
      "menuItemId": 750,
      "quantity": 2,
      "unitPrice": 3.17,
      "lineTotal": 6.34
    },
    {
      "menuItemId": 753,
      "quantity": 4,
      "unitPrice": 72.89,
      "lineTotal": 291.56
    },
    {
      "menuItemId": 745,
      "quantity": 4,
      "unitPrice": 57.3,
      "lineTotal": 229.2
    },
    {
      "menuItemId": 744,
      "quantity": 1,
      "unitPrice": 48.05,
      "lineTotal": 48.05
    },
    {
      "menuItemId": 748,
      "quantity": 3,
      "unitPrice": 10.89,
      "lineTotal": 32.67
    }
  ],
  "subtotal": 607.82,
  "deliveryFee": 1.48,
  "tip": 11.39,
  "total": 620.69,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-07-02T19:51:02.704Z",
  "deliveredAt": "2025-07-02T23:37:18.339Z"
}