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

Example response

See BWS.Blockchain.Fetch

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": "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

Example responses

See operation BWS.Blockchain.Save

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": "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

Example responses

See operation BWS.Blockchain.Save

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": "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

Example responses

See operation BWS.Blockchain.Save

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": "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

Example responses

See operation BWS.Blockchain.Save

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": "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

Example responses

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

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": "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

Example responses

TBD

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": "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

Example responses

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

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": "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

Example responses

TBD

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": "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

Example responses

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

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": "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

Example responses

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

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

Last updated