MyChurchDocs

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

RoutePermissionPurpose
GET/v1/serviceschurch:services:viewList services (q, type, page, page_size).
GET/v1/services/statschurch:services:viewService and attendance counts for the dashboard.
POST/v1/serviceschurch:services:manageCreate a service.
GET/v1/services/{uuid}church:services:viewOne service.
PUT/v1/services/{uuid}church:services:manageUpdate (PATCH accepted).
DELETE/v1/services/{uuid}church:services:manageRemove.
POST/v1/services/{uuid}/schedulechurch:services:manageGenerate today's schedule now; force: true adds an extra sitting on a day the service is not due.
PUT/v1/services/{uuid}/checkin-messagechurch:services:manageCheck-in confirmation SMS for adults and children: message, send, child_message, send_child.
GET/v1/services/scheduleschurch:services:viewSchedules by date (from, to or date, service), with their check-in codes.
GET/v1/services/schedules/{uuid}church:services:viewOne schedule.
GET/v1/services/{uuid}/programschurch:services:viewOrder of service PDFs attached to the service.
POST/v1/services/{uuid}/programschurch:services:manageUpload an order of service PDF (multipart, at most 8 MB).
DELETE/v1/services/programs/{uuid}church:services:manageRemove a program.
GET/v1/services/head-countschurch:services:viewUsher head counts (service, page, page_size).
POST/v1/services/{uuid}/head-countschurch:services:manageRecord a head count: date, total.
PUT/v1/services/head-counts/{uuid}church:services:manageCorrect a head count.
DELETE/v1/services/head-counts/{uuid}church:services:manageRemove a head count.

Read routes accept church:services:view, church:checkins:view or church:sunday_school:view.

Service fields

FieldTypeRequiredDescription
namestringYesFor example "First Service".
descriptionstringNoFree text.
typestringYespermanent (recurs on day_of_the_week) or adhoc (one-off on date).
day_of_the_weekstringNoMonday to Sunday, Daily or Weekdays. Required for permanent.
datedateNoYYYY-MM-DD. Required for adhoc.
from_timetimeYesStart, HH:MM (Nairobi time). Check-in opens at the start.
to_timetimeYesEnd, HH:MM. Check-in closes at the end.
send_alertbooleanNoSend members a reminder SMS before the service.
messagestringNoReminder 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).

RoutePermissionPurpose
GET/v1/checkinschurch:checkins:viewCheck-ins (schedule, channel, attendee, q, from, to, page, page_size).
GET/v1/checkins/statschurch:checkins:viewAttendance totals by channel for the window.
POST/v1/checkinschurch:checkins:manageCheck someone in: schedule_uuid and member_uuid, or a phone, or a name for a guest.
DELETE/v1/checkins/{uuid}church:checkins:manageRemove a check-in made in error.
GET/v1/checkins/childrenchurch:checkins:viewChildren checked in (schedule, open, q, from, to), with checkout status.
GET/v1/checkins/children/optionschurch:checkins:viewChildren who can be checked in for a schedule (schedule required, age_group, q).
POST/v1/checkins/childrenchurch:checkins:manage or church:sunday_school:editCheck children in: schedule_uuid, child_uuids.
POST/v1/checkins/children/{uuid}/checkoutchurch:checkins:manage or church:sunday_school:editCheck 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

RoutePermissionPurpose
GET/v1/sunday-school/classeschurch:sunday_school:viewClasses.
POST/v1/sunday-school/classeschurch:sunday_school:createCreate a class: name, description.
PUT/v1/sunday-school/classes/{uuid}church:sunday_school:editUpdate a class (PATCH accepted).
DELETE/v1/sunday-school/classes/{uuid}church:sunday_school:deleteRemove a class.
GET/v1/sunday-school/teacherschurch:sunday_school:viewTeachers and the age group each teaches.
GET/v1/sunday-school/teachers/candidateschurch:sunday_school:viewChurch users who can be made teachers.
POST/v1/sunday-school/teacherschurch:sunday_school:editAssign a teacher: user_uuid, age_group_uuid.
DELETE/v1/sunday-school/teachers/{uuid}church:sunday_school:editUnassign a teacher.
GET/v1/sunday-school/sessionschurch:sunday_school:viewSessions (a class meeting during a schedule).
POST/v1/sunday-school/sessionschurch:sunday_school:createOpen a session: schedule_uuid, class_uuid, age_group_uuid.
DELETE/v1/sunday-school/sessions/{uuid}church:sunday_school:deleteRemove a session.
GET/v1/sunday-school/age-groupschurch:sunday_school:viewChildren's age groups.
GET/v1/sunday-school/settingschurch:sunday_school:viewWhether parents get an SMS when a child is checked out.
PUT/v1/sunday-school/settingschurch:sunday_school:editSet 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.

RoutePermissionPurpose
GET/v1/biometricschurch:services:viewRegistered devices and their current schedule.
POST/v1/biometricschurch:services:manage or church:checkins:manageRegister a device: serial_number, name, location.
PUT/v1/biometrics/{uuid}church:services:manage or church:checkins:manageRename or move a device (PATCH accepted).
POST/v1/biometrics/{uuid}/assignchurch:services:manage or church:checkins:managePoint the device at a schedule (schedule_uuid; empty unassigns).
DELETE/v1/biometrics/{uuid}church:services:manage or church:checkins:manageRemove a device.
POST /v1/biometrics
{
  "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.

RoutePermissionPurpose
GET/v1/visitorschurch:visitors:viewList visitors (q, converted, from, to, page, page_size).
GET/v1/visitors/statschurch:visitors:viewVisitor counts.
POST/v1/visitorschurch:visitors:create or church:visitors:editRecord a visitor with their questionnaire answers.
GET/v1/visitors/{uuid}church:visitors:viewOne visitor.
DELETE/v1/visitors/{uuid}church:visitors:deleteRemove a visitor.
POST/v1/visitors/{uuid}/convertchurch:visitors:editMake the visitor a member.
POST/v1/visitors/convertchurch:visitors:editConvert several visitors at once.
GET/v1/visitors/questionnaireschurch:visitors:viewThe welcome questions.
POST/v1/visitors/questionnaireschurch:visitors:editAdd a question.
PUT/v1/visitors/questionnaires/{uuid}church:visitors:editChange a question (PATCH accepted).
DELETE/v1/visitors/questionnaires/{uuid}church:visitors:editRemove a question.

From the app

Members check in and check children in and out through the member app check-in routes; those land in the same lists.