example-data.com
Menu
Browse docs and collections

food-orders

food-orders

Page 15 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": 337,
      "userId": 239,
      "restaurantId": 28,
      "items": [
        {
          "menuItemId": 423,
          "quantity": 2,
          "unitPrice": 4.26,
          "lineTotal": 8.52
        },
        {
          "menuItemId": 421,
          "quantity": 1,
          "unitPrice": 67.57,
          "lineTotal": 67.57
        },
        {
          "menuItemId": 419,
          "quantity": 1,
          "unitPrice": 77.11,
          "lineTotal": 77.11
        }
      ],
      "subtotal": 153.2,
      "deliveryFee": 5.11,
      "tip": 11.28,
      "total": 169.59,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2026-03-15T06:23:41.621Z",
      "deliveredAt": "2026-03-15T08:31:55.342Z"
    },
    {
      "id": 338,
      "userId": 63,
      "restaurantId": 1,
      "items": [
        {
          "menuItemId": 2,
          "quantity": 2,
          "unitPrice": 4.82,
          "lineTotal": 9.64
        },
        {
          "menuItemId": 3,
          "quantity": 4,
          "unitPrice": 9.71,
          "lineTotal": 38.84
        },
        {
          "menuItemId": 8,
          "quantity": 4,
          "unitPrice": 48.88,
          "lineTotal": 195.52
        },
        {
          "menuItemId": 7,
          "quantity": 4,
          "unitPrice": 35.62,
          "lineTotal": 142.48
        }
      ],
      "subtotal": 386.48,
      "deliveryFee": 7.51,
      "tip": 11.43,
      "total": 405.42,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2026-04-30T23:12:47.197Z",
      "deliveredAt": "2026-05-01T01:59:07.133Z"
    },
    {
      "id": 339,
      "userId": 1,
      "restaurantId": 98,
      "items": [
        {
          "menuItemId": 1422,
          "quantity": 3,
          "unitPrice": 48.1,
          "lineTotal": 144.3
        },
        {
          "menuItemId": 1426,
          "quantity": 2,
          "unitPrice": 75.59,
          "lineTotal": 151.18
        },
        {
          "menuItemId": 1427,
          "quantity": 2,
          "unitPrice": 24.79,
          "lineTotal": 49.58
        },
        {
          "menuItemId": 1423,
          "quantity": 3,
          "unitPrice": 73.02,
          "lineTotal": 219.06
        },
        {
          "menuItemId": 1424,
          "quantity": 1,
          "unitPrice": 65.44,
          "lineTotal": 65.44
        }
      ],
      "subtotal": 629.56,
      "deliveryFee": 2.07,
      "tip": 6.41,
      "total": 638.04,
      "currency": "USD",
      "status": "cancelled",
      "placedAt": "2025-02-04T02:51:07.031Z",
      "deliveredAt": null
    }
  ],
  "meta": {
    "page": 15,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/food-orders?page=15&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=16&limit=24",
    "prev": "/api/v1/food-orders?page=14&limit=24"
  }
}