example-data.com
Menu
Browse docs and collections

food-orders

food-orders

Page 10 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": 217,
      "userId": 174,
      "restaurantId": 90,
      "items": [
        {
          "menuItemId": 1313,
          "quantity": 1,
          "unitPrice": 11.71,
          "lineTotal": 11.71
        },
        {
          "menuItemId": 1295,
          "quantity": 1,
          "unitPrice": 69.87,
          "lineTotal": 69.87
        },
        {
          "menuItemId": 1302,
          "quantity": 4,
          "unitPrice": 51.25,
          "lineTotal": 205
        }
      ],
      "subtotal": 286.58,
      "deliveryFee": 4.07,
      "tip": 0.5,
      "total": 291.15,
      "currency": "USD",
      "status": "preparing",
      "placedAt": "2024-08-30T19:17:15.112Z",
      "deliveredAt": null
    },
    {
      "id": 218,
      "userId": 192,
      "restaurantId": 21,
      "items": [
        {
          "menuItemId": 328,
          "quantity": 2,
          "unitPrice": 22.43,
          "lineTotal": 44.86
        }
      ],
      "subtotal": 44.86,
      "deliveryFee": 5.65,
      "tip": 11.21,
      "total": 61.72,
      "currency": "USD",
      "status": "delivered",
      "placedAt": "2025-04-18T02:13:26.609Z",
      "deliveredAt": "2025-04-18T05:43:39.023Z"
    },
    {
      "id": 219,
      "userId": 245,
      "restaurantId": 85,
      "items": [
        {
          "menuItemId": 1237,
          "quantity": 1,
          "unitPrice": 76.78,
          "lineTotal": 76.78
        },
        {
          "menuItemId": 1243,
          "quantity": 3,
          "unitPrice": 72.04,
          "lineTotal": 216.12
        },
        {
          "menuItemId": 1242,
          "quantity": 4,
          "unitPrice": 55.8,
          "lineTotal": 223.2
        }
      ],
      "subtotal": 516.1,
      "deliveryFee": 4.65,
      "tip": 1.74,
      "total": 522.49,
      "currency": "USD",
      "status": "placed",
      "placedAt": "2024-12-11T08:37:29.389Z",
      "deliveredAt": null
    }
  ],
  "meta": {
    "page": 10,
    "limit": 24,
    "total": 500,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/food-orders?page=10&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=11&limit=24",
    "prev": "/api/v1/food-orders?page=9&limit=24"
  }
}