API Reference
Admin — SBUs
Head-office administration. Every route needs X-Admin-Key. An SBU's API key is returned only on create and rotate — store it safely.
- POSTRegister an SBUCreates an SBU and returns its API key — the only time the key is shown.
- GETList SBUsAll registered SBUs. API keys are never included.
- POSTRotate SBU keyIssues a new API key; the old one stops working immediately.
- POSTDeactivate SBUDisables the SBU's key without deleting history. Reversible.
- POSTActivate SBURe-enables a deactivated SBU.
Register an SBU
Creates an SBU and returns its API key — the only time the key is shown.
POST
Auth: /api/v1/admin/sbusX-Admin-KeyBody — required
| Field | Type | Description |
|---|---|---|
| code | string | 2–12 letters/digits, unique, stored uppercase. Becomes the prefix of every orderReference. |
| name | string | Display name of the SBU. |
Request
curl -X POST https://13-247-53-102.sslip.io/api/v1/admin/sbus \
-H 'X-Admin-Key: your_admin_key' \
-H 'Content-Type: application/json' \
-d '{ "code": "PMICRO", "name": "Prevail Microfinance" }'Response · 200
{
"id": 2,
"code": "PMICRO",
"name": "Prevail Microfinance",
"apiKey": "sbu_76b19c1776340a674ea3d14e47be0527d666ac6ce3887414"
}Response
| Field | Type | Description |
|---|---|---|
| id | integer | Internal identifier. |
| code | string | The SBU code, uppercased. |
| name | string | Display name. |
| apiKey | string | The SBU's X-SBU-Key. Shown only here — store it now. |
List SBUs
All registered SBUs. API keys are never included.
GET
Auth: /api/v1/admin/sbusX-Admin-KeyNo parameters.
Request
curl https://13-247-53-102.sslip.io/api/v1/admin/sbus -H 'X-Admin-Key: your_admin_key'Response · 200
[
{ "id": 1, "code": "PVGRP", "name": "Prevail Group Head Office", "active": true, "createdAt": "2026-07-18T01:28:25Z" },
{ "id": 2, "code": "PMICRO", "name": "Prevail Microfinance", "active": true, "createdAt": "2026-07-18T01:40:04Z" }
]Rotate SBU key
Issues a new API key; the old one stops working immediately.
POST
Auth: /api/v1/admin/sbus/{code}/rotate-keyX-Admin-KeyPath parameters
| Field | Type | Description |
|---|---|---|
| code | string | The SBU code. |
Request
curl -X POST https://13-247-53-102.sslip.io/api/v1/admin/sbus/PMICRO/rotate-key \
-H 'X-Admin-Key: your_admin_key'Deactivate SBU
Disables the SBU's key without deleting history. Reversible.
POST
Auth: /api/v1/admin/sbus/{code}/deactivateX-Admin-KeyPath parameters
| Field | Type | Description |
|---|---|---|
| code | string | The SBU code. |
Request
curl -X POST https://13-247-53-102.sslip.io/api/v1/admin/sbus/PMICRO/deactivate \
-H 'X-Admin-Key: your_admin_key'Activate SBU
Re-enables a deactivated SBU.
POST
Auth: /api/v1/admin/sbus/{code}/activateX-Admin-KeyPath parameters
| Field | Type | Description |
|---|---|---|
| code | string | The SBU code. |
Request
curl -X POST https://13-247-53-102.sslip.io/api/v1/admin/sbus/PMICRO/activate \
-H 'X-Admin-Key: your_admin_key'