U
Ustawi

API Documentation

Integrate with Ustawi's Loans, Ledger, Collections/Sync, and Reports APIs. Some technical specifics are still being finalized and are marked as such below.

Quick start

Authentication
Authenticate each request with an API key sent as a bearer token. OAuth 2.0 client-credentials support is planned.
Authorization: Bearer usta_live_9f3c2a7b41d0
Base URL & environments
All requests go to the versioned base URL over HTTPS. A sandbox environment is available on request.
https://api.ustawi.co.tz/v1
Rate limits & versioning
Requests are rate-limited per API key; the current version is pinned in the URL path (v1). Every response returns your remaining budget.
X-RateLimit-Limit: 600   # 600 requests/minute per key

API surface overview

Loans API

Full reference — coming soon

Create/read applications, fetch approval-ladder status, disbursement status.

Request
GET /api/v1/loans/{id}
Response
{ "status": "ok", "data": { "id": 1023, "status": "PENDING_COMMITTEE", … } }

Ledger API

Full reference — coming soon

Read GL postings, trial balance exports.

Request
GET /api/v1/ledger/trial-balance
Response
{ "status": "ok", "data": [ … ] }

Collections/Sync API

Full reference — coming soon

The mobile app's own sync/bootstrap and receipt-lease endpoints, documented here for partners building complementary field tools.

Request
POST /api/v1/sync/bootstrap
Response
{ "status": "ok", "data": { … } }

Webhooks

Full reference — coming soon

Event notifications delivered to your endpoint: loan.approved, loan.disbursed, payment.received, loan.overdue, loan.written_off, borrower.created.

Request
POST https://your-endpoint.example (event payload)
Response
{ "event": "loan.disbursed", "data": { … } }

Reports API

Full reference — coming soon

Pull PAR/portfolio data programmatically for a partner dashboard.

Request
GET /api/v1/reports/par-aging
Response
{ "status": "ok", "data": { … } }

Sandbox access

API credentials are provisioned through support. The developer signup flow is being finalized.

Get API credentials →

Frequently asked questions

How do I get API access?

Request API access via your account manager or email developers@ustawi.co.tz, and we will issue a key for your integration.

What response format does the API use?

Every response uses a consistent envelope: { "status": ..., "data": ... }. The wrapper is stable; individual payload fields are documented per endpoint.

Are webhooks available?

Yes. The partner-visible events are loan.approved, loan.disbursed, payment.received, loan.overdue, loan.written_off and borrower.created, delivered as a POST to the endpoint you register.

Is there a sandbox environment?

Yes — a sandbox environment is available on request, so you can test integrations before going live against production.