example-data.com
Menu
Browse docs and collections

food-orders

food-orders

Page 21 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": 481,
      "userId": 128,
      "restaurantId": 3,
      "items": [
        {
          "menuItemId": 33,
          "quantity": 3,
          "unitPrice": 28.94,
          "lineTotal": 86.82
        }
      ],
      "subtotal": 86.82,
      "deliveryFee": 6.79,
      "tip": 11.31,
      "total": 104.92,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2025-10-01T07:25:20.478Z",
      "deliveredAt": "2025-10-01T08:30:12.755Z"
    },
    {
      "id": 482,
      "userId": 93,
      "restaurantId": 67,
      "items": [
        {
          "menuItemId": 1006,
          "quantity": 1,
          "unitPrice": 51.33,
          "lineTotal": 51.33
        },
        {
          "menuItemId": 1007,
          "quantity": 2,
          "unitPrice": 26.43,
          "lineTotal": 52.86
        },
        {
          "menuItemId": 1005,
          "quantity": 2,
          "unitPrice": 9.96,
          "lineTotal": 19.92
        },
        {
          "menuItemId": 1004,
          "quantity": 2,
          "unitPrice": 73.14,
          "lineTotal": 146.28
        }
      ],
      "subtotal": 270.39,
      "deliveryFee": 6.11,
      "tip": 10.05,
      "total": 286.55,
      "currency": "USD",
      "status": "out_for_delivery",
      "placedAt": "2025-12-07T23:24:14.276Z",
      "deliveredAt": null
    },
    {
      "id": 483,
      "userId": 6,
      "restaurantId": 70,
      "items": [
        {
          "menuItemId": 1053,
          "quantity": 4,
          "unitPrice": 16.71,
          "lineTotal": 66.84
        }
      ],
      "subtotal": 66.84,
      "deliveryFee": 4.24,
      "tip": 9.5,
      "total": 80.58,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2024-10-15T18:42:11.327Z",
      "deliveredAt": "2024-10-15T20:26:15.563Z"
    }
  ],
  "meta": {
    "page": 21,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/food-orders?page=21&limit=24",
    "first": "/api/v1/food-orders?page=1&limit=24",
    "last": "/api/v1/food-orders?page=21&limit=24",
    "next": null,
    "prev": "/api/v1/food-orders?page=20&limit=24"
  }
}