example-data.com
Menu
Browse docs and collections

food-orders

food-orders

Page 17 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": 385,
      "userId": 33,
      "restaurantId": 68,
      "items": [
        {
          "menuItemId": 1013,
          "quantity": 4,
          "unitPrice": 6.63,
          "lineTotal": 26.52
        },
        {
          "menuItemId": 1023,
          "quantity": 3,
          "unitPrice": 18.52,
          "lineTotal": 55.56
        }
      ],
      "subtotal": 82.08,
      "deliveryFee": 6.02,
      "tip": 7.49,
      "total": 95.59,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2026-05-05T10:49:42.311Z",
      "deliveredAt": "2026-05-05T14:37:34.847Z"
    },
    {
      "id": 386,
      "userId": 24,
      "restaurantId": 80,
      "items": [
        {
          "menuItemId": 1174,
          "quantity": 3,
          "unitPrice": 10.64,
          "lineTotal": 31.92
        },
        {
          "menuItemId": 1178,
          "quantity": 4,
          "unitPrice": 32.02,
          "lineTotal": 128.08
        }
      ],
      "subtotal": 160,
      "deliveryFee": 5.83,
      "tip": 0.17,
      "total": 166,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2026-01-01T00:07:16.083Z",
      "deliveredAt": "2026-01-01T03:03:39.402Z"
    },
    {
      "id": 387,
      "userId": 245,
      "restaurantId": 59,
      "items": [
        {
          "menuItemId": 902,
          "quantity": 1,
          "unitPrice": 11.61,
          "lineTotal": 11.61
        },
        {
          "menuItemId": 900,
          "quantity": 3,
          "unitPrice": 31.5,
          "lineTotal": 94.5
        },
        {
          "menuItemId": 897,
          "quantity": 2,
          "unitPrice": 27.35,
          "lineTotal": 54.7
        },
        {
          "menuItemId": 903,
          "quantity": 4,
          "unitPrice": 53.71,
          "lineTotal": 214.84
        }
      ],
      "subtotal": 375.65,
      "deliveryFee": 3.55,
      "tip": 10.11,
      "total": 389.31,
      "currency": "USD",
      "status": "cancelled",
      "placedAt": "2024-06-12T20:20:16.679Z",
      "deliveredAt": null
    }
  ],
  "meta": {
    "page": 17,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/food-orders?page=17&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=18&limit=24",
    "prev": "/api/v1/food-orders?page=16&limit=24"
  }
}