Services, check-ins and visitors
Services and their daily schedules, attendance by app, USSD, biometric device or usher, Sunday school, and visitor follow-up.
A service is the recurring definition (Sunday first service, 08:00 to 10:00). Each day it runs, the api generates a schedule for that date with its own 4-digit check-in code; check-ins attach to a schedule. Every read route also accepts head_office:churches:view and system:churches:view with an X-Church header.
Services
| Route | Permission | Purpose |
|---|---|---|
| GET/v1/services | church:services:view | List services (q, type, page, page_size). |
| GET/v1/services/stats | church:services:view | Service and attendance counts for the dashboard. |
| POST/v1/services | church:services:manage | Create a service. |
| GET/v1/services/{uuid} | church:services:view | One service. |
| PUT/v1/services/{uuid} | church:services:manage | Update (PATCH accepted). |
| DELETE/v1/services/{uuid} | church:services:manage | Remove. |
| POST/v1/services/{uuid}/schedule | church:services:manage | Generate today's schedule now; force: true adds an extra sitting on a day the service is not due. |
| PUT/v1/services/{uuid}/checkin-message | church:services:manage | Check-in confirmation SMS for adults and children: message, send, child_message, send_child. |
| GET/v1/services/schedules | church:services:view | Schedules by date (from, to or date, service), with their check-in codes. |
| GET/v1/services/schedules/{uuid} | church:services:view | One schedule. |
| GET/v1/services/{uuid}/programs | church:services:view | Order of service PDFs attached to the service. |
| POST/v1/services/{uuid}/programs | church:services:manage | Upload an order of service PDF (multipart, at most 8 MB). |
| DELETE/v1/services/programs/{uuid} | church:services:manage | Remove a program. |
| GET/v1/services/head-counts | church:services:view | Usher head counts (service, page, page_size). |
| POST/v1/services/{uuid}/head-counts | church:services:manage | Record a head count: date, total. |
| PUT/v1/services/head-counts/{uuid} | church:services:manage | Correct a head count. |
| DELETE/v1/services/head-counts/{uuid} | church:services:manage | Remove a head count. |
Read routes accept church:services:view, church:checkins:view or church:sunday_school:view.
Service fields
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | For example "First Service". |
| description | string | No | Free text. |
| type | string | Yes | permanent (recurs on day_of_the_week) or adhoc (one-off on date). |
| day_of_the_week | string | No | Monday to Sunday, Daily or Weekdays. Required for permanent. |
| date | date | No | YYYY-MM-DD. Required for adhoc. |
| from_time | time | Yes | Start, HH:MM (Nairobi time). Check-in opens at the start. |
| to_time | time | Yes | End, HH:MM. Check-in closes at the end. |
| send_alert | boolean | No | Send members a reminder SMS before the service. |
| message | string | No | Reminder text. Placeholders: [name] [church_name] [service_name] [from_time] [to_time]. |
# Paste your token once (it starts with mc_):
export MYCHURCH_TOKEN="mc_your_token_here"
curl -X POST https://uat-api.mychurch.co.ke/v1/services \
-H "Authorization: Bearer $MYCHURCH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "First Service",
"type": "permanent",
"day_of_the_week": "Sunday",
"from_time": "08:00",
"to_time": "10:00",
"send_alert": true,
"message": "Dear [name], [service_name] at [church_name] starts at [from_time]. Welcome!"
}'Check-ins
Members check themselves in from the app or USSD with the day's code, devices check them in by fingerprint, and ushers record anyone else here. Lists are read for a date window (default the current month).
| Route | Permission | Purpose |
|---|---|---|
| GET/v1/checkins | church:checkins:view | Check-ins (schedule, channel, attendee, q, from, to, page, page_size). |
| GET/v1/checkins/stats | church:checkins:view | Attendance totals by channel for the window. |
| POST/v1/checkins | church:checkins:manage | Check someone in: schedule_uuid and member_uuid, or a phone, or a name for a guest. |
| DELETE/v1/checkins/{uuid} | church:checkins:manage | Remove a check-in made in error. |
| GET/v1/checkins/children | church:checkins:view | Children checked in (schedule, open, q, from, to), with checkout status. |
| GET/v1/checkins/children/options | church:checkins:view | Children who can be checked in for a schedule (schedule required, age_group, q). |
| POST/v1/checkins/children | church:checkins:manage or church:sunday_school:edit | Check children in: schedule_uuid, child_uuids. |
| POST/v1/checkins/children/{uuid}/checkout | church:checkins:manage or church:sunday_school:edit | Check a child out to a parent or trustee. |
# Paste your token once (it starts with mc_):
export MYCHURCH_TOKEN="mc_your_token_here"
curl -X POST https://uat-api.mychurch.co.ke/v1/checkins \
-H "Authorization: Bearer $MYCHURCH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"schedule_uuid": "7a2e9c10-0000-4000-8000-00000000c001",
"member_uuid": "0b6f4c1e-1111-4a2b-9c3d-000000000001"
}'Sunday school
| Route | Permission | Purpose |
|---|---|---|
| GET/v1/sunday-school/classes | church:sunday_school:view | Classes. |
| POST/v1/sunday-school/classes | church:sunday_school:create | Create a class: name, description. |
| PUT/v1/sunday-school/classes/{uuid} | church:sunday_school:edit | Update a class (PATCH accepted). |
| DELETE/v1/sunday-school/classes/{uuid} | church:sunday_school:delete | Remove a class. |
| GET/v1/sunday-school/teachers | church:sunday_school:view | Teachers and the age group each teaches. |
| GET/v1/sunday-school/teachers/candidates | church:sunday_school:view | Church users who can be made teachers. |
| POST/v1/sunday-school/teachers | church:sunday_school:edit | Assign a teacher: user_uuid, age_group_uuid. |
| DELETE/v1/sunday-school/teachers/{uuid} | church:sunday_school:edit | Unassign a teacher. |
| GET/v1/sunday-school/sessions | church:sunday_school:view | Sessions (a class meeting during a schedule). |
| POST/v1/sunday-school/sessions | church:sunday_school:create | Open a session: schedule_uuid, class_uuid, age_group_uuid. |
| DELETE/v1/sunday-school/sessions/{uuid} | church:sunday_school:delete | Remove a session. |
| GET/v1/sunday-school/age-groups | church:sunday_school:view | Children's age groups. |
| GET/v1/sunday-school/settings | church:sunday_school:view | Whether parents get an SMS when a child is checked out. |
| PUT/v1/sunday-school/settings | church:sunday_school:edit | Set send_checkout_sms. |
Biometric devices
A device is registered by its serial number and assigned to a schedule; it then posts each scan to the device endpoint and the member is checked in. Biometric devices covers the device side.
| Route | Permission | Purpose |
|---|---|---|
| GET/v1/biometrics | church:services:view | Registered devices and their current schedule. |
| POST/v1/biometrics | church:services:manage or church:checkins:manage | Register a device: serial_number, name, location. |
| PUT/v1/biometrics/{uuid} | church:services:manage or church:checkins:manage | Rename or move a device (PATCH accepted). |
| POST/v1/biometrics/{uuid}/assign | church:services:manage or church:checkins:manage | Point the device at a schedule (schedule_uuid; empty unassigns). |
| DELETE/v1/biometrics/{uuid} | church:services:manage or church:checkins:manage | Remove a device. |
{
"serial_number": "ZK-0000-EXAMPLE-01",
"name": "Main entrance",
"location": "Sanctuary, east door"
}Visitors
First-time guests, their answers to the church's welcome questionnaire, and conversion into members.
| Route | Permission | Purpose |
|---|---|---|
| GET/v1/visitors | church:visitors:view | List visitors (q, converted, from, to, page, page_size). |
| GET/v1/visitors/stats | church:visitors:view | Visitor counts. |
| POST/v1/visitors | church:visitors:create or church:visitors:edit | Record a visitor with their questionnaire answers. |
| GET/v1/visitors/{uuid} | church:visitors:view | One visitor. |
| DELETE/v1/visitors/{uuid} | church:visitors:delete | Remove a visitor. |
| POST/v1/visitors/{uuid}/convert | church:visitors:edit | Make the visitor a member. |
| POST/v1/visitors/convert | church:visitors:edit | Convert several visitors at once. |
| GET/v1/visitors/questionnaires | church:visitors:view | The welcome questions. |
| POST/v1/visitors/questionnaires | church:visitors:edit | Add a question. |
| PUT/v1/visitors/questionnaires/{uuid} | church:visitors:edit | Change a question (PATCH accepted). |
| DELETE/v1/visitors/questionnaires/{uuid} | church:visitors:edit | Remove a question. |
From the app