Skip to main content

Kamoa360 - Results API

Overview

The Kamoa360 API provides comprehensive financial analysis and credit risk assessment by analyzing transaction patterns, income stability, and borrowing behavior. This endpoint delivers in-depth insights for advanced lending decisions through sophisticated scoring algorithms and detailed financial profiling.

Key Features

  • 🔍 Comprehensive Analysis – Deep financial behavior insights and risk assessment
  • 📊 Multi-dimensional Scoring – Credit scores based on various financial factors
  • 💰 Affordability Assessment – Data-driven loan limit recommendations
  • 👤 Customer Profiling – Detailed persona and lifestyle analysis
  • 📈 Cash Flow Analysis – Income patterns and financial stability metrics
Product Differentiation

Use the productCode field to distinguish between responses:


Endpoint

GET https://api.kamoa.io/score/results/{requestId}

Example Request

curl -X GET "https://api.kamoa.io/score/results/c2a315ac-ed11-4462-bb78-24c5fa9b480d" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json"

Request Details

ComponentValue
Base URLhttps://api.kamoa.io
Endpoint/score/results/{requestId}
MethodGET
Path ParameterrequestId - UUID from initial submit

Required Headers

HeaderValueDescription
AuthorizationBearer {token}JWT token for authentication
Content-Typeapplication/jsonRequest content type

Response Structure

The API returns a structured JSON response containing detailed financial analysis organized into six main sections:

  • Summary: High-level assessment and recommendations
  • Persona: Customer profile and behavioral indicators
  • Data Completeness: Statement coverage and data quality metrics
  • Cash Flow: Income patterns and financial health indicators
  • Borrowing Character: Loan and overdraft usage analysis
  • Lifestyle: Spending patterns and behavioral insights

API Response Schema

Root Response

{
"status": "success",
"code": 200,
"data": {
"summary": {...},
"persona": {...},
"data_completeness": {...},
"cashflow": {...},
"borrowing_character": {...},
"recommendations": {...},
"lifestyle": {...}
}
}

Summary Section

Provides executive-level insights and credit recommendations.

Overall Customer Assessment

FieldTypeDescription
recommended_credit_limit.short_term_limitNumberMaximum affordable short-term loan amount
recommended_credit_limit.business_limitNumber|nullMaximum affordable business loan amount
confidence_levelStringData accuracy confidence (e.g., "100%")

Risk Assessment

FieldTypeDescription
risk_summaryStringRisk band with default probability and decision
risk_mitigation_blockStringAdditional risk mitigation guidance

Example Risk Bands:

  • A (2% default risk) → Approve
  • B (5% default risk) → Approve with conditions
  • C (15% default risk) → Decline

Key Insights

FieldTypeDescription
observed_monthly_incomeNumberMedian monthly cashflow from inflows
average_monthly_borrowingNumberAverage loan amount per active borrowing month
average_monthly_overdraft_usageNumberAverage overdraft usage per active month
main_outflow_categoriesArrayTop spending categories with amounts
customer_behaviour_identifiedArrayDetected behavioral patterns

Persona Section

Contains customer identification and behavioral profiling.

Personal Information

FieldTypeDescription
nameStringFull name from statement
phone_numberStringPhone number from statement
has_salaryBooleanReceives regular salary payments
has_till_accountBooleanOperates a business till account
has_pochi_walletBooleanUses business wallet services
has_bank_accountBooleanHas linked bank account
main_bankString|nullPrimary bank for income
earning_profileStringIncome type: "formal", "informal", or "mixed"
is_a_driverBooleanLikely works as a driver (based on fuel spending)

Data Completeness Section

Evaluates the quality and coverage of the financial statement.

FieldTypeDescription
statement_periodStringDate range covered (YYYY-MM-DD format)
completeness_flagStringCoverage quality indicator
nb_months_in_statementNumberTotal months covered
transaction_countNumberTotal number of transactions
transaction_daysNumberDays with at least one transaction

Completeness Flags:

  • Green (100% of months covered) - Complete data
  • Yellow (80-99% of months covered) - Mostly complete
  • Red (<80% of months covered) - Incomplete data

Cash Flow Section

Analyzes income patterns, balance stability, and financial health.

Core Metrics

FieldTypeDescription
cash_inflow_ratioStringPercentage of inflows from cash deposits
cash_outflow_ratioStringPercentage of outflows to cash withdrawals
observed_income_blockObjectMedian monthly income and active months
estimated_monthly_incomeObjectCalculated monthly income estimate
average_daily_incomeNumberAverage daily income from inflows
debt_to_income_ratioNumber|nullRatio of loan disbursements to income

Balance and Stability

FieldTypeDescription
average_daily_balanceNumberAverage end-of-day balance
days_with_low_balanceNumberDays with critically low balance
snapshot_dateStringDate of most recent transaction

Time Series Data

FieldTypeDescription
monthly_income_evolutionArrayMonthly income over time
evolution_of_cashflowArrayMonthly inflows vs outflows

Monthly Income Evolution Format:

[
{
"month": "2024-01",
"income": 147399
}
]

Cash Flow Evolution Format:

[
{
"month": "2024-01",
"inflow": 147399,
"outflow": 146069
}
]

