example-data.com
Menu
Browse docs and collections

food-orders

food-orders

Page 9 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": 193,
      "userId": 145,
      "restaurantId": 49,
      "items": [
        {
          "menuItemId": 752,
          "quantity": 3,
          "unitPrice": 34.93,
          "lineTotal": 104.79
        },
        {
          "menuItemId": 743,
          "quantity": 4,
          "unitPrice": 5.59,
          "lineTotal": 22.36
        }
      ],
      "subtotal": 127.15,
      "deliveryFee": 0.27,
      "tip": 8.36,
      "total": 135.78,
      "currency": "USD",
      "status": "cancelled",
      "placedAt": "2025-02-26T03:51:15.964Z",
      "deliveredAt": null
    },
    {
      "id": 194,
      "userId": 233,
      "restaurantId": 54,
      "items": [
        {
          "menuItemId": 813,
          "quantity": 3,
          "unitPrice": 70.63,
          "lineTotal": 211.89
        },
        {
          "menuItemId": 812,
          "quantity": 1,
          "unitPrice": 71.08,
          "lineTotal": 71.08
        },
        {
          "menuItemId": 806,
          "quantity": 4,
          "unitPrice": 46.54,
          "lineTotal": 186.16
        }
      ],
      "subtotal": 469.13,
      "deliveryFee": 6.4,
      "tip": 1.11,
      "total": 476.64,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2024-06-29T15:58:32.429Z",
      "deliveredAt": "2024-06-29T18:43:19.983Z"
    },
    {
      "id": 195,
      "userId": 229,
      "restaurantId": 92,
      "items": [
        {
          "menuItemId": 1345,
          "quantity": 3,
          "unitPrice": 71.58,
          "lineTotal": 214.74
        },
        {
          "menuItemId": 1335,
          "quantity": 3,
          "unitPrice": 59.2,
          "lineTotal": 177.6
        },
        {
          "menuItemId": 1331,
          "quantity": 3,
          "unitPrice": 31.3,
          "lineTotal": 93.9
        },
        {
          "menuItemId": 1342,
          "quantity": 1,
          "unitPrice": 22.14,
          "lineTotal": 22.14
        },
        {
          "menuItemId": 1339,
          "quantity": 4,
          "unitPrice": 5.4,
          "lineTotal": 21.6
        }
      ],
      "subtotal": 529.98,
      "deliveryFee": 4.14,
      "tip": 3.87,
      "total": 537.99,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2025-07-23T13:35:06.300Z",
      "deliveredAt": "2025-07-23T17:00:48.389Z"
    }
  ],
  "meta": {
    "page": 9,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/food-orders?page=9&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=10&limit=24",
    "prev": "/api/v1/food-orders?page=8&limit=24"
  }
}