food-orders
food-orders
Page 7 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": 145,
"userId": 156,
"restaurantId": 19,
"items": [
{
"menuItemId": 302,
"quantity": 3,
"unitPrice": 47.36,
"lineTotal": 142.08
},
{
"menuItemId": 293,
"quantity": 4,
"unitPrice": 25.88,
"lineTotal": 103.52
},
{
"menuItemId": 297,
"quantity": 3,
"unitPrice": 7.24,
"lineTotal": 21.72
},
{
"menuItemId": 290,
"quantity": 3,
"unitPrice": 23.1,
"lineTotal": 69.3
}
],
"subtotal": 336.62,
"deliveryFee": 2.3,
"tip": 0.6,
"total": 339.52,
"currency": "USD",
"status": "delivered",
"placedAt": "2025-05-27T17:33:31.562Z",
"deliveredAt": "2025-05-27T19:28:14.485Z"
},
{
"id": 146,
"userId": 67,
"restaurantId": 23,
"items": [
{
"menuItemId": 351,
"quantity": 1,
"unitPrice": 32.29,
"lineTotal": 32.29
},
{
"menuItemId": 358,
"quantity": 4,
"unitPrice": 60.89,
"lineTotal": 243.56
},
{
"menuItemId": 346,
"quantity": 1,
"unitPrice": 68.02,
"lineTotal": 68.02
}
],
"subtotal": 343.87,
"deliveryFee": 3.97,
"tip": 11.18,
"total": 359.02,
"currency": "USD",
"status": "placed",
"placedAt": "2025-01-06T00:54:34.480Z",
"deliveredAt": null
},
{
"id": 147,
"userId": 231,
"restaurantId": 49,
"items": [
{
"menuItemId": 740,
"quantity": 3,
"unitPrice": 49.23,
"lineTotal": 147.69
},
{
"menuItemId": 746,
"quantity": 4,
"unitPrice": 33.22,
"lineTotal": 132.88
},
{
"menuItemId": 737,
"quantity": 2,
"unitPrice": 72.62,
"lineTotal": 145.24
}
],
"subtotal": 425.81,
"deliveryFee": 3.24,
"tip": 11.87,
"total": 440.92,
"currency": "USD",
"status": "cancelled",
"placedAt": "2024-12-06T21:07:39.548Z",
"deliveredAt": null
}
],
"meta": {
"page": 7,
"limit": 24,
"total": 500,
"totalPages": 21
},
"links": {
"self": "/api/v1/food-orders?page=7&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=8&limit=24",
"prev": "/api/v1/food-orders?page=6&limit=24"
}
}