DocumentationREST API · OpenAPI 3.1
API Reference
Base URL: https://api.score360.africa/v1
Authentication: Authorization: Bearer {sk_live_...} header on all endpoints.
Endpoints
API entry points
POST
/v1/score— Calculate an SME scoreReturns the score (0–900), grade (A–E), confidence, trend and explanatory factors for a given SME entity.
| Parameter | Type | Required | Description |
|---|---|---|---|
entity_id | string | yes | Unique SME identifier |
flow_window | integer | no | Analysis window in days (default: 90) |
sector | string | no | Business sector (commerce, agri, health…) |
GET
/v1/score/:entity_id— Get the current scoreReturns the cached score without recalculation. Faster — suited for dashboard displays.
| Parameter | Type | Required | Description |
|---|---|---|---|
entity_id | string | yes | Unique SME identifier (path param) |
GET
/v1/score/:entity_id/history— Score historyReturns the score history over a given period, with the associated trend and alerts.
| Parameter | Type | Required | Description |
|---|---|---|---|
entity_id | string | yes | Unique SME identifier |
from | ISO 8601 | no | Start date |
to | ISO 8601 | no | End date (default: today) |
POST
/v1/webhooks— Create a webhookRegisters an HTTPS endpoint to receive SCORE360 events (score.updated, alert.npl_risk…).
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | yes | HTTPS receiving URL |
events | string[] | yes | List of events to listen to |
secret | string | no | HMAC-SHA256 signing secret |
GET
/v1/entities— List entitiesReturns the paginated list of SMEs registered on your account, with their current score and grade.
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default: 1) |
limit | integer | no | Results per page (default: 50, max: 200) |
grade | string | no | Filter by grade (A, B, C, D, E) |
Error codes
Error handling
All errors return JSON with an `error` field (machine code) and a `message` field (human-readable).
400bad_requestInvalid request body or missing parameter.401unauthorizedMissing or invalid API key.403forbiddenAccess denied — check RBAC permissions.404entity_not_foundSME entity not found.429rate_limitedCall quota exceeded. Retry after the delay in Retry-After.500internal_errorInternal server error. Contact dev@score360.africa.