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
check Operation parameters
Example responses
200: OK Successful operation (example) 400: Bad Request Error message (example) 401: Unauthorized Error message
Copy [
{
"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"
}
]
}
]
Copy {
"message": "No such portfolio(s) for that investor."
}
Copy {
"message": "Not authorized."
}
Operation parameters
Parameter
Type/Format
Required
Description
String identifier for an investor
String identifier for an asset to include. Default is all.
For limiting the output to the investors that the user has access to
For decrypting personally identifiable information
Example code
curl
Copy 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
check Operation Parameters
Example responses
200: OK Successful operation (example) 400: Bad Request Error message (example) 401: Unauthorized Error message
Copy [
{
"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"
}
]
Copy {
"message": "No position(s) in that portfolio."
}
Copy {
"message": "Not authorized."
}
Operation Parameters
Parameter
Type/Format
Required
Description
String identifier for a portfolio
Example code
curl
Copy 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"
}
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
check Operation Parameters
Example responses
200: OK Successful operation 400: Bad Request Error message (example) 401: Unauthorized Error message
Copy {
"message": "Portfolio was successfully added."
}
Copy {
"message": "Investor identifier does not exist."
}
Copy {
"message": "Not authorized."
}
Operation Parameters
Parameter
Type/Format
Required
Description
String identifier for an investor
String identifier for a portfolio
portfolio_identifier_changed
Used to change the portfolio identifier
Example code
curl
Copy 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
check Operation parameters
Example responses
200: OK Successful operation 400: Bad Request Error message (example) 401: Unauthorized Error message
Copy {
"message": "The position has been been succesfully added to the portfolio."
}
Copy {
"message": "The referenced portfolio does not exist."
}
Copy {
"message": "Not authorized."
}
Operation parameters
Parameter
Type/Format
Required
Description
String identifier for an investor
String identifier for a portfolio
Integer identifier for an investment
Example code
curl
Copy 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
removePositionFromPortfolio
check Operation parameters
Example responses
200: OK Successful operation 400: Bad Request Error message (example) 401: Unauthorized Error message
Copy {
"message": "Position successfully removed."
}
Copy {
"message": "No such portfolio."
}
Copy {
"message": "Not authorized."
}
Operation parameters
Parameter
Type/Format
Required
Description
String identifier for an investor
String identifier for a portfolio
Integer identifier for an investment
Example code
curl
Copy 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
check Operation parameters
Example responses
200: OK Successful operation 400: Bad Request Error message (example) 401: Unauthorized Error message
Copy {
"message": "Portfolio successfully removed."
}
Copy {
"message": "No such portfolio."
}
Copy {
"message": "Not authorized."
}
Operation parameters
Parameter
Type/Format
Required
Description
String identifier for an investor
String identifier for a portfolio
Example code
curl
Copy 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"
}
}