Blockchain

This section has operations to read from and write to the blockchain

Reads the status from the blockchain for a particular job id

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

Use this operation to get an update on the status of the blockchain entry.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

getJobStatusFromBlockchain

parameters*

JSON

check Operation parameters

See BWS.Blockchain.Fetch

Operation parameters

ParameterType/FormatRequiredDescription

job_id

string

yes

String identifier for the blockchain entry

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": "getJobStatusFromBlockchain",
    "parameters": {
        "job_id": "8707b226-a4ac-4e34-9dde-8c9f233e0a64"
    }

Writes a framework to the blockchain for a particular reporting year (HTML format)

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

Use this operation to write your Green Bond Framework, or similar, to the blockchain e.g. for increased committment and trust. This operation writes the framework data in html-tabular format.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

writeHtmlFrameworkToBlockchain

parameters*

JSON

check Operation parameters

See operation BWS.Blockchain.Save

Operation parameters

ParameterType/FormatRequiredDescription

framework_identifier

string

yes

String identifier for the framework

reporting_year

number/4 digits

yes

Year of the taxonomy

solution

string

yes

BWS solution to be used

operation

string

yes

BWS operation to be used

version

number/integer

yes

BWS version to be used

network

string

yes

Blockchain network to be used

decimals

number/integer

no

Number of decimals in numeral output

sdg_goals_included

string

no

Select "yes" to include UN SDGs in the output, otherwise "no"

eu_objectives_included

string

no

Select "yes"to include EU Environmental Objectives in the output, otherwise "no"

language_code

string

no

Language codes as per getLanguages. Default is the original language.

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": "writeHtmlFrameworkToBlockchain",
    "parameters": {
	"framework_identifier": "greenbond",
	"reporting_year": 2023,
   	"solution": "BWS.Blockchain.Save",
        "operation": "save",
	"version": 1,
	"network": "mumbai",
        "decimals": 1,
        "sdg_goals_included": "yes",
        "eu_objectives_included": "no",
        "language_code": "en"
        }
    }

Writes a framework to the blockchain for a particular reporting year (JSON format)

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

Use this operation to write your Green Bond Framework, or similar, to the blockchain e.g. for increased committment and trust. This operation writes the framework data in JSON format.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

writeJsonFrameworkToBlockchain

parameters*

JSON

check Operation parameters

See operation BWS.Blockchain.Save

Operation parameters

ParameterType/FormatRequiredDescription

framework_identifier

string

yes

String identifier for the framework

reporting_year

number/4 digits

yes

Year of the taxonomy

solution

string

yes

BWS solution to be used

operation

string

yes

BWS operation to be used

version

number/integer

yes

BWS version to be used

network

string

yes

Blockchain network to be used

decimals

number/integer

no

Number of decimals in numeral output

sdg_goals_included

string

no

Select "yes" to include UN SDGs in the output, otherwise "no"

eu_objectives_included

string

no

Select "yes"to include EU Environmental Objectives in the output, otherwise "no"

language_code

string

no

Language codes as per getLanguages. Default is the original language.

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": "writeJsonFrameworkToBlockchain",
    "parameters": {
	"framework_identifier": "greenbond",
	"reporting_year": 2023,
   	"solution": "BWS.Blockchain.Save",
        "operation": "save",
	"version": 1,
	"network": "mumbai",
        "decimals": 1,
        "sdg_goals_included": "yes",
        "eu_objectives_included": "no",
        "language_code": "en"
        }
    }

Writes the impacts of a particular investment in a green asset to the blockchain (HTML format)

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

Use this operation to write a position's impact benefits to the blockchain to e.g. get a certificate to offset negative impacts. This operation writes the position impact data in html-tabular format.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

writeHtmlPositionImpactsToBlockchain

parameters*

JSON

check Operation parameters

See operation BWS.Blockchain.Save

Operation parameters

ParameterType/FormatRequiredDescription

position_id

number/integer

yes

Integer identifier for the investment

reporting_year

