example-data.com
Menu
Browse docs and collections

food-orders

food-orders

Page 6 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": 121,
      "userId": 204,
      "restaurantId": 89,
      "items": [
        {
          "menuItemId": 1282,
          "quantity": 4,
          "unitPrice": 13.28,
          "lineTotal": 53.12
        },
        {
          "menuItemId": 1284,
          "quantity": 2,
          "unitPrice": 66.71,
          "lineTotal": 133.42
        }
      ],
      "subtotal": 186.54,
      "deliveryFee": 0.03,
      "tip": 4.93,
      "total": 191.5,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2025-01-29T13:50:55.517Z",
      "deliveredAt": "2025-01-29T17:42:02.486Z"
    },
    {
      "id": 122,
      "userId": 241,
      "restaurantId": 31,
      "items": [
        {
          "menuItemId": 466,
          "quantity": 2,
          "unitPrice": 18.03,
          "lineTotal": 36.06
        }
      ],
      "subtotal": 36.06,
      "deliveryFee": 4.38,
      "tip": 7.86,
      "total": 48.3,
      "currency": "USD",
      "status": "placed",
      "placedAt": "2026-02-14T12:39:07.427Z",
      "deliveredAt": null
    },
    {
      "id": 123,
      "userId": 53,
      "restaurantId": 32,
      "items": [
        {
          "menuItemId": 480,
          "quantity": 3,
          "unitPrice": 66.92,
          "lineTotal": 200.76
        },
        {
          "menuItemId": 477,
          "quantity": 2,
          "unitPrice": 68.24,
          "lineTotal": 136.48
        },
        {
          "menuItemId": 481,
          "quantity": 3,
          "unitPrice": 32.94,
          "lineTotal": 98.82
        }
      ],
      "subtotal": 436.06,
      "deliveryFee": 5.6,
      "tip": 3.43,
      "total": 445.09,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2025-02-03T22:55:49.182Z",
      "deliveredAt": "2025-02-04T02:14:28.995Z"
    }
  ],
  "meta": {
    "page": 6,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/food-orders?page=6&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=7&limit=24",
    "prev": "/api/v1/food-orders?page=5&limit=24"
  }
}