Prevail Group of Companies

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.

Register an SBU

Creates an SBU and returns its API key — the only time the key is shown.

POST/api/v1/admin/sbus
Auth: X-Admin-Key

Body — required

FieldTypeDescription
codestring2–12 letters/digits, unique, stored uppercase. Becomes the prefix of every orderReference.
namestringDisplay 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

FieldTypeDescription
idintegerInternal identifier.
codestringThe SBU code, uppercased.
namestringDisplay name.
apiKeystringThe SBU's X-SBU-Key. Shown only here — store it now.

List SBUs

All registered SBUs. API keys are never included.

GET/api/v1/admin/sbus
Auth: X-Admin-Key

No 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/api/v1/admin/sbus/{code}/rotate-key
Auth: X-Admin-Key

Path parameters

FieldTypeDescription
codestringThe 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/api/v1/admin/sbus/{code}/deactivate
Auth: X-Admin-Key

Path parameters

FieldTypeDescription
codestringThe 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/api/v1/admin/sbus/{code}/activate
Auth: X-Admin-Key

Path parameters

FieldTypeDescription
codestringThe 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'