Ruralpass API

Introduction

Ruralpass (Rupa) is Riwe's portable identity and data layer for African smallholder farmers. Every farmer on Riwe — whether they joined by web, WhatsApp, or a *347*820# USSD dial on a basic phone — is issued a permanent Rupa ID (for example rp-7lif9u). That ID is the key a partner uses to look the farmer up.

The Partner API lets approved institutions — banks, insurers, and agtech companies — exchange data about a farmer they are already working with:

  • Read a farmer's verified profile — identity, farm data, credit history, insurance and underwriting signals, outstanding loans, and transaction volume.
  • Report their own activity back — loans disbursed/repaid, policies issued, claims, input purchases, harvests — enriching the shared record for the whole ecosystem.

It is a give‑to‑get network: partners draw down data per section, and are expected to contribute activity events in return.

Base URL

https://api.riwe.io/v1/rupa

The 60‑second quickstart

  1. Riwe provisions your partner account and issues an API key (rk_live_…).
  2. Confirm the key works (this call is free):
curl https://api.riwe.io/v1/rupa/me \
  -H "X-API-KEY: rk_live_YOUR_SECRET" \
  -H "Accept: application/json"
  1. Fund your wallet, then look a farmer up by their Rupa ID:
curl -X POST https://api.riwe.io/v1/rupa/lookup \
  -H "X-API-KEY: rk_live_YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{ "rupa_id": "rp-7lif9u" }'

You get back only the sections your account type is entitled to, and your wallet is charged per section. See Billing & credits.

Response envelope

Every response uses the same envelope.

Success

{ "success": true, "data": { "...": "..." }, "message": "optional" }

Error

{ "success": false, "message": "Human-readable reason.", "data": { "errors": { } } }

What's in this book

Section Purpose
Getting started Authentication, modes, IP allow‑listing, first calls
Billing & credits Per‑section pricing, wallet, credits, worked examples
Errors Every status code and what it means
Data sections What each data block contains (Identity, Farm, Credit, Insurance, Financial)
API reference Full request/response for every endpoint

Endpoint map

Method Path Purpose Billed
GET /me Your account, entitlements, compliance, balance No
POST /lookup Read a farmer's profile by Rupa ID Yes
POST /report Contribute an activity event No
GET /consents Your consent roster (farmers you've accessed) No
DELETE /consents/{rupaId} Release a farmer from your roster No
GET POST /webhooks List / register webhook endpoints No
GET PUT DELETE /webhooks/{id} Manage a webhook endpoint No
POST /webhooks/{id}/rotate-secret Rotate a webhook signing secret No
GET /webhooks/{id}/deliveries Recent delivery attempts No