Consents & account
Free, read‑only endpoints for your account status and your consent roster.
GET /me — your account
Returns your partner profile, entitlements, compliance, and wallet balance. Use it to verify a key and to discover which sections/events your account can use.
curl https://api.riwe.io/v1/rupa/me \
-H "X-API-KEY: rk_live_YOUR_SECRET" -H "Accept: application/json"
{
"success": true,
"data": {
"company_name": "Fin Org2",
"account_type": "bank",
"status": "active",
"mode": "live",
"allowed_sections": ["identity","bvn_nin_data","credit_history","outstanding_loans","transaction_volume"],
"mandatory_sections": ["identity","bvn_nin_data","credit_history","outstanding_loans","transaction_volume"],
"contribution_events": ["loan_disbursed","loan_repayment","loan_defaulted"],
"wallet_balance": 2000,
"compliance": {
"lookups": 0,
"contributions_expected": 0,
"contributions_received": 0,
"compliance_rate": 0
}
}
}
| Field | Description |
|---|---|
account_type |
bank, insurer, or agtech |
status |
active / pending — must be active to call billed endpoints |
mode |
live / sandbox |
allowed_sections |
Everything you may read (mandatory + any admin‑granted optional) |
mandatory_sections |
The baseline set for your account type |
contribution_events |
Events you may (and should) report |
wallet_balance |
NGN available for lookups |
compliance.compliance_rate |
Ratio of contributions received vs expected — keep this healthy |
GET /consents — your roster
The farmers you hold consent for (i.e. have looked up). Most‑recently‑accessed first, up to 200.
curl https://api.riwe.io/v1/rupa/consents \
-H "X-API-KEY: rk_live_YOUR_SECRET" -H "Accept: application/json"
{
"success": true,
"data": {
"consents": [
{ "rupa_id": "rp-wecdjb", "source": "loan", "granted_at": "2026-07-03T12:12:27+00:00", "last_accessed_at": "2026-07-03T12:17:19+00:00", "access_count": 2 },
{ "rupa_id": "rp-7lif9u", "source": "loan", "granted_at": "2026-07-03T12:02:54+00:00", "last_accessed_at": "2026-07-03T12:02:54+00:00", "access_count": 1 }
],
"count": 2
}
}
| Field | Description |
|---|---|
rupa_id |
The farmer |
source |
The source tag you sent on the lookup that created the consent |
granted_at |
First lookup (consent established) |
last_accessed_at |
Most recent lookup |
access_count |
How many times you've looked this farmer up |
DELETE /consents/{rupaId} — release a farmer
Remove a farmer from your roster (e.g. relationship ended). Idempotent.
curl -X DELETE https://api.riwe.io/v1/rupa/consents/rp-7lif9u \
-H "X-API-KEY: rk_live_YOUR_SECRET" -H "Accept: application/json"
{ "success": true, "data": { "revoked": true, "rupa_id": "rp-7lif9u" } }
Returns 404 No consent record found for that Rupa ID. if the farmer isn't on your
roster.
The consent model
Consent is established by possession of the farmer's Rupa ID — the farmer shares it with you to be served. Riwe records each partner↔farmer relationship so it is auditable and the farmer's data access is transparent and revocable.