@mojaloop/dfsp-account v0.9.30
Account service API
This service contains information about relations between users and their accounts. Accounts contain information for the following things:
- Which account is default for a given user;
 - If particular user is signatory for a given account; Account service also manage user roles and their permissions. Each registered user has assigned role in the system and this role has predefined permissions about allowed actions.
 
Roles can be one of the following:
- Customer
 - Merchant
 - Agent
 
Permissions are as follow:
- p2p - User is able to send peer to peer transfers;
 - cashIn - User is able to cash in;
 - cashOut - User is able to cash out;
 - invoice - User is able to issue an invoice / Sell goods;
 - ministatement - User is able to check ministatement menu;
 - balanceCheck - User is able to check his balance;
 
For the current moment permissions are set to the roles as follow:
- Agent: p2p, ministatement, balanceCheck, cashIn, cashOut;
 - Customer: p2p, ministatement, balanceCheck;
 - Merchant: p2p, ministatement, balanceCheck, invoice;
 
Account service has exposed the following private API calls:
Add actor to a given account
URL
/rpc/account/actorAccount/addMethod
POSTData Params
Required
accountId [number] - Account idaccountNumber [string] - Account numberactorId [string] - Actor idroleName [string] - Name of the roleisDefault [boolean] - Is this the default user's accountisSignatory [boolean] - Is this actor is signatory for this account
Success Response
- Code: 200 
Content
actorAccountId [number] - Actor account IdactorId [string] - Actor IdaccountId [number] - Account IdisDefault [boolean] - Is this the default user's accountisSignatory [boolean] - Is this actor is signatory for this accountaccountNumber [string] - Account numberpermissions [string array] - Array with names of permissions
 
- Code: 200 
Content
 
Edit actor data for account
URL
/rpc/account/actorAccount/editMethod
POSTData Params
Required
actorAccountId [number] - Actor account idaccountId [number] - Account idactorId [string] - Actor idisDefault [boolean] - Is this the default user's accountisSignatory [boolean] - Is this actor is signatory for this account
Success Response
- Code: 200 
Content
actorAccountId [number] - Actor account IdactorId [string] - Actor IdaccountId [number] - Account IdisDefault [boolean] - Is this the default user's accountisSignatory [boolean] - Is this actor is signatory for this accountaccountNumber [string] - Account numberpermissions [string array] - Array with names of permissions
 
- Code: 200 
Content
 
Fetch actor data for account
URL
/rpc/account/actorAccount/fetchMethod
POSTData Params
Required
accountId [number] - Account idactorId [string] - Actor idaccountNumber [string] - Account numberisDefault [boolean] - Is this the default user's accountisSignatory [boolean] - Is this actor is signatory for this account
Success Response
- Code: 200 
Content
actorAccountId [number] - Actor account IdactorId [string] - Actor IdaccountId [number] - Account IdisDefault [boolean] - Is this the default user's accountisSignatory [boolean] - Is this actor is signatory for this accountaccountNumber [string] - Account numberpermissions [string array] - Array with names of permissions
 
- Code: 200 
Content
 
Get actor data for account
URL
/rpc/account/actorAccount/getMethod
POSTData Params
Required
actorAccountId [number] - Actor account id
Success Response
- Code: 200 
Content
actorAccountId [number] - Actor account IdactorId [string] - Actor IdaccountId [number] - Account IdisDefault [boolean] - Is this the default user's accountisSignatory [boolean] - Is this actor is signatory for this accountaccountNumber [string] - Account numberpermissions [string array] - Array with names of permissions
 
- Code: 200 
Content
 
Remove actor data for account
URL
/rpc/account/actorAccount/getMethod
POSTData Params
Required
actorAccountId [number] - Actor account id
Success Response
- Code: 200 
Content
accountId [number] - Account id
 
- Code: 200 
Content
 
Add permissions for account
URL
/rpc/account/actorAccountPermission/addMethod
POSTData Params
Required
actorAccountId [number] - Actor account idpermissions [string array] - Array with the name of the permissions
Success Response
- Code: 200 
Content
actorAccountId [number] - Actor account idpermissions [string array] - Array with the name of the permissions
 
- Code: 200 
Content
 
Get permissions for account
URL
/rpc/account/actorAccountPermission/getMethod
POSTData Params
Required
actorAccountId [number] - Actor account id
Success Response
- Code: 200 
Content
actorAccountId [number] - Actor account idpermissions [string array] - Array with the name of the permissions
 
- Code: 200 
Content
 
Remove permissions for account
URL
/rpc/account/actorAccountPermission/removeMethod
POSTData Params
Required
actorAccountId [number] - Actor account idpermissions [string array] - Array with the name of the permissions
Success Response
- Code: 200 
Content
actorAccountId [number] - Actor account Idpermissions [string array] - Array with names of permissions
 
- Code: 200 
Content
 
Fetch account roles
URL
/rpc/account/role/fetchMethod
POSTData Params
Required
NONE
Success Response
- Code: 200 
Content
roleId [number] - Role Idname [string] - Role namedescription [string] - Role description
 
- Code: 200 
Content