Ruralpass API

Report activity

Contribute an activity event about a farmer back to the shared record. This is the give side of Ruralpass: your reports enrich the profile every other partner sees, and theirs enrich yours. Reporting is free and is expected of every partner (your compliance_rate in /me reflects it).

POST /v1/rupa/report

Which events you report

Your account type fixes the events you may report (also returned as contribution_events by GET /me):

Account type Events
bank loan_disbursed, loan_repayment, loan_defaulted
insurer policy_issued, claim_filed, claim_settled
agtech input_purchase, harvest_record

Request body

Field Type Required Description
rupa_id string (≤64) yes The farmer the event is about
event string yes One of your allowed events (see table)
amount number ≥ 0 no Monetary value of the event (loan amount, premium, claim, purchase value…)
currency string no Defaults to NGN
partner_reference string (≤255) no Your own reference/ID for idempotency & reconciliation
occurred_at date no When it happened (defaults to now)
payload object no Any extra structured detail (loan term, crop, policy number, etc.)

Example — a bank reports a disbursement

curl -X POST https://api.riwe.io/v1/rupa/report \
  -H "X-API-KEY: rk_live_YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
        "rupa_id": "rp-7lif9u",
        "event": "loan_disbursed",
        "amount": 150000,
        "currency": "NGN",
        "partner_reference": "LN-2026-00417",
        "occurred_at": "2026-07-01",
        "payload": { "term_months": 6, "product": "input_finance", "interest_rate": 0.04 }
      }'

Example — a bank reports a repayment

curl -X POST https://api.riwe.io/v1/rupa/report \
  -H "X-API-KEY: rk_live_YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
        "rupa_id": "rp-7lif9u",
        "event": "loan_repayment",
        "amount": 25000,
        "partner_reference": "LN-2026-00417-R3"
      }'

Response 200

{
  "success": true,
  "message": "Contribution recorded.",
  "data": {
    "recorded": true,
    "created": true,
    "contribution_id": 5012,
    "event": "loan_disbursed",
    "rupa_id": "rp-7lif9u"
  }
}
Field Description
created true if a new record was created, false if an existing one (matched by partner_reference) was updated
contribution_id Riwe's id for the stored contribution
message Contribution recorded. (new) or Contribution updated.

Note —

Reporting is idempotent on partner_reference: sending the same reference again updates the existing contribution instead of duplicating it. Always send a stable reference from your system.

Errors

Status Meaning
422 Missing rupa_id/event, or event not in your allowed set
404 No farmer found for that Rupa ID.

Where reported data shows up

You report Appears to other partners in
loan_disbursed outstanding_loans.partner_loans
loan_repayment credit_history.partner_reported_repayments
policy_issued underwriting_value.total_active_coverage
harvest / input events the farmer's Farm Data & profile tier