NovaCash API

Home
Base URL:https://api.novacash.bi/v1

Users API

The Users API provides comprehensive management of user accounts within the NovaCash system. This API allows you to create, retrieve, update, and delete user accounts, manage user roles and permissions, handle user authentication, and perform various user-related operations.

User Object

The User object represents an individual user account in the NovaCash system. Each user has a unique identifier and contains personal information, authentication details, account status, and role-based permissions.

Key Attributes

AttributeTypeDescription
idstringUnique identifier for the user
phonestringPhone number in E.164 format, used as primary identifier
first_namestringUser's first name
last_namestringUser's last name
emailstringUser's email address (optional)
rolestringUser role: user, agent, super_agent, partner_inember, partner, admin
statusstringAccount status: active, pending, blocked, suspended
balancenumberCurrent account balance in BIF
created_atstringTimestamp when the user was created
updated_atstringTimestamp when the user was last updated
last_loginstringTimestamp of the user's last login
verified_atstringTimestamp when the user was verified

GET /users

Description

Retrieve a list of users

Parameters

NameTypeRequiredDescription
pagenumberOptionalPage number for pagination
limitnumberOptionalNumber of items per page
statusstringOptionalFilter by user status (active, pending, blocked, suspended)
rolestringOptionalFilter by user role (user, agent, super_agent, partner_inember, partner, admin)

Possible Errors

StatusError CodeDescription
401UnauthorizedAuthentication credentials were missing or incorrect
403ForbiddenThe request is understood, but it has been refused due to permissions

API Playground

Simulation
Simulation Mode

You are using simulated data. Switch to real API mode to call actual endpoints.

Query Parameters

Page number for pagination

Number of items per page

Filter by user status (active, pending, blocked, suspended)

Filter by user role (user, agent, super_agent, partner_inember, partner, admin)

POST /users

Description

Create a new user

Possible Errors

StatusError CodeDescription
400Bad RequestInvalid input data
409ConflictPhone number already in use

API Playground

Simulation
Simulation Mode

You are using simulated data. Switch to real API mode to call actual endpoints.

GET /users/{id}

Description

Retrieve a specific user by ID

Parameters

NameTypeRequiredDescription
idstringRequiredUser ID

Possible Errors

StatusError CodeDescription
401UnauthorizedAuthentication credentials were missing or incorrect
403ForbiddenInsufficient permissions to access this user
404Not FoundUser not found

API Playground

Simulation
Simulation Mode

You are using simulated data. Switch to real API mode to call actual endpoints.

Path Parameters

User ID

PUT /users/{id}

Description

Update a user

Parameters

NameTypeRequiredDescription
idstringRequiredUser ID

Possible Errors

StatusError CodeDescription
400Bad RequestInvalid input data
401UnauthorizedAuthentication credentials were missing or incorrect
403ForbiddenInsufficient permissions to update this user
404Not FoundUser not found

API Playground

Simulation
Simulation Mode

You are using simulated data. Switch to real API mode to call actual endpoints.

Path Parameters

User ID

DELETE /users/{id}

Description

Delete a user

Parameters

NameTypeRequiredDescription
idstringRequiredUser ID

Possible Errors

StatusError CodeDescription
401UnauthorizedAuthentication credentials were missing or incorrect
403ForbiddenInsufficient permissions to delete this user
404Not FoundUser not found

API Playground

Simulation
Simulation Mode

You are using simulated data. Switch to real API mode to call actual endpoints.

Path Parameters

User ID

POST /users/{id}/activate

Description

Activate a user account

Parameters

NameTypeRequiredDescription
idstringRequiredUser ID

Possible Errors

StatusError CodeDescription
401UnauthorizedAuthentication credentials were missing or incorrect
403ForbiddenInsufficient permissions to activate this user
404Not FoundUser not found
409ConflictUser is already active

API Playground

Simulation
Simulation Mode

You are using simulated data. Switch to real API mode to call actual endpoints.

Path Parameters

User ID

POST /users/{id}/block

Description

Block a user account

Parameters

NameTypeRequiredDescription
idstringRequiredUser ID

Possible Errors

StatusError CodeDescription
401UnauthorizedAuthentication credentials were missing or incorrect
403ForbiddenInsufficient permissions to block this user
404Not FoundUser not found

API Playground

Simulation
Simulation Mode

You are using simulated data. Switch to real API mode to call actual endpoints.

Path Parameters

User ID

POST /users/{id}/suspend

Description

Suspend a user account temporarily

Parameters

NameTypeRequiredDescription
idstringRequiredUser ID

Possible Errors

StatusError CodeDescription
401UnauthorizedAuthentication credentials were missing or incorrect
403ForbiddenInsufficient permissions to suspend this user
404Not FoundUser not found

API Playground

Simulation
Simulation Mode

You are using simulated data. Switch to real API mode to call actual endpoints.

Path Parameters

User ID

GET /users/{id}/transactions

Description

Get user transaction history

Parameters

NameTypeRequiredDescription
idstringRequiredUser ID
pagenumberOptionalPage number for pagination
limitnumberOptionalNumber of items per page
typestringOptionalFilter by transaction type
start_datestringOptionalStart date for filtering (ISO format)
end_datestringOptionalEnd date for filtering (ISO format)

Possible Errors

StatusError CodeDescription
401UnauthorizedAuthentication credentials were missing or incorrect
403ForbiddenInsufficient permissions to access this user's transactions
404Not FoundUser not found

API Playground

Simulation
Simulation Mode

You are using simulated data. Switch to real API mode to call actual endpoints.

Path Parameters

User ID

Query Parameters

Page number for pagination

Number of items per page

Filter by transaction type

Start date for filtering (ISO format)

End date for filtering (ISO format)

GET /users/{id}/balance

Description

Get user current balance

Parameters

NameTypeRequiredDescription
idstringRequiredUser ID

Possible Errors

StatusError CodeDescription
401UnauthorizedAuthentication credentials were missing or incorrect
403ForbiddenInsufficient permissions to access this user's balance
404Not FoundUser not found

API Playground

Simulation
Simulation Mode

You are using simulated data. Switch to real API mode to call actual endpoints.

Path Parameters

User ID

POST /users/{id}/reset-password

Description

Reset user password

Parameters

NameTypeRequiredDescription
idstringRequiredUser ID

Possible Errors

StatusError CodeDescription
400Bad RequestInvalid reset token or weak password
401UnauthorizedAuthentication credentials were missing or incorrect
403ForbiddenInsufficient permissions to reset this user's password
404Not FoundUser not found

API Playground

Simulation
Simulation Mode

You are using simulated data. Switch to real API mode to call actual endpoints.

Path Parameters

User ID

GET /users/search

Description

Search users by various criteria

Parameters

NameTypeRequiredDescription
querystringRequiredSearch query (phone, name, email)
pagenumberOptionalPage number for pagination
limitnumberOptionalNumber of items per page

Possible Errors

StatusError CodeDescription
400Bad RequestInvalid search query
401UnauthorizedAuthentication credentials were missing or incorrect

API Playground

Simulation
Simulation Mode

You are using simulated data. Switch to real API mode to call actual endpoints.

Query Parameters

Search query (phone, name, email)

Page number for pagination

Number of items per page

Introduction