Getting Started

1.Overview

The AfyaConnect Developer Portal helps you integrate your health information systems with Kenya's national health exchange. This guide explains how to register, set up your integration, obtain sandbox credentials, test against AfyaConnect APIs, and go live on the production environment.

2.Sign Up

To use the Developer Portal, you must first create an account.

  1. Go to the Sign Up page.
  2. Enter your personal or organisation details.
  3. Read and accept the Terms and Conditions.
  4. Submit the registration form.

Once registered, you can Sign in to access APIs, Simulations, and Tutorials.

3.Sign In

If you already have an account:

  1. Open the Sign In page.
  2. Enter your registered email address and password.
  3. Sign in to access your dashboard.

After signing in, you can browse available APIs, view documentation, and test integrations.

4.System Integration

AfyaConnect exposes FHIR-based APIs for health data exchange across Kenya's healthcare ecosystem.

For each API, you can view:

  1. Supported FHIR resources (Patient, Encounter, Claim, Coverage)
  2. Available endpoints and operations
  3. Request and response formats aligned to the Kenya FHIR Implementation Guide
  4. Authentication requirements (OAuth 2.0 client credentials)

Use this section to understand which APIs are relevant to your HMIS integration before starting development.

5.Technical Onboarding

During Technical Onboarding, you set up your sandbox environment on AfyaConnect.

You will:

  1. Create an app in the onboarding portal to obtain your Consumer Key and Consumer Secret
  2. Configure your sandbox tenants and select the API products your system needs
  3. Review the AfyaConnect Implementation Guide for FHIR resource conformance requirements

This step prepares your development environment for sandbox API testing.

6.Sandbox API Testing

The AfyaConnect sandbox lets you test your integration against simulated API endpoints.

You can use the sandbox to:

  1. Submit FHIR bundles (Patient, Encounter, Claim) and validate responses
  2. Test OAuth 2.0 authentication with your sandbox credentials
  3. Verify error handling for common scenarios (validation failures, rate limits, timeouts)
  4. Review Operation Outcome responses to debug conformance issues

This ensures your system works correctly before connecting to production.

7.Sandbox Integration for HMIS

Connect your Hospital Management Information System (HMIS) to the AfyaConnect sandbox environment.

During this phase:

  1. Configure your HMIS to send FHIR-compliant data to the sandbox endpoints
  2. Map your local clinical codes to the AfyaConnect terminology (ICD-10, LOINC, KenyaEMR codes)
  3. Verify end-to-end data flows - from patient registration through claims submission
  4. Validate that Shared Health Records (SHR) queries return expected results

This step confirms your HMIS integration is ready for production data exchange.

8.Workflow Validations

Validate your clinical and administrative workflows after sandbox integration with AfyaConnect.

Key validations include:

  1. Patient registration and identity matching via the Client Registry
  2. Encounter documentation and SHR submission
  3. SHA pre-authorisation requests and claim submissions
  4. Claims adjudication response handling and reconciliation
  5. Facility-level reporting and data quality checks

All workflows must pass validation before your system is approved for go-live.

9.Go-Live Approval

Submit your integration for review by the AfyaConnect team to receive go-live approval.

The review process includes:

  1. Verification that all sandbox test cases pass successfully
  2. Confirmation of FHIR conformance against the Kenya Implementation Guide
  3. Security and data protection compliance review
  4. End-to-end workflow validation sign-off

Once approved, you will receive production credentials and your system will be cleared for live data exchange.

10.Go-Live

Your system is now live on the AfyaConnect production environment.

Production credentials have been issued for your app. Your HMIS is now exchanging real health data through AfyaConnect's national health exchange.

Key reminders:

  1. Monitor your API usage and error rates through the developer dashboard
  2. Follow AfyaConnect's data protection policies for all patient data
  3. Contact the AfyaConnect support team for production issues
  4. Keep your integration updated when new API versions are released

11.Terms and Conditions

The AfyaConnect Terms and Conditions govern your use of the developer portal and APIs.

They cover:

  1. Acceptable use of the AfyaConnect platform and health data exchange services
  2. Security and data protection requirements under Kenya's Data Protection Act
  3. Compliance with the Kenya Health Information Exchange (HIE) policies
  4. Legal obligations for handling protected health information (PHI)

You must agree to these terms during registration and comply with them throughout your integration.

Last modified on 10 July 2026

DHA AfyaConnect logo

Empowering developers with Government APIs to build innovative healthcare solutions.

product

DocumentationMy Apps

Location

Digital Health Agency Community,
Area 10th Floor | SHA Building Wing B
Nairobi, Kenya

[email protected]

© 2026 Digital Health Agency. All rights reserved.

Back to top ↑