MyChurchDocs

Pagination, filters and exports

Platform API lists page with page and page_size and report the total in meta. A few member app routes return the Laravel paginator the apps already parse.

Platform API lists

Query parameters every list accepts

FieldTypeRequiredDescription
pageintegerNoPage number, from 1. Default 1.
page_sizeintegerNoRows per page. Default 25, maximum 200; larger values are capped.
qstringNoFree-text search where the list supports it (names, phones, numbers).
statusstringNoFilter by status where the resource has one.
from, todateNoDate window, YYYY-MM-DD, inclusive. See below.
bash
curl "https://uat-api.mychurch.co.ke/v1/members?q=wanjiku&status=active&page=2&page_size=50" \
  -H "Authorization: Bearer $MYCHURCH_TOKEN"
Response
{
  "success": true,
  "data": [ /* up to 50 members */ ],
  "meta": { "page": 2, "page_size": 50, "total": 1312 }
}

There are more pages while page * page_size < total. Filters are flat query parameters; each resource's page in the Platform API lists the ones it supports.

Date windows on large ledgers

The collection ledger, account ledger, outgoing messages, check-ins and the audit log are stored by month. Their lists always apply a date window, and when you send no from/to the window is the current month. To read October 2026, send from=2026-10-01&to=2026-10-31; to read a year, page month by month.

Exports

The collection ledger and expenses have a quick CSV export at GET /v1/collection-transactions/export.csv and GET /v1/expenses/export.csv, with the same filters as the list. The file streams back directly and is capped at a maximum row count; narrow the date window if you reach it. Formatted XLSX and PDF reports (statements, giving summaries) are generated in the background instead: see Reports.

Member app API pages

A few member routes return Laravel's paginator and take ?page=. The public web/sermons, web/livestreams and web/categories routes return it as the whole body (15 or 20 per page); contribution-programs (20 per page) and contribution-program-transactions (50 per page) wrap it in a field beside status and message, and web/churches wraps it in data.

Laravel paginator shape
{
  "current_page": 1,
  "data": [ /* items */ ],
  "first_page_url": "https://uat-api.mychurch.co.ke/api/v2/web/sermons?page=1",
  "from": 1,
  "last_page": 2,
  "last_page_url": "https://uat-api.mychurch.co.ke/api/v2/web/sermons?page=2",
  "links": [
    { "url": null, "label": "&laquo; Previous", "active": false },
    { "url": "https://uat-api.mychurch.co.ke/api/v2/web/sermons?page=1", "label": "1", "active": true },
    { "url": "https://uat-api.mychurch.co.ke/api/v2/web/sermons?page=2", "label": "2", "active": false },
    { "url": "https://uat-api.mychurch.co.ke/api/v2/web/sermons?page=2", "label": "Next &raquo;", "active": false }
  ],
  "next_page_url": "https://uat-api.mychurch.co.ke/api/v2/web/sermons?page=2",
  "path": "https://uat-api.mychurch.co.ke/api/v2/web/sermons",
  "per_page": 15,
  "prev_page_url": null,
  "to": 15,
  "total": 27
}
Follow next_page_url until it is null. On an empty list from and to are null.