Peleza β€” Trust built on data
πŸ‡°πŸ‡ͺ Credit Risk
On this page

Credit Risk β€” Results

Fetch normalized credit risk analysis for a completed assessment. Not billed. Returns scores, classifications, and analysis_data (BANK payloads are normalized to the same shape as MPESA).

Request

GET/api/v1/credit-risk/results/{unique_id}
{{baseUrl}}/api/v1/credit-risk/results/{unique_id}
HeaderTypeDescription
AuthorizationstringBearer YOUR_ACCESS_TOKEN from the OAuth client-credentials flow
Content-Typestringapplication/json

Expected response

200 OKSample dataExpected response
{
  "success": true,
  "response_code": 200,
  "message": "Credit risk results fetched successfully",
  "data": {
    "unique_id": "cra-doc-abc123",
    "document_type": "BANK",
    "state_name": "COMPLETED",
    "account_number": "0123456789",
    "bank_name": "NCBA",
    "phone": null,
    "scores": {
      "score": 642,
      "risk_level": "Moderate",
      "affordability": 18500,
      "highest_saf_loan": 12000,
      "highest_other_loan": 8000,
      "score_reason_summary": "Stable inflows with moderate expense pressure"
    },
    "classifications": [
      {
        "name": "Salary",
        "received": { "total": 85000, "count": 1, "highest": 85000, "lowest": 85000 },
        "sent": { "total": 0, "count": 0 }
      },
      {
        "name": "Transfers",
        "received": { "total": 12000, "count": 3, "highest": 5000, "lowest": 2000 },
        "sent": { "total": 22000, "count": 5, "highest": 8000, "lowest": 500 }
      }
    ],
    "analysis_data": {
      "DocType": "BANK",
      "last_data": {
        "header": {
          "opening_balance": 21450.5,
          "closing_balance": 31890.25,
          "total_paid_in": 97000,
          "total_paid_out": 86560.25
        },
        "information": {
          "customer_names": "JANE SAMPLE",
          "bank_name": "NCBA",
          "bank_account": "0123456789",
          "statement_period": "2026-01-01 - 2026-03-31"
        },
        "body": {
          "locations": [],
          "monthly_inflow": {},
          "monthly_outflow": {}
        },
        "end_of_day_balances": []
      }
    },
    "processed_at": "2026-11-10T12:45:00Z"
  },
  "request_id": "550e8400-e29b-41d4-a716-446655440000"
}

Response Fields

FieldTypeDescription
successbooleanWhether the request succeeded
response_codenumberApplication response code (typically mirrors HTTP)
messagestringHuman-readable status message
dataobjectPayload for the verified resource
request_idstringUUID for support and audit trails
data.unique_idstringDocument unique id from assess
data.document_typestringMPESA or BANK
data.state_namestringUsually COMPLETED
data.account_numberstringBANK account when provided
data.bank_namestringBANK code / name when provided
data.phonestringMPESA remote identifier when provided
data.scoresobjectDisplay scores (score, risk_level, affordability, …)
data.classificationsarrayMerged classification buckets
data.analysis_dataobjectNormalized analysis payload
data.processed_atstringCompletion timestamp when available

Error codes

Standard Peleza HTTP / response_code values (same across all API calls). Validation message text is endpoint-specific. Full reference: Error Codes.

CodeWhenBilled?
200Results returnedNo
400Invalid unique idNo
401Missing or invalid Bearer tokenNo
404Assessment not found for this tenantNo
409Assessment is not complete yet β€” keep polling statusNo

Set {{baseUrl}} to https://api.peleza.com (production) or https://sandbox.peleza.com (sandbox). Authenticated calls need a Bearer token from POST /api/v1/oauth/token.