BWS API Docs
Contact UsCreate AccountSign In
  • Welcome!
    • Developer Grants
  • Quick Start
  • Platform Fees
    • Fees Calculator
  • API How Tos
    • API Endpoint
    • Authentication
      • Get your API Key
    • Main API Methods
      • 'call' API Method
      • 'fetch' API Method
    • API Responses
      • Error Status Codes
  • Certificate Of Trust
  • Media Assets
    • BWS Logo
    • Snapshots
      • BWS.IPFS.Upload
  • PLATFORM APIs
    • BWS.IPFS.Upload
      • Solution Overview
      • Operations
    • BWS.Blockchain.Save
      • Solution Overview
      • Operations
    • BWS.Blockchain.Hash
      • Solution Overview
      • Operations
    • BWS.NFT.zK
      • Solution Overview
        • NFT Ownership
        • NFT Data Location
        • Available Networks
      • Operations
        • Create NFT
        • List NFTs
        • Transfer NFT
        • Send NFT by Email
      • NFT Attributes (traits)
  • Marketplace Solutions
    • BWS.Blockchain.Badges
      • Badges User Interface
      • Badges API
        • Issuers
        • Badges
        • Awards (Credentials)
    • BWS.NFT.GameCube
      • NFT Game Overview
      • NFT Game Cube API
        • Calendar
        • Field
        • Cubes
        • Plays (Field-Calendar)
        • Match
        • Prizes
        • Event Types
        • Live Events
    • BWS.ESG.Credits
      • Solution Overview
      • ESG Credits API
        • Taxonomy
        • Translations
        • Currencies
        • Frameworks
        • Projects
        • Issuers
        • Assets
        • Investors
        • Positions
        • Portfolios
        • Impacts
        • Blockchain
        • Users
  • TELEGRAM BOTS
    • X BOT
      • Install
        • How does it work?
      • Commands
        • Monitoring Setup
Powered by GitBook
On this page
  • getJobStatusFromBlockchain
  • Reads the status from the blockchain for a particular job id
  • writeHtmlFrameworkToBlockchain
  • Writes a framework to the blockchain for a particular reporting year (HTML format)
  • writeJsonFrameworkToBlockchain
  • Writes a framework to the blockchain for a particular reporting year (JSON format)
  • writeHtmlPositionImpactsToBlockchain
  • Writes the impacts of a particular investment in a green asset to the blockchain (HTML format)
  • writeJsonPositionImpactsToBlockchain
  • Writes the impacts of a particular investment in a green asset to the blockchain (JSON format)
  • getHtmlFrameworkFromBlockchain
  • Returns the framework data as written on the blockchain (HTML format)
  • getJsonFrameworkFromBlockchain
  • Returns the framework data as written on the blockchain (JSON format)
  • getHtmlPositionImpactsFromBlockchain
  • Returns the impact data for an investment as written to the blockchain (HTML format)
  • getJsonPositionImpactsFromBlockchain
  • Returns the impact data for an investment in a green asset as written to the blockchain (JSON format)
  • getBlockchainJobsForFrameworks
  • Returns the blockchain job IDs for a particular framework
  • getBlockchainJobsForImpacts
  • Returns the blockchain job IDs for a particular investor

Was this helpful?

  1. Marketplace Solutions
  2. BWS.ESG.Credits
  3. ESG Credits API

Blockchain

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

PreviousImpactsNextUsers

Last updated 1 year ago

Was this helpful?

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

getJobStatusFromBlockchain

parameters*

JSON

check Operation parameters

Example response

See BWS.Blockchain.Fetch

{
    "message": "Error reading from the blockchain."
}
{
    "message": "Not authorized."
}

Operation parameters

Parameter
Type/Format
Required
Description

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

writeHtmlFrameworkToBlockchain

parameters*

JSON

check Operation parameters

Example responses

See operation BWS.Blockchain.Save

{
    "message": "Error writing to the blockchain."
}
{
    "message": "Not authorized."
}s

Operation parameters

Parameter
Type/Format
Required
Description

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

writeJsonFrameworkToBlockchain

parameters*

JSON

check Operation parameters

Example responses

See operation BWS.Blockchain.Save

{
    "message": "Error writing to the blockchain."
}
{
    "message": "Not authorized."
}

Operation parameters

Parameter
Type/Format
Required
Description

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

writeHtmlPositionImpactsToBlockchain

parameters*

JSON

check Operation parameters

Example responses

See operation BWS.Blockchain.Save

{
    "message": "Error writing to the blockchain."
}
{
    "message": "Not authorized."
}

Operation parameters

Parameter
Type/Format
Required
Description

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

writeJsonPositionImpactsToBlockchain

parameters*

JSON

check Operation parameters

Example responses

See operation BWS.Blockchain.Save

{
    "message": "Error writing to the blockchain."
}
{
    "message": "Not authorized."
}

Operation parameters

Parameter
Type/Format
Required
Description

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

getHtmlFrameworkFromBlockchain

parameters*

JSON

check Operation parameters

Example responses

{
    "Link to framework blockchain entry": "https://jobs.bws.ninja/6195b7c4-9e29-4eb2-925e-84af8614d2a3.html"
}
{
    "message": "Error reading from the blockchain."
}
{
    "message": "Not authorized."
}

Operation parameters

Parameter
Type/Format
Required
Description

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

getJsonFrameworkFromBlockchain

parameters*

JSON

check Operation parameters

Example responses

TBD

{
    "message": "Error reading from the blockchain."
}
{
    "message": "Not authorized."
}

Operation parameters

Parameter
Type/Format
Required
Description

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

parameters

JSON

Check Operation parameters

operation

string

getHtmlPositionImpactsFromBlockchain

Example responses

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

Operation parameters

Parameter
Type/Format
Required
Description

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

getJsonPositionImpactsFromBlockchain

parameters*

JSON

check Operation parameters

Example responses

TBD

{
    "message": "Error reading from blockchain."
}
{
    "message": "Not authorized."
}

Operation parameters

Parameter
Type/Format
Required
Description

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

getBlockchainJobsForFrameworks

parameters*

JSON

check Operation parameters

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"
    }
]
{
    "message": "No such framework is registered."
}
{
    "message": "Not authorized."
}

Operation parameters

Parameter
Type/Format
Required
Description

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

getBlockchainJobsForImpacts

parameters*

JSON

check Operation parameters

Example responses

[
    {
        "id": 27,
        "job_id": "70bd33bb-36af-4980-a3b1-8d00c8885ec2"
    }
]
{
    "message": "No such investor is registered."
}
{
    "message": "Not authorized."
}

Operation parameters

Parameter
Type/Format
Required
Description

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 
    }

getJobStatusFromBlockchain
writeHtmlFrameworkToBlockchain
writeJsonFrameworkToBlockchain
writeHtmlPositionImpactsToBlockchain
writeJsonPositionImpactsToBlockchain
getHtmlFrameworkFromBlockchain
getJsonFrameworkFromBlockchain
getHtmlPositionImpactsFromBlockchain
getJsonPositionImpactsFromBlockchain
getBlockchainJobsForFrameworks
getBlockchainJobsForImpacts