food-orders
food-orders
Page 8 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": 169,
"userId": 13,
"restaurantId": 22,
"items": [
{
"menuItemId": 342,
"quantity": 1,
"unitPrice": 76.35,
"lineTotal": 76.35
}
],
"subtotal": 76.35,
"deliveryFee": 5.03,
"tip": 6.98,
"total": 88.36,
"currency": "USD",
"status": "delivered",
"placedAt": "2024-08-23T06:51:05.434Z",
"deliveredAt": "2024-08-23T08:16:12.281Z"
},
{
"id": 170,
"userId": 83,
"restaurantId": 38,
"items": [
{
"menuItemId": 555,
"quantity": 1,
"unitPrice": 38.64,
"lineTotal": 38.64
}
],
"subtotal": 38.64,
"deliveryFee": 6.71,
"tip": 8.2,
"total": 53.55,
"currency": "USD",
"status": "delivered",
"placedAt": "2025-02-23T01:56:56.634Z",
"deliveredAt": "2025-02-23T05:13:51.046Z"
},
{
"id": 171,
"userId": 56,
"restaurantId": 100,
"items": [
{
"menuItemId": 1450,
"quantity": 3,
"unitPrice": 40.3,
"lineTotal": 120.9
},
{
"menuItemId": 1444,
"quantity": 1,
"unitPrice": 60.6,
"lineTotal": 60.6
}
],
"subtotal": 181.5,
"deliveryFee": 5.47,
"tip": 9.53,
"total": 196.5,
"currency": "USD",
"status": "delivered",
"placedAt": "2025-03-24T21:34:59.357Z",
"deliveredAt": "2025-03-25T00:12:40.277Z"
}
],
"meta": {
"page": 8,
"limit": 24,
"total": 500,
"totalPages": 21
},
"links": {
"self": "/api/v1/food-orders?page=8&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=9&limit=24",
"prev": "/api/v1/food-orders?page=7&limit=24"
}
}