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

Example responses

[
    {
        "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

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

Example responses

[
    {
        "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

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

Example responses

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

Operation Parameters

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

Example responses

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

Operation parameters

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

Example responses

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

Operation parameters

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

Example responses

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

Operation parameters

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