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
Example responses
200: OK Successful operation (example) 400: Bad Request Error message (example) 401: Unauthorized Error message
Copy [
{
"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"
}
]
Copy {
"message" : "No investors are registered."
}
Copy {
"message" : "Not authorized."
}
Operation parameters
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": "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
Example responses
200: OK Successful operation (example) 400: Bad Request Error message (example) 401: Unauthorized Error message
Copy {
"investor_identifier" : "38af93cb6de"
}
Copy {
"message" : "Investor identifier generation failed. Try again!"
}
Copy {
"message" : "Not authorized."
}
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": "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
Example responses
200: OK Successful operation (example) 400: Bad Request Error message (example) 401: Unauthorized Error message
Copy {
"message": "Generated key for encrypting and decrypting PIIs is (keep it safely): Nl5ZBnKXHXvvW7v1os7c5W9Ag_1hPLEuOb-G-ZU0="
}
Copy {
"message" : "Investor identifier generation failed. Try again!"
}
Copy {
"message" : "Not authorized."
}
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": "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
Example responses
200: OK Successful operation 400: Bad Request Error message (example) 401: Unauthorized Error message
Copy {
"message" : "Investor was successfully added."
}
Copy {
"message" : "Suggested investor reporting currency does not exist."
}
Copy {
"message" : "Not authorized."
}
Operation parameters
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": "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
Example responses
200: OK Successful operation 400: Bad Request Error message (example) 401: Unauthorized Error message
Copy {
"Investor was successfully removed."
}
Copy {
"message" : "Investor was not removed. Position(s) exist."
}
Copy {
"message" : "Not authorized."
}
Operation parameters
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": "removeInvestor",
"parameters": {
"investor_identifier": "9c807eb86ee6"
}
}