The DaChurchMan API provides endpoints for member authentication and registration across multiple churches. It uses a two-server architecture:
Important Notes:
Authentication is handled through a two-step process:
Important Note: The Church-Specific Server URL must be hard-coded in the mobile app and sent with other request parameters to the Central API Server. This allows the system to easily point to the needed server for each request.
In essence:
Both types of servers handle OTP in different ways:
This two-server approach allows for centralized control (via the Central API Server) while maintaining church-specific operations (via the Church-Specific Servers). It's a bit complex, but it allows for flexibility in managing multiple churches through a single app. The test environment (https://test.dachurchman.com) may represent multiple church-specific servers, allowing for testing and development of multi-church scenarios.
When a member belongs to multiple churches, the system automatically sets them up for all their churches during the initial signup. Here's how it works:
This multi-church signup process ensures a seamless experience for members who are part of multiple churches, allowing them to access all their church accounts through a single app signup.
POST https://api4mobile.dachurchman.com/api/register
Parameters (JSON):
{
"email": "string",
"server_url": "string"
}
Response:
{
"message": "OTP sent successfully",
"email": "[email protected]",
"is_multiple_churches": true
}
POST https://api4mobile.dachurchman.com/api/verify-otp
Parameters (JSON):
{
"email": "string",
"otp": "string",
"server_url": "string",
"church_id": "integer|null"
}
Response:
{
"message": "Signup successful. You can switch between your churches in the app.",
"token": "access_token_here",
"churches": [
{
"id": 1,
"name_of_church": "Example Church",
"location": "Example Location",
"email": "[email protected]"
}
],
"current_church": {
"id": 1,
"name_of_church": "Example Church",
"location": "Example Location",
"email": "[email protected]"
},
"user_data": {
"id": 1,
"member_id": "MEMBER001",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"church_id": 1
},
"is_multiple_churches": true,
"new_signups": []
}
POST https://test.dachurchman.com/api/signup/initiate
Parameters (JSON):
{
"email": "string",
"otp": "string",
"expiry_time": "string"
}
Response:
{
"message": "OTP sent successfully",
"churches": [
{
"id": 4,
"name_of_church": "Galilea Methodist Society",
"location": "Galilea",
"email": "[email protected]"
},
{
"id": 2,
"name_of_church": "Testing Account",
"location": "Accra",
"email": "[email protected]"
}
]
}
POST https://test.dachurchman.com/api/signup/verify
Parameters (JSON):
{
"email": "string",
"church_id": "integer",
"otp": "string"
}
Response:
{
"message": "Signup successful. You can now switch between your churches in the app.",
"churches": [
{
"id": 4,
"name_of_church": "Galilea Methodist Society",
"location": "Galilea",
"email": "[email protected]"
},
{
"id": 2,
"name_of_church": "Testing Account",
"location": "Accra",
"email": "[email protected]"
}
],
"current_church": {
"id": 4,
"name_of_church": "Galilea Methodist Society",
"location": "Galilea",
"email": "[email protected]"
},
"new_signups": [],
"members": [
{
"id": 1,
"member_id": "MEMBER001",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"church_id": 4
}
]
}
POST https://api4mobile.dachurchman.com/switch-church
Parameters (JSON):
{
"email": "string",
"church_id": "integer",
"server_url": "string"
}
Response:
{
"message": "Church switched successfully",
"current_church": {
"id": 2,
"name_of_church": "New Church",
"location": "New Location",
"email": "[email protected]"
},
"churches": [
{
"id": 1,
"name_of_church": "Example Church",
"location": "Example Location",
"email": "[email protected]"
},
{
"id": 2,
"name_of_church": "New Church",
"location": "New Location",
"email": "[email protected]"
}
],
"user_data": {
"id": 1,
"member_id": "MEMBER001",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"church_id": 2
},
"is_multiple_churches": true
}
This endpoint allows users to switch between their associated churches without needing to log out and log back in. The server will verify that the user is a member of the requested church before allowing the switch.
Error Responses:
POST https://api4mobile.dachurchman.com/logout
{
"message": "Successfully logged out"
}
POST https://api4mobile.dachurchman.com/refresh-token
{
"token": "new_access_token_here"
}
GET https://api4mobile.dachurchman.com/api/announcements
Parameters (JSON):
{
"email": "string",
"church_id": "integer",
"server_url": "string",
"token": "string"
}
Response:
{
"message": "Announcements fetched successfully",
"announcements": [
{
"id": 1,
"church_id": 123,
"title": "Sunday Service",
"announcement_details": "<p>Join us this Sunday for a special service.</p>",
"is_scheduled": 0,
"publish_date": "2024-09-06",
"publish_time": "09:00:00",
"created_by": 1,
"expires_at": "2024-09-13 00:00:00",
"created_at": "2024-09-05T10:00:00.000000Z",
"updated_at": "2024-09-05T10:00:00.000000Z"
}
]
}
GET https://api4mobile.dachurchman.com/api/events
Parameters (JSON):
{
"email": "string",
"church_id": "integer",
"server_url": "string",
"token": "string",
"page": "integer (optional, default: 1)",
"per_page": "integer (optional, default: 10, max: 50)"
}
Response:
{
"message": "Events fetched successfully",
"events": [
{
"id": 1,
"church_id": 123,
"event_date": "2024-05-15",
"title": "Sunday Service",
"about_event": "<p>Join us for our weekly Sunday service.</p>",
"start_time": "10:00:00",
"end_time": "12:00:00",
"venue": "Main Church Hall",
"dress_code": "Smart Casual",
"speaker": "Pastor John Doe",
"cover_photo": "events/sunday-service-cover.jpg",
"created_at": "2024-05-01T10:00:00.000000Z",
"updated_at": "2024-05-01T10:00:00.000000Z",
"is_scheduled": 0,
"publish_date": "2024-05-01",
"publish_time": "09:00:00",
"status": 1
}
],
"current_page": 1,
"total_pages": 5,
"total_events": 47
}
GET https://api4mobile.dachurchman.com/api/devotions
Parameters (JSON):
{
"email": "string",
"church_id": "integer",
"server_url": "string",
"token": "string",
"page": "integer (optional, default: 1)",
"per_page": "integer (optional, default: 10, max: 50)"
}
Response:
{
"message": "Devotions fetched successfully",
"devotions": [
{
"id": 1,
"church_id": 123,
"title": "Daily Strength",
"main_scripture": "Psalm 23:1",
"keynote_passage": "The Lord is my shepherd; I shall not want.",
"keynote_bible_verse": "Psalm 23:1",
"message": "<p>Today's devotion focuses on God's provision...</p>",
"scripture_reference_1": "John 10:11",
"scripture_reference_2": "Isaiah 40:11",
"scripture_reference_3": "1 Peter 5:7",
"prayer": "Dear Lord, thank you for being our shepherd...",
"further_studies": "Ezekiel 34:11-16, John 10:1-18",
"author_name": "Pastor Jane Doe",
"public_visibility": "Yes",
"publish_date": "2024-05-15",
"publish_time": "06:00:00",
"is_scheduled": 0,
"author_photo": "uploads/mobile-app/devotion/author_jane_doe.jpg",
"cover_photo": "uploads/mobile-app/devotion/daily_strength_cover.jpg",
"created_at": "2024-05-14T10:00:00.000000Z",
"updated_at": "2024-05-14T10:00:00.000000Z"
}
],
"current_page": 1,
"total_pages": 5,
"total_devotions": 47
}
GET https://api4mobile.dachurchman.com/api/podcasts
Parameters (JSON):
{
"email": "string",
"church_id": "integer",
"server_url": "string",
"token": "string",
"page": "integer (optional, default: 1)",
"per_page": "integer (optional, default: 10, max: 50)"
}
Response:
{
"message": "Podcasts fetched successfully",
"podcasts": [
{
"id": 1,
"church_id": 123,
"title": "Weekly Sermon",
"description": "<p>This week's sermon on faith and perseverance.</p>",
"audio_url": "podcasts/weekly-sermon-2024-05-15.mp3",
"duration": "00:45:30",
"speaker": "Pastor John Doe",
"cover_image": "podcasts/weekly-sermon-cover.jpg",
"publish_date": "2024-05-15",
"publish_time": "09:00:00",
"is_scheduled": 0,
"created_at": "2024-05-14T10:00:00.000000Z",
"updated_at": "2024-05-14T10:00:00.000000Z"
}
],
"current_page": 1,
"total_pages": 5,
"total_podcasts": 47
}
GET https://api4mobile.dachurchman.com/api/streams
Parameters (JSON):
{
"email": "string",
"church_id": "integer",
"server_url": "string",
"token": "string",
"page": "integer (optional, default: 1)",
"per_page": "integer (optional, default: 10, max: 50)"
}
Response:
{
"message": "Streams fetched successfully",
"streams": [
{
"id": 1,
"church_id": 123,
"title": "Sunday Service Live Stream",
"description": "<p>Join us for our live Sunday service.</p>",
"stream_url": "https://streaming.example.com/live/sunday-service",
"stream_type": "live",
"duration": "02:00:00",
"thumbnail": "streams/sunday-service-thumbnail.jpg",
"publish_date": "2024-05-15",
"publish_time": "09:30:00",
"is_scheduled": 0,
"created_at": "2024-05-14T10:00:00.000000Z",
"updated_at": "2024-05-14T10:00:00.000000Z"
}
],
"current_page": 1,
"total_pages": 5,
"total_streams": 47
}
GET https://api4mobile.dachurchman.com/api/market-place
Parameters (JSON):
{
"email": "string",
"church_id": "integer",
"server_url": "string",
"token": "string",
"page": "integer (optional, default: 1)",
"per_page": "integer (optional, default: 10, max: 50)"
}
Response:
{
"message": "MarketPlace entries fetched successfully",
"market_place_entries": [
{
"id": 1,
"church_id": 123,
"member_id": 456,
"company_name": "Example Services Co.",
"primary_phone_number": "+1234567890",
"secondary_phone_number": "+0987654321",
"email": "[email protected]",
"location": "123 Main St, City, State, ZIP",
"services": ["Service 1", "Service 2", "Service 3"],
"logo": "uploads/mobile-app/market/example_logo.jpg",
"start_date": "2024-05-15",
"end_date": "2024-12-31",
"public_visibility": 1,
"created_at": "2024-05-14T10:00:00.000000Z",
"updated_at": "2024-05-14T10:00:00.000000Z"
}
],
"current_page": 1,
"total_pages": 5,
"total_entries": 47
}
GET https://api4mobile.dachurchman.com/api/professional-directory
Parameters (JSON):
{
"email": "string",
"church_id": "integer",
"server_url": "string",
"token": "string",
"page": "integer (optional, default: 1)",
"per_page": "integer (optional, default: 10, max: 50)"
}
Response:
{
"message": "Professional Directory entries fetched successfully",
"professional_directory": [
{
"id": "GMS/2022/000014",
"member_id": "GMS/2022/000014",
"church_id": 123,
"title": "Fada",
"first_name": "LAWRENCIA",
"last_name": "OTOO",
"email": "[email protected]",
"primary_phone_number": "248385445",
"residential_address": "P.O BOX OH 378,KASOA",
"occupation": "TEACHER",
"employment_institution": "HOPE OF GLORY MONTESSORI CENTRE",
"educational_level": "Doctoral or Equivalent",
"picture": "path/to/picture.jpg",
"professional_directory": 1,
"system_status": "Active"
}
],
"current_page": 1,
"total_pages": 5,
"total_entries": 47
}
GET https://api4mobile.dachurchman.com/api/membership/personal-info
Parameters (Query String):
email: string
church_id: integer
server_url: string
token: string
Response:
{
"message": "Personal information fetched successfully",
"personal_info": {
"id": integer,
"member_id": string,
"title": string,
"alias": string|null,
"first_name": string,
"other_names": string|null,
"last_name": string,
"place_of_birth": string,
"email": string,
"primary_phone_number": string,
"secondary_phone_number": string|null,
"residential_address": string,
"landmark": string|null,
"hometown": string,
"nationality": string,
"marital_status": string,
"name_of_spouse": string|null,
"date_married": date|null,
"previous_name": string|null,
"gender": string,
"dob": date,
"age_group": string
}
}
GET https://api4mobile.dachurchman.com/api/membership/church-info
Parameters (Query String):
email: string
church_id: integer
server_url: string
token: string
Response:
{
"message": "Church information fetched successfully",
"church_info": {
"bible_study_group": integer,
"year_joined_church": integer|null,
"leader_position": string|null,
"previous_church": string|null,
"leader_position_in_previous": string|null,
"special_gifts": string|null,
"is_baptised": boolean,
"place_baptised": string|null,
"baptized_by": string|null,
"date_baptised": date|null,
"is_confirmed": boolean,
"confirmed_by": string|null,
"place_confirmed": string|null,
"date_confirmed": date|null,
"member_type": integer,
"date_joined": date,
"time_joined": time
}
}
GET https://api4mobile.dachurchman.com/api/membership/family-info
Parameters (Query String):
email: string
church_id: integer
server_url: string
token: string
Response:
{
"message": "Family information fetched successfully",
"family_info": [
{
"id": integer,
"member_id": integer,
"relation": string,
"name": string,
"number": string|null,
"occupation": string|null,
"address": string|null,
"pic": string|null
},
// ... more family relations
]
}
GET https://api4mobile.dachurchman.com/api/membership/profession-education-info
Parameters (Query String):
email: string
church_id: integer
server_url: string
token: string
Response:
{
"message": "Profession and Education information fetched successfully",
"profession_and_education_info": {
"employment_status": string,
"educational_level": string,
"occupation": string,
"start_date": date|null,
"end_date": date|null,
"employment_institution": string|null,
"professional_directory": boolean
}
}
PUT https://api4mobile.dachurchman.com/api/update-personal-info
Parameters (JSON):
{
"email": "string",
"church_id": "integer",
"server_url": "string",
"token": "string",
"title": "string",
"alias": "string|null",
"first_name": "string",
"other_names": "string|null",
"last_name": "string",
"place_of_birth": "string",
"primary_phone_number": "string",
"secondary_phone_number": "string|null",
"residential_address": "string",
"landmark": "string|null",
"hometown": "string",
"nationality": "string",
"marital_status": "string",
"name_of_spouse": "string|null",
"date_married": "date|null",
"previous_name": "string|null",
"gender": "string",
"dob": "date",
"age_group": "string"
}
Response:
{
"message": "Personal information updated successfully",
"member": {
// Updated member object
}
}
PUT https://api4mobile.dachurchman.com/api/update-church-info
Parameters (JSON):
{
"email": "string",
"church_id": "integer",
"server_url": "string",
"token": "string",
"bible_class": "integer",
"year_joined_church": "integer|null",
"leadership_position": "string|null",
"previous_church": "string|null",
"previous_church_leadership_position": "string|null",
"special_gift": "string|null",
"baptism": "boolean",
"place_baptized": "string|null",
"baptized_by": "string|null",
"date_baptized": "date|null",
"confirmed": "boolean",
"confirmed_by": "string|null",
"place_confirmed": "string|null",
"membership_status": "integer"
}
Response:
{
"message": "Church information updated successfully",
"member": {
// Updated member object
}
}
PUT https://api4mobile.dachurchman.com/api/update-family-info
Parameters (JSON):
{
"email": "string",
"church_id": "integer",
"server_url": "string",
"token": "string",
"family_members": [
{
"id": "integer|null",
"relation": "string",
"name": "string",
"number": "string|null",
"occupation": "string|null",
"address": "string|null"
},
// ... more family members
]
}
Response:
{
"message": "Family information updated successfully",
"family_info": [
{
"id": integer,
"member_id": integer,
"relation": string,
"name": string,
"number": string|null,
"occupation": string|null,
"address": string|null,
"pic": string|null,
"created_at": datetime,
"updated_at": datetime
},
// ... more family members
]
}
PUT https://api4mobile.dachurchman.com/api/update-profession-education-info
Parameters (JSON):
{
"email": "string",
"church_id": "integer",
"server_url": "string",
"token": "string",
"employment_status": "string",
"education_level": "string",
"occupation": "string",
"start_date": "date|null",
"end_date": "date|null",
"employment_institution": "string|null",
"professional_directory": "boolean"
}
Response:
{
"message": "Profession and Education information updated successfully",
"member": {
// Updated member object
}
}
GET https://api4mobile.dachurchman.com/api/online-offering-sources
Parameters (Query String):
email: string
church_id: integer
server_url: string
token: string
Response:
{
"message": "Online offering sources fetched successfully",
"offering_sources": [
{
"id": integer,
"type": string,
"source": string,
"mode": string,
"distributable_id": integer,
"account_header": string
},
// ... more offering sources
]
}
GET https://api4mobile.dachurchman.com/api/member-offering-history
Parameters (Query String):
email: string
church_id: integer
server_url: string
token: string
page: integer (optional, default: 1)
per_page: integer (optional, default: 10, max: 50)
Response:
{
"message": "Member offering history fetched successfully",
"offering_history": [
{
"id": integer,
"amount": decimal,
"date": "YYYY-MM-DD",
"source": string,
"payment_method": string
},
// ... more offering entries
],
"current_page": integer,
"total_pages": integer,
"total_offerings": integer
}
GET https://api4mobile.dachurchman.com/api/member-welfare-contribution-history
Parameters (Query String):
email: string
church_id: integer
server_url: string
token: string
page: integer (optional, default: 1)
per_page: integer (optional, default: 10, max: 50)
Response:
{
"message": "Member welfare contribution history fetched successfully",
"welfare_contributions": [
{
"id": integer,
"amount": decimal,
"date": "YYYY-MM-DD"
},
// ... more contribution entries
],
"current_page": integer,
"total_pages": integer,
"total_contributions": integer
}
GET https://api4mobile.dachurchman.com/api/member-welfare-benefit-history
Parameters (Query String):
email: string
church_id: integer
server_url: string
token: string
page: integer (optional, default: 1)
per_page: integer (optional, default: 10, max: 50)
Response:
{
"message": "Member welfare benefit history fetched successfully",
"welfare_benefits": [
{
"id": integer,
"amount": decimal,
"date": "YYYY-MM-DD"
},
// ... more benefit entries
],
"current_page": integer,
"total_pages": integer,
"total_benefits": integer
}
POST https://api4mobile.dachurchman.com/api/like
Parameters (JSON):
{
"email": "string",
"church_id": "integer",
"server_url": "string",
"token": "string",
"content_type": "string (stream|event|devotion|podcast)",
"content_id": "integer"
}
Response:
{
"message": "Content liked successfully",
"like": {
// Like object details
},
"counts": {
"like_count": integer,
"share_count": integer,
"comment_count": integer,
"prayer_request_count": integer
}
}
POST https://api4mobile.dachurchman.com/api/share
Parameters (JSON):
{
"email": "string",
"church_id": "integer",
"server_url": "string",
"token": "string",
"content_type": "string (stream|event|devotion|podcast)",
"content_id": "integer"
}
Response:
{
"message": "Content shared successfully",
"share": {
// Share object details
},
"counts": {
"like_count": integer,
"share_count": integer,
"comment_count": integer,
"prayer_request_count": integer
}
}
POST https://api4mobile.dachurchman.com/api/comment
Parameters (JSON):
{
"email": "string",
"church_id": "integer",
"server_url": "string",
"token": "string",
"content_type": "string (stream|event|devotion|podcast)",
"content_id": "integer",
"comment": "string"
}
Response:
{
"message": "Comment added successfully",
"comment": {
// Comment object details
},
"counts": {
"like_count": integer,
"share_count": integer,
"comment_count": integer,
"prayer_request_count": integer
}
}
POST https://api4mobile.dachurchman.com/api/prayer-request
Parameters (JSON):
{
"email": "string",
"church_id": "integer",
"server_url": "string",
"token": "string",
"content_type": "string (stream|event|devotion|podcast)",
"content_id": "integer",
"prayer_request": "string"
}
Response:
{
"message": "Prayer request added successfully",
"prayer_request": {
// Prayer request object details
},
"counts": {
"like_count": integer,
"share_count": integer,
"comment_count": integer,
"prayer_request_count": integer
}
}
GET https://api4mobile.dachurchman.com/api/hymns/languages
Parameters (Query String):
email: string (required)
church_id: integer (required)
server_url: string (required)
token: string (required)
Response:
{
"message": "Hymn languages fetched successfully",
"languages": ["English", "Twi", "French", ...]
}
GET https://api4mobile.dachurchman.com/api/hymns
Parameters (Query String):
email: string (required)
church_id: integer (required)
server_url: string (required)
token: string (required)
language: string (required)
page: integer (optional, default: 1)
per_page: integer (optional, default: 50, max: 100)
filter: string (optional)
filter_type: string (optional, values: number, first_line, tune, meter)
Response:
{
"message": "Hymn list fetched successfully",
"hymns": [
{
"id": integer,
"number": integer,
"first_line": string,
"tune": string,
"meter": string,
"category": string,
"sub_category": string,
"optional_sub_category": string,
"key": string,
"author": string,
"amen": string
}
],
"current_page": integer,
"total_pages": integer,
"total_hymns": integer
}
GET https://api4mobile.dachurchman.com/api/hymns/{id}
Parameters (Query String):
email: string (required)
church_id: integer (required)
server_url: string (required)
token: string (required)
Response:
{
"message": "Hymn detail fetched successfully",
"hymn": {
"id": integer,
"number": integer,
"first_line": string,
"tune": string,
"meter": string,
"category": string,
"sub_category": string,
"optional_sub_category": string,
"key": string,
"author": string,
"stanzas": [
{
"number": integer,
"type": string,
"content": string
}
],
"amen": string
}
}
All endpoints follow a consistent error response format:
{
"error": "Error message describing the issue"
}
Common HTTP status codes:
To protect our services from abuse, rate limiting is implemented on all endpoints. The current limits are:
When a rate limit is exceeded, the API will respond with a 429 (Too Many Requests) status code.
To ensure the security of your application and user data, please adhere to the following guidelines:
The following features are planned for future releases:
Detailed documentation for these features will be provided upon release.
For API support, bug reports, or feature requests, please contact our developer support team:
Please include detailed information about your issue or request, including any relevant code snippets or error messages.