example-data.com
Menu
Browse docs and collections

food-orders

food-orders

Page 11 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": 241,
      "userId": 117,
      "restaurantId": 47,
      "items": [
        {
          "menuItemId": 723,
          "quantity": 4,
          "unitPrice": 39.51,
          "lineTotal": 158.04
        },
        {
          "menuItemId": 721,
          "quantity": 4,
          "unitPrice": 18.1,
          "lineTotal": 72.4
        },
        {
          "menuItemId": 725,
          "quantity": 3,
          "unitPrice": 19.19,
          "lineTotal": 57.57
        }
      ],
      "subtotal": 288.01,
      "deliveryFee": 5.87,
      "tip": 9.06,
      "total": 302.94,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2025-01-09T04:37:24.893Z",
      "deliveredAt": "2025-01-09T07:50:08.486Z"
    },
    {
      "id": 242,
      "userId": 48,
      "restaurantId": 98,
      "items": [
        {
          "menuItemId": 1423,
          "quantity": 4,
          "unitPrice": 73.02,
          "lineTotal": 292.08
        }
      ],
      "subtotal": 292.08,
      "deliveryFee": 0.71,
      "tip": 0.6,
      "total": 293.39,
      "currency": "USD",
      "status": "cancelled",
      "placedAt": "2026-01-22T13:33:38.293Z",
      "deliveredAt": null
    },
    {
      "id": 243,
      "userId": 19,
      "restaurantId": 44,
      "items": [
        {
          "menuItemId": 652,
          "quantity": 3,
          "unitPrice": 37.93,
          "lineTotal": 113.79
        }
      ],
      "subtotal": 113.79,
      "deliveryFee": 5.85,
      "tip": 9.34,
      "total": 128.98,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2025-11-13T02:16:53.078Z",
      "deliveredAt": "2025-11-13T06:16:13.793Z"
    }
  ],
  "meta": {
    "page": 11,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/food-orders?page=11&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=12&limit=24",
    "prev": "/api/v1/food-orders?page=10&limit=24"
  }
}