number/4 digits

yes

Year of the taxonomy

solution

string

yes

BWS solution to be used

operation

string

yes

BWS operation to be used

version

number/integer

yes

BWS version to be used

network

string

yes

Blockchain network to be used

decimals

number/integer

no

Number of decimals in numeral output

sdg_goals_included

string

no

Select "yes" to include UN SDGs in the output, otherwise "no"

eu_objectives_included

string

no

Select "yes"to include EU Environmental Objectives in the output, otherwise "no"

write_investor_to_blockchain

string

no

Select "yes" to include PII to the output, default is "no"

decryption_key

string

no

For decrypting personally identifiable information

language_code

string

no

Language codes as per getLanguages. Default is the original language.

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": "writeHtmlPositionImpactsToBlockchain",
    "parameters": {
	"position_id": 6,
	"reporting_year": 2023,
   	"solution": "BWS.Blockchain.Save",
        "operation": "save",
	"version": 1,
	"network": "mumbai",
        "decimals": 1,
        "sdg_goals_included": "yes",
        "eu_objectives_included": "no",
        "write_investor_to_blockchain": "yes",
        "decryption_key": "64dh_WtAnyMK-f3dtb5-ESweLX80P__a3FjXsgg3Y=",
        "language_code": "en"
        }
    }

Writes the impacts of a particular investment in a green asset to the blockchain (JSON format)

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

Use this operation to write a position's impact benefits to the blockchain to e.g. get a certificate to offset negative impacts. This operation writes the position impact data in JSON format.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

writeJsonPositionImpactsToBlockchain

parameters*

JSON

check Operation parameters

See operation BWS.Blockchain.Save

Operation parameters

ParameterType/FormatRequiredDescription

position_id

number/integer

yes

Integer identifier for the investment

reporting_year

number/4 digits

yes

Year of the taxonomy

solution

string

yes

BWS solution to be used

operation

string

yes

BWS operation to be used

version

number/integer

yes

BWS version to be used

network

string

yes

Blockchain network to be used

decimals

number/integer

no

Number of decimals in numeral output

sdg_goals_included

string

no

Select "yes" to include UN SDGs in the output, otherwise "no"

eu_objectives_included

string

no

Select "yes"to include EU Environmental Objectives in the output, otherwise "no"

write_investor_to_blockchain

string

no

Select "yes" to include PII to the output, default is "no"

decryption_key

string

no

For decrypting personally identifiable information

language_code

string

no

Language codes as per getLanguages. Default is the original language.

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": "writeJsonPositionImpactsToBlockchain",
    "parameters": {
	"position_id": 6,
	"reporting_year": 2023,
   	"solution": "BWS.Blockchain.Save",
        "operation": "save",
	"version": 1,
	"network": "mumbai",
        "decimals": 1,
        "sdg_goals_included": "yes",
        "eu_objectives_included": "no",
        "write_investor_to_blockchain": "yes",
        "decryption_key": "64dh_WtAnyMK-f3dtb5-ESweLX80P__a3FjXsgg3Y=",
        "language_code": "en"
        }
    }

Returns the framework data as written on the blockchain (HTML format)

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

Use this operation to retrieve a framework from the blockchain e.g. for increased committment and trust. This operation presents the framework data in html-tabular format.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

getHtmlFrameworkFromBlockchain

parameters*

JSON

check Operation parameters

{
    "Link to framework blockchain entry": "https://jobs.bws.ninja/6195b7c4-9e29-4eb2-925e-84af8614d2a3.html"
}

Operation parameters

ParameterType/FormatRequiredDescription

job_id

string

yes

String identifier for the blockchain entry

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": "getHtmlFrameworkFromBlockchain",
    "parameters": {
        "job_id": "8707b226-a4ac-4e34-9dde-8c9f233e0a64"
        }
    }

Returns the framework data as written on the blockchain (JSON format)

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

Use this operation to retrieve a framework from the blockchain e.g. for increased committment and trust. This operation presents the framework data in JSON format.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

