example-data.com
Menu
Browse docs and collections

Overview

food-orders / #53

food-orders #53

userId
Adan Weber @adan.weber61
restaurantId
Douglas Group · New Cletastead · ★ 3.3
items
              [
  {
    "menuItemId": 942,
    "quantity": 2,
    "unitPrice": 21.61,
    "lineTotal": 43.22
  },
  {
    "menuItemId": 940,
    "quantity": 3,
    "unitPrice": 58.2,
    "lineTotal": 174.6
  },
  {
    "menuItemId": 941,
    "quantity": 3,
    "unitPrice": 44.97,
    "lineTotal": 134.91
  },
  {
    "menuItemId": 939,
    "quantity": 1,
    "unitPrice": 58.88,
    "lineTotal": 58.88
  }
]
            
subtotal
411.61
deliveryFee
4.99
tip
3.84
total
420.44
currency
USD
status
out_for_delivery
placedAt
deliveredAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 53,
  "userId": 155,
  "restaurantId": 62,
  "items": [
    {
      "menuItemId": 942,
      "quantity": 2,
      "unitPrice": 21.61,
      "lineTotal": 43.22
    },
    {
      "menuItemId": 940,
      "quantity": 3,
      "unitPrice": 58.2,
      "lineTotal": 174.6
    },
    {
      "menuItemId": 941,
      "quantity": 3,
      "unitPrice": 44.97,
      "lineTotal": 134.91
    },
    {
      "menuItemId": 939,
      "quantity": 1,
      "unitPrice": 58.88,
      "lineTotal": 58.88
    }
  ],
  "subtotal": 411.61,
  "deliveryFee": 4.99,
  "tip": 3.84,
  "total": 420.44,
  "currency": "USD",
  "status": "out_for_delivery",
  "placedAt": "2025-01-24T01:16:26.874Z",
  "deliveredAt": null
}