Investors

This section has operations to manage investors, i.e. showing, adding, encrypting, and removing investors

Returns all investors

POST https://api.bws.ninja/v1/call

Use this operation to retrieve all investors.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

getInvestors

parameters

JSON

check Operation parameters

Example responses

[
    {
        "investor_id": 19,
        "investor_identifier": "3a6515809856",
        "investor_name": "John Smith",
        "investor_currency_code": "USD",
        "investor_email": "john.smith@xyz.com"
    },
    {
        "investor_id": 20,
        "investor_identifier": "9c809eb86ee6",
        "investor_name": "Mary Smith",
        "investor_currency_code": "USD",
        "investor_email": "mary.smith@xyz.com"
    }
]

Operation parameters

ParameterType/FormatRequiredDescription

depryption_key

string

no

For decrypting personally identifiable information

user_identifier

string

no

For limiting the output to the investors that the user has access to

Example code

curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
    "solution": "BWS.ESG.Credits",
    "operation": "getInvestors",
    "parameters": {
        "decryption_key": "64dh_WtAnyMK-f3dtb5-ESweLX80P__a3FjXsgg3Y="
        }
    }

Generates a random investor identifier

POST https://api.bws.ninja/v1/call

Use this operation to generate investor identifiers, for cases where they need to random and not personally identifiable information (PII).

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

generateInvestorIdentifier

Example responses

{
    "investor_identifier": "38af93cb6de"
}

Example code

curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
    "solution": "BWS.ESG.Credits",
    "operation": "generateInvestorIdentifier"
    }

Generates an encryption key used to encrypt personal identifiable information

POST https://api.bws.ninja/v1/call

Use this operation to generate an encryption, used to encrypt and decrypt personally identiable infomation (PII) in the data repository of ESG.Credits.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

generateEncryptionKey

Example responses

{
    "message": "Generated key for encrypting and decrypting PIIs is (keep it safely): Nl5ZBnKXHXvvW7v1os7c5W9Ag_1hPLEuOb-G-ZU0="
}

Example code

curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
    "solution": "BWS.ESG.Credits",
    "operation": "generateEncryptionKey"
    }

Creates and updates the information of an existing investor

POST https://api.bws.ninja/v1/call

Use this operation to create investors stored in ESG.Credits. Is also used to alter already existing investor data.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

addInvestor

parameters*

JSON

check Operation parameters

Example responses

{
    "message": "Investor was successfully added."
}

Operation parameters

ParameterType/FormatRequiredDescription

investor_identifier

string

yes

String identifier for an investor, potentially personally identifiable information (subject to encryption)

investor_name

string

yes

Personally identiable information (subject to encryption)

investor_currency_code

string

yes

Currency code of the investor, as per getCurrencies (currently not utilized)

investor_email

string

no

For investor correspondence e.g investor reports

encryption_key

string

no

For encrypting personally identifiable information

Example code

curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
    "solution": "BWS.ESG.Credits",
    "operation": "addInvestor",
    "parameters": {
        "investor_identifier": "9c809eb86ee6",
        "investor_name": "John Smith",
        "investor_currency_code": "SEK",
        "investor_email": "john.smith@xyz.com",
        "encryption_key": "64dh_WtAnyMK-f3dtb5-ESweLX80P__a3FjXsgg3Y="
        }
    }

Removes an investor

POST https://api.bws.ninja/v1/call

Use this operation to remove investors from the ESG.Credits data repository.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Creditd

operation*

string

removeInvestor

parameters*

JSON

check Operation parameters

Example responses

{
    "Investor was successfully removed." 
}

Operation parameters

ParameterType/FormatRequiredDescription

investor_identifier

string

yes

String identifier for an investor

Example code

curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
    "solution": "BWS.ESG.Credits",
    "operation": "removeInvestor",
    "parameters": {
        "investor_identifier": "9c807eb86ee6"
        }
    }

Last updated