example-data.com
Menu
Browse docs and collections

food-orders

food-orders

Page 3 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": 49,
      "userId": 168,
      "restaurantId": 91,
      "items": [
        {
          "menuItemId": 1329,
          "quantity": 4,
          "unitPrice": 16.64,
          "lineTotal": 66.56
        },
        {
          "menuItemId": 1324,
          "quantity": 2,
          "unitPrice": 9.34,
          "lineTotal": 18.68
        }
      ],
      "subtotal": 85.24,
      "deliveryFee": 4.77,
      "tip": 3.81,
      "total": 93.82,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2024-10-01T13:57:58.497Z",
      "deliveredAt": "2024-10-01T16:38:33.331Z"
    },
    {
      "id": 50,
      "userId": 12,
      "restaurantId": 89,
      "items": [
        {
          "menuItemId": 1282,
          "quantity": 4,
          "unitPrice": 13.28,
          "lineTotal": 53.12
        },
        {
          "menuItemId": 1284,
          "quantity": 3,
          "unitPrice": 66.71,
          "lineTotal": 200.13
        },
        {
          "menuItemId": 1285,
          "quantity": 1,
          "unitPrice": 8.63,
          "lineTotal": 8.63
        },
        {
          "menuItemId": 1280,
          "quantity": 1,
          "unitPrice": 8.8,
          "lineTotal": 8.8
        }
      ],
      "subtotal": 270.68,
      "deliveryFee": 6.12,
      "tip": 9.35,
      "total": 286.15,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2025-04-26T07:18:30.467Z",
      "deliveredAt": "2025-04-26T10:34:49.625Z"
    },
    {
      "id": 51,
      "userId": 235,
      "restaurantId": 65,
      "items": [
        {
          "menuItemId": 974,
          "quantity": 2,
          "unitPrice": 76.81,
          "lineTotal": 153.62
        },
        {
          "menuItemId": 987,
          "quantity": 4,
          "unitPrice": 32.67,
          "lineTotal": 130.68
        },
        {
          "menuItemId": 978,
          "quantity": 1,
          "unitPrice": 15.99,
          "lineTotal": 15.99
        }
      ],
      "subtotal": 300.29,
      "deliveryFee": 7.6,
      "tip": 2.01,
      "total": 309.9,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2025-04-18T05:51:48.288Z",
      "deliveredAt": "2025-04-18T09:41:39.596Z"
    }
  ],
  "meta": {
    "page": 3,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/food-orders?page=3&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=4&limit=24",
    "prev": "/api/v1/food-orders?page=2&limit=24"
  }
}