Borrowing Character Section

Analyzes loan behavior, repayment patterns, and overdraft usage.

Loan Disbursements

FieldTypeDescription
nb_disb_eventsNumberTotal disbursement events
total_disbursedNumberTotal amount disbursed
avg_disb_per_eventNumberAverage disbursement per event
highest_disbursementNumberLargest single disbursement

Loan Repayments

FieldTypeDescription
nb_repay_eventsNumberTotal repayment events
total_repaidNumberTotal amount repaid
avg_repay_per_eventNumberAverage repayment per event
highest_repaymentNumberLargest single repayment

Overdraft Usage

FieldTypeDescription
nb_overdraft_eventsNumberTotal overdraft events
total_overdraftNumberTotal overdraft amount used
avg_overdraft_per_eventNumberAverage overdraft per event
highest_overdraftNumberHighest single overdraft

Recommendations Section

Provides credit scores and loan affordability assessments.

Credit Scores

FieldTypeDescription
short_term_scoreNumberScore for short-term M-Pesa loans (0-1000)
bwc_scoreNumberBusiness wallet/till loan score (-1 if N/A)
generic_scoreNumberComposite creditworthiness score (0-1000)

Affordability Limits

FieldTypeDescription
short_term_affordabilityNumberMaximum short-term loan amount
business_affordabilityNumber|nullMaximum business loan amount

Score Interpretation:

  • 800-1000: Excellent credit profile
  • 600-799: Good credit profile
  • 400-599: Fair credit profile
  • 200-399: Poor credit profile
  • 0-199: High risk profile
  • -1: Insufficient data

Lifestyle Section

Analyzes spending patterns and behavioral indicators.

Spending Categories

FieldTypeDescription
top_spending_categoriesArrayBreakdown of major spending categories

Category Format:

[
{
"category": "saving deposit",
"value": 2046405.0
}
]

Common Categories:

  • saving deposit - Money saved/invested
  • sent to individual - Person-to-person transfers
  • sent to business - Business payments
  • sent to individual via overdraft - P2P transfers using overdraft
  • sent to business via payment solution - Business payments via payment platforms

Utility Payments

FieldTypeDescription
utilities_paymentsArrayRegular utility payment patterns

Utility Format:

[
{
"name": "Electricity Prepaid",
"amount": 229,
"frequency": 36
}
]

Retail Spending

FieldTypeDescription
top_supermarkets_visitedArrayTop 5 retail spending locations

Supermarket Format:

[
{
"label": "Carrefour",
"value": 35086.0
}
]

Behavioral Indicators

FieldTypeDescription
customer_behaviourArrayDetected behavioral patterns

Behavior Format:

[
{
"title": "Business activity",
"status": false
},
{
"title": "Betting",
"status": false
},
{
"title": "Savings",
"status": true
}
]

Visual Display Types

The API includes visual display indicators for UI rendering:

Visual TypeDescriptionUse Case
metric_cardSingle metric displayKPIs, scores, amounts
double_metric_cardTwo related metricsComparisons
textSimple text displayLabels, categories
text_blockLonger text contentDescriptions, advice
tagBoolean/status indicatorYes/no, true/false
piePie chart visualizationCategory breakdowns
barBar chartTime series, comparisons
bar_chart_groupedGrouped bar chartMulti-series data
bar_horizontalHorizontal bar chartRankings, lists
pillStatus pills/badgesMultiple status indicators

Error Handling

Success Response

{
"status": "success",
"code": 200,
"data": {...}
}

Error Response Format

{
"status": "error",
"code": 400,
"message": "Error description",
"details": "Additional error context"
}

Common Error Codes

CodeDescription
400Invalid request format or missing parameters
401Authentication required
403Insufficient permissions
404Statement or resource not found
422Unprocessable statement data
500Internal server error

Usage Examples

Basic Request

curl -X POST "https://api.example.com/featureizer" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"statement_data": "...",
"phone_number": "254792645945"
}'

Processing the Response

// Extract key insights
const response = await fetch('/featureizer', {
method: 'POST',
body: JSON.stringify(statementData)
});

const result = await response.json();

if (result.status === 'success') {
const {
summary,
cashflow,
borrowing_character,
recommendations
} = result.data;

// Get credit recommendation
const creditLimit = summary.overall_customer_assessment
.recommended_credit_limit.short_term_limit;

// Get risk assessment
const riskSummary = summary.recommended_decision.risk_summary;

// Get monthly income
const monthlyIncome = cashflow.observed_income_block.median;

// Get credit score
const creditScore = recommendations.short_term_score;
}

Best Practices

Data Quality

  • Ensure statement covers at least 6 months for reliable analysis
  • Complete transaction data improves accuracy of insights
  • Regular statement updates provide better trend analysis

Credit Assessment

  • Use confidence_level to gauge reliability of recommendations
  • Consider risk_mitigation_block for additional context
  • Cross-reference multiple scores for comprehensive assessment

Behavioral Analysis

  • Combine spending categories with behavioral indicators
  • Monitor income evolution trends for stability assessment
  • Use utility payments as stability indicators

Implementation

  • Cache results appropriately based on statement recency
  • Implement proper error handling for all response codes
  • Use visual display types for consistent UI rendering