getJsonFrameworkFromBlockchain

parameters*

JSON

check Operation parameters

TBD

Operation parameters

ParameterType/FormatRequiredDescription

job_id

string

yes

String identifier for the blockchain entry

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": "getJsonFrameworkFromBlockchain",
    "parameters": {
        "job_id": "8707b226-a4ac-4e34-9dde-8c9f233e0a64"
        }
    }

Returns the impact data for an investment as written to the blockchain (HTML format)

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

Use this operation to retrieve a position's impact benefits from the blockchain to e.g. get a certificate to offset negative impacts. This operation presents the position's impact data in html-tabular format.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

parameters

JSON

Check Operation parameters

operation

string

getHtmlPositionImpactsFromBlockchain

{
    "Link to position impact blockchain entry": "https://jobs.bws.ninja/8707b226-a4ac-4e34-9dde-8c9f233e0a64.html"
}

Operation parameters

ParameterType/FormatRequiredDescription

job_id

string

yes

String identifier for the blockchain entry

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": "getHtmlPositionImpactsFromBlockchain",
    "parameters": {
        "job_id": "8707b226-a4ac-4e34-9dde-8c9f233e0a64"
        }
    }

Returns the impact data for an investment in a green asset as written to the blockchain (JSON format)

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

Use this operation to retrieve a position's impact benefits from the blockchain to e.g. get a certificate to offset negative impacts. This operation presents the position's impact data in JSON format.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

getJsonPositionImpactsFromBlockchain

parameters*

JSON

check Operation parameters

TBD

Operation parameters

ParameterType/FormatRequiredDescription

job_id

string

yes

String identifier for the blockchain entry

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": "getJsonPositionImpactsFromBlockchain",
    "parameters": {
        "job_id": "8707b226-a4ac-4e34-9dde-8c9f233e0a64"
        }
    }

Returns the blockchain job IDs for a particular framework

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

Use this operation to retrieve the blockchain entries made for frameworks.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

getBlockchainJobsForFrameworks

parameters*

JSON

check Operation parameters

[
    {
        "id": 9,
        "job_id": "d1c1bc08-8f61-4804-ae77-7c5af0572451"
    },
    {
        "id": 10,
        "job_id": "ab9b591b-06e4-42a7-9513-ec7efbe8f7b9"
    },
    {
        "id": 11,
        "job_id": "a9436bcc-4a80-4974-87b4-87ca6bc2d89c"
    },
    {
        "id": 12,
        "job_id": "e848afb2-8b9e-4c5b-b670-7d62700b2b58"
    },
    {
        "id": 13,
        "job_id": "b213f0ec-5c31-4b96-a77b-f9059791ed64"
    },
    {
        "id": 14,
        "job_id": "6195b7c4-9e29-4eb2-925e-84af8614d2a3"
    },
    {
        "id": 15,
        "job_id": "f2224f42-4c44-474e-bcf3-6728105c26ef"
    },
    {
        "id": 16,
        "job_id": "e4315ffd-c6c6-4fdb-a30c-5a539cb36a2c"
    }
]

Operation parameters

ParameterType/FormatRequiredDescription

framework_identifier

string

yes

String identifier for the framework

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": "getBlockchainJobsForFrameworks",
    "parameters": {
        "framework_identifier": "greenbond"
    }

Returns the blockchain job IDs for a particular investor

POST /call

Use this operation to retrieve the blockchain entries made for position impact benefits.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

getBlockchainJobsForImpacts

parameters*

JSON

check Operation parameters

[
    {
        "id": 27,
        "job_id": "70bd33bb-36af-4980-a3b1-8d00c8885ec2"
    }
]

Operation parameters

ParameterType/FormatRequiredDescription

investor_identifier

string

yes

String identifier for the investor

position_id

number/integer

yes

Integer identifier for the 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": "getBlockchainJobsForImpacts",
    "parameters": {
        "investor_identifier": "9c809eb86ee6",
        "position_id": 6 
    }

Last updated