example-data.com
Menu
Browse docs and collections

food-orders

food-orders

Page 4 of 21.

Overview

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/food-orders?limit=25"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/food-orders?limit=25"
);
const { data, meta } = 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, ListEnvelope } from "./types/food-orders";

const res = await fetch(
  "https://example-data.com/api/v1/food-orders?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<FoodOrder>;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/food-orders",
    params={"limit": 25},
)
data = res.json()

Response

{
  "data": [
    {
      "id": 73,
      "userId": 132,
      "restaurantId": 97,
      "items": [
        {
          "menuItemId": 1414,
          "quantity": 3,
          "unitPrice": 71.75,
          "lineTotal": 215.25
        },
        {
          "menuItemId": 1411,
          "quantity": 4,
          "unitPrice": 75.28,
          "lineTotal": 301.12
        },
        {
          "menuItemId": 1415,
          "quantity": 1,
          "unitPrice": 34.56,
          "lineTotal": 34.56
        },
        {
          "menuItemId": 1413,
          "quantity": 4,
          "unitPrice": 10.43,
          "lineTotal": 41.72
        }
      ],
      "subtotal": 592.65,
      "deliveryFee": 0.13,
      "tip": 2.78,
      "total": 595.56,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2025-03-16T13:23:28.567Z",
      "deliveredAt": "2025-03-16T17:19:49.939Z"
    },
    {
      "id": 74,
      "userId": 249,
      "restaurantId": 13,
      "items": [
        {
          "menuItemId": 184,
          "quantity": 1,
          "unitPrice": 77.13,
          "lineTotal": 77.13
        },
        {
          "menuItemId": 182,
          "quantity": 3,
          "unitPrice": 26.93,
          "lineTotal": 80.79
        },
        {
          "menuItemId": 183,
          "quantity": 3,
          "unitPrice": 14.2,
          "lineTotal": 42.6
        },
        {
          "menuItemId": 186,
          "quantity": 1,
          "unitPrice": 64.97,
          "lineTotal": 64.97
        }
      ],
      "subtotal": 265.49,
      "deliveryFee": 1.44,
      "tip": 6.6,
      "total": 273.53,
      "currency": "USD",
      "status": "cancelled",
      "placedAt": "2025-06-07T17:42:41.169Z",
      "deliveredAt": null
    },
    {
      "id": 75,
      "userId": 15,
      "restaurantId": 11,
      "items": [
        {
          "menuItemId": 158,
          "quantity": 2,
          "unitPrice": 5.91,
          "lineTotal": 11.82
        },
        {
          "menuItemId": 157,
          "quantity": 2,
          "unitPrice": 44.83,
          "lineTotal": 89.66
        },
        {
          "menuItemId": 162,
          "quantity": 4,
          "unitPrice": 46.06,
          "lineTotal": 184.24
        },
        {
          "menuItemId": 151,
          "quantity": 3,
          "unitPrice": 11.98,
          "lineTotal": 35.94
        },
        {
          "menuItemId": 156,
          "quantity": 4,
          "unitPrice": 30.49,
          "lineTotal": 121.96
        }
      ],
      "subtotal": 443.62,
      "deliveryFee": 4.3,
      "tip": 6.97,
      "total": 454.89,
      "currency": "USD",
      "status": "cancelled",
      "placedAt": "2025-12-01T03:16:57.032Z",
      "deliveredAt": null
    }
  ],
  "meta": {
    "page": 4,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/food-orders?page=4&limit=24",
    "first": "/api/v1/food-orders?page=1&limit=24",
    "last": "/api/v1/food-orders?page=21&limit=24",
    "next": "/api/v1/food-orders?page=5&limit=24",
    "prev": "/api/v1/food-orders?page=3&limit=24"
  }
}