Portfolios

This section includes operations to manage portfolios of green assets, i.e. showing, adding, and removing portfolios and positions in them

Returns all portfolios of all investors

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

Use this operation to retrieve the portfolios of your investors.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

getPortfolios

parameters*

string

check Operation parameters

[
    {
        "portfolio_id": 1,
        "portfolio_identifier": "portfolio_john",
        "investor_identifier": "3a6515809856",
        "investor_name": "John Smith",
        "assets": [
            {
                "asset_identifier": "X123456",
                "asset_name": "Green Deposits"
            },
            {
                "asset_identifier": "XS24427682",
                "asset_name": "Asset X, 5-year"
            },
            {
                "asset_identifier": "XS25798443",
                "asset_name": "Asset Y, 4-year"
            }
        ]
    },
    {
        "portfolio_id": 3,
        "portfolio_identifier": "portfolio_mary",
        "investor_identifier": "9c809eb86ee6",
        "investor_name": "Mary Smith",
        "assets": [
            {
                "asset_identifier": "XS25798443",
                "asset_name": "Asset Y, 4-year"
            }
        ]
    }
]

Operation parameters

ParameterType/FormatRequiredDescription

investor_identifier

string

yes

String identifier for an investor

asset_identifier

string

no

String identifier for an asset to include. Default is all.

decryption_key

string

no

For decrypting 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": "getPortfolios",
    "parameters": {
        "investor_identifier": "9c809eb86ee6",
        "asset_identifier": "XS123456",
        "decryption_key": "64dh_WtAnyMK-f3dtb5-ESweLX80P__a3FjXsgg3Y="
    }

Returns all investments in green assets in a portfolio of an investor

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

Use this operation to retrieve all green investments in an investors portfolio.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

getPortfolioPositions

parameters*

JSON

check Operation Parameters

[
    {
        "position_id": 6,
        "position_amount": 2400000,
        "position_currency_code": "EUR",
        "position_days": 180,
        "asset_identifier": "XS24427682",
        "asset_name": "Asset X, 5-year",
        "issuer_identifier": "good-bank-issuer",
        "issuer_name": "Good Bank"
    },
    {
        "position_id": 14,
        "position_amount": 250000,
        "position_currency_code": "EUR",
        "position_days": 180,
        "asset_identifier": "X123456",
        "asset_name": "Green Deposits",
        "issuer_identifier": "35f0c1a1c08",
        "issuer_name": "X Bank"
    },
    {
        "position_id": 16,
        "position_amount": 300000,
        "position_currency_code": "NOK",
        "position_days": 365,
        "asset_identifier": "XS25798443",
        "asset_name": "Asset Y, 4-year",
        "issuer_identifier": "good-bank-issuer",
        "issuer_name": "Good Bank"
    }
]

Operation Parameters

ParameterType/FormatRequiredDescription

portfolio_identifier

string

yes

String identifier for a portfolio

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": "getPortfolioPositions",
    "parameters": {
        "portfolio_identifier": "portfolio_green_john"
    }

Creates and updates the information of an existing portfolio of an investor

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

Use this operation to create a portfolio for an investor, next to be associated with specific investments. This operation is also used to alter already existing portfolio information.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

addPortfolio

parameters*

JSON

check Operation Parameters

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

Operation Parameters

ParameterType/FormatRequiredDescription

investor_identifier

string

yes

String identifier for an investor

portfolio_identifier

string

yes

String identifier for a portfolio

portfolio_identifier_changed

string

no

Used to change the portfolio identifier

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": "addPortfolio",
    "parameters": {
        "investor_identifier": "9c809eb86ee6",
        "portfolio_identifier": "portfolio_green_john",
        "portfolio_identifier_changed": ""
        }
    }

Adds an investment in a green asset to a portfolio of an investor

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

Use this operation to associate particular investments to a portfolio. Impacts can then be consolidated on portfolio level.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

addPositionToPortfolio

parameters*

JSON

check Operation parameters

{
    "message": "The position has been been succesfully added to the portfolio."
}

Operation parameters

ParameterType/FormatRequiredDescription

investor_identfier

string

yes

String identifier for an investor

portfolio_identifier

string

yes

String identifier for a portfolio

position_id

number/integer

yes

Integer identifier for an investment

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": "addPositionToPortfolio",
    "parameters": {
        "investor_identifier": "9c809eb86ee6",
        "portfolio_identifier": "portfolio_green_john",
        "position_id": 19
        }
    }

Removes an investment in a green asset from a portfolio of an investor

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

Use this operation to remove positions from a portfolio, prior to removal of the investment as such.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

removePositionFromPortfolio

parameters*

JSON

check Operation parameters

{
    "message": "Position successfully removed."
}

Operation parameters

ParameterType/FormatRequiredDescription

investor_identfier

string

yes

String identifier for an investor

portfolio_identifier

string

yes

String identifier for a portfolio

position_id

number/integer

yes

Integer identifier for an investment

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": "removePositionFromPortfolio",
    "parameters": {
        "investor_identifier": "9c809eb86ee6",
        "portfolio_identifier": "portfolio_green_john",
        "position_id": 19
        }
    }

Removes a portfolio of an investor

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

Use this operation to remove a portfolio, prior to removing the investor.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

removePortfolio

parameters*

JSON

check Operation parameters

{
    "message": "Portfolio successfully removed."
}

Operation parameters

ParameterType/FormatRequiredDescription

investor_identifier

string

yes

String identifier for an investor

portfolio_identifier

string

yes

String identifier for a portfolio

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": "removePortfolio",
    "parameters": {
        "investor_identifier": "9c809eb86ee6",
        "portfolio_identifier": "portfolio_green_john"
        }
    }

Last updated