example-data.com
Menu
Browse docs and collections

Overview

food-orders / #71

food-orders #71

userId
Gwendolyn Wyman @gwendolyn.wyman87
restaurantId
Gislason Group · Marinafield · ★ 3.2
items
              [
  {
    "menuItemId": 1071,
    "quantity": 3,
    "unitPrice": 53.01,
    "lineTotal": 159.03
  },
  {
    "menuItemId": 1070,
    "quantity": 3,
    "unitPrice": 52.49,
    "lineTotal": 157.47
  },
  {
    "menuItemId": 1080,
    "quantity": 1,
    "unitPrice": 63.14,
    "lineTotal": 63.14
  },
  {
    "menuItemId": 1063,
    "quantity": 1,
    "unitPrice": 43.98,
    "lineTotal": 43.98
  }
]
            
subtotal
423.62
deliveryFee
6.24
tip
10.96
total
440.82
currency
USD
status
delivered
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 71,
  "userId": 40,
  "restaurantId": 71,
  "items": [
    {
      "menuItemId": 1071,
      "quantity": 3,
      "unitPrice": 53.01,
      "lineTotal": 159.03
    },
    {
      "menuItemId": 1070,
      "quantity": 3,
      "unitPrice": 52.49,
      "lineTotal": 157.47
    },
    {
      "menuItemId": 1080,
      "quantity": 1,
      "unitPrice": 63.14,
      "lineTotal": 63.14
    },
    {
      "menuItemId": 1063,
      "quantity": 1,
      "unitPrice": 43.98,
      "lineTotal": 43.98
    }
  ],
  "subtotal": 423.62,
  "deliveryFee": 6.24,
  "tip": 10.96,
  "total": 440.82,
  "currency": "USD",
  "status": "delivered",
  "placedAt": "2025-02-23T19:35:15.579Z",
  "deliveredAt": "2025-02-23T21:36:27.637Z"
}