example-data.com
Menu
Browse docs and collections

food-orders

food-orders

Page 18 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": 409,
      "userId": 17,
      "restaurantId": 17,
      "items": [
        {
          "menuItemId": 269,
          "quantity": 4,
          "unitPrice": 66.78,
          "lineTotal": 267.12
        },
        {
          "menuItemId": 255,
          "quantity": 4,
          "unitPrice": 45.53,
          "lineTotal": 182.12
        },
        {
          "menuItemId": 275,
          "quantity": 2,
          "unitPrice": 67.32,
          "lineTotal": 134.64
        },
        {
          "menuItemId": 273,
          "quantity": 3,
          "unitPrice": 59.36,
          "lineTotal": 178.08
        }
      ],
      "subtotal": 761.96,
      "deliveryFee": 6.01,
      "tip": 2.76,
      "total": 770.73,
      "currency": "USD",
      "status": "preparing",
      "placedAt": "2025-08-08T12:39:07.208Z",
      "deliveredAt": null
    },
    {
      "id": 410,
      "userId": 127,
      "restaurantId": 93,
      "items": [
        {
          "menuItemId": 1349,
          "quantity": 2,
          "unitPrice": 43.63,
          "lineTotal": 87.26
        },
        {
          "menuItemId": 1353,
          "quantity": 1,
          "unitPrice": 5.73,
          "lineTotal": 5.73
        }
      ],
      "subtotal": 92.99,
      "deliveryFee": 4.15,
      "tip": 2.08,
      "total": 99.22,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2025-11-14T13:52:03.154Z",
      "deliveredAt": "2025-11-14T15:25:36.665Z"
    },
    {
      "id": 411,
      "userId": 78,
      "restaurantId": 79,
      "items": [
        {
          "menuItemId": 1157,
          "quantity": 3,
          "unitPrice": 3.82,
          "lineTotal": 11.46
        },
        {
          "menuItemId": 1161,
          "quantity": 4,
          "unitPrice": 51.7,
          "lineTotal": 206.8
        },
        {
          "menuItemId": 1154,
          "quantity": 2,
          "unitPrice": 68.24,
          "lineTotal": 136.48
        },
        {
          "menuItemId": 1159,
          "quantity": 4,
          "unitPrice": 49.21,
          "lineTotal": 196.84
        },
        {
          "menuItemId": 1166,
          "quantity": 3,
          "unitPrice": 48.23,
          "lineTotal": 144.69
        }
      ],
      "subtotal": 696.27,
      "deliveryFee": 6.45,
      "tip": 4.18,
      "total": 706.9,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2024-06-15T06:31:57.628Z",
      "deliveredAt": "2024-06-15T09:03:41.541Z"
    }
  ],
  "meta": {
    "page": 18,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/food-orders?page=18&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=19&limit=24",
    "prev": "/api/v1/food-orders?page=17&limit=24"
  }
}