example-data.com
Menu
Browse docs and collections

food-orders

food-orders

Page 20 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": 457,
      "userId": 88,
      "restaurantId": 26,
      "items": [
        {
          "menuItemId": 395,
          "quantity": 3,
          "unitPrice": 65.51,
          "lineTotal": 196.53
        },
        {
          "menuItemId": 397,
          "quantity": 1,
          "unitPrice": 11.75,
          "lineTotal": 11.75
        },
        {
          "menuItemId": 398,
          "quantity": 1,
          "unitPrice": 24.39,
          "lineTotal": 24.39
        },
        {
          "menuItemId": 399,
          "quantity": 3,
          "unitPrice": 25.49,
          "lineTotal": 76.47
        }
      ],
      "subtotal": 309.14,
      "deliveryFee": 6.28,
      "tip": 10.22,
      "total": 325.64,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2025-10-31T06:53:38.787Z",
      "deliveredAt": "2025-10-31T08:56:23.026Z"
    },
    {
      "id": 458,
      "userId": 50,
      "restaurantId": 30,
      "items": [
        {
          "menuItemId": 451,
          "quantity": 2,
          "unitPrice": 15.67,
          "lineTotal": 31.34
        },
        {
          "menuItemId": 448,
          "quantity": 3,
          "unitPrice": 72.84,
          "lineTotal": 218.52
        },
        {
          "menuItemId": 444,
          "quantity": 3,
          "unitPrice": 24.4,
          "lineTotal": 73.2
        }
      ],
      "subtotal": 323.06,
      "deliveryFee": 4.59,
      "tip": 7.29,
      "total": 334.94,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2025-12-18T04:19:46.205Z",
      "deliveredAt": "2025-12-18T08:14:00.655Z"
    },
    {
      "id": 459,
      "userId": 40,
      "restaurantId": 100,
      "items": [
        {
          "menuItemId": 1444,
          "quantity": 4,
          "unitPrice": 60.6,
          "lineTotal": 242.4
        }
      ],
      "subtotal": 242.4,
      "deliveryFee": 7.8,
      "tip": 11.5,
      "total": 261.7,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2024-10-25T16:17:45.505Z",
      "deliveredAt": "2024-10-25T19:50:52.717Z"
    }
  ],
  "meta": {
    "page": 20,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/food-orders?page=20&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=21&limit=24",
    "prev": "/api/v1/food-orders?page=19&limit=24"
  }
}