The list object
{
"object": "list",
"url": "/api/v1/orders",
"has_more": true,
"next_cursor": "eyJwIjoyfQ",
"data": [ { "object": "order", "id": "O-7KQ2M4X", "...": "..." } ]
}dataholds this page’s objects, in the order the endpoint describes (newest first for orders, soonest first for events).has_moreistruewhen there is another page.next_cursoris what to send ascursorfor that page, ornullon the last one. Treat it as an opaque string: it is only valid for the same list.
Parameters
| Parameter | What it does |
|---|---|
limit | Results a page, from 1 to 100. Default 25. Anything else is invalid_limit. |
cursor | The next_cursor of the page before. A cursor the API did not make is invalid_cursor. |
Send the same filters (such as event_id or q) with every page of one list.
Every page
async function* allOrders(eventId) {
let cursor = null;
do {
const q = new URLSearchParams({ event_id: String(eventId), limit: "100" });
if (cursor) q.set("cursor", cursor);
const res = await fetch(`https://eos.aveoevents.com/api/v1/orders?${q}`, {
headers: { Authorization: `Bearer ${process.env.EOS_API_KEY}` },
});
const page = await res.json();
if (!res.ok) throw new Error(page.error.message);
yield* page.data;
cursor = page.next_cursor;
} while (cursor);
}
for await (const order of allOrders(41)) console.log(order.id, order.total);Lists that page
GET /eventsList eventsGET /ordersList ordersGET /events/{id}/attendeesList guestsGET /events/{id}/check-insList check-insGET /webhook-endpoints/{id}/deliveriesList deliveries
Discount codes and webhook endpoints come back whole, in one list, because a company has few of them.