Badges
Build or integrate into your solution by using BWS Blockchain Badges API.
A badge is a digital representation of an accomplishment, skill, or authorization that an individual can earn and display. It acts as verifiable proof of the user's achievements and can be shared across various digital platforms, enhancing their professional and personal credibility.
In the context of the Open Badge standard, a badge is represented as a JSON object that includes key metadata such as the badge name, description, criteria for earning it, issuing organization, and recipient information. This standardized format ensures interoperability and enables badges to be verified, trusted, and recognized globally.
new_badge
Use this operation to create a Badge you can later use to certify recognition (award/credentials).
POST
https://api.bws.ninja/v1/call
Request Body
solution*
string
BWS.Blockchain.Badges
operation*
string
new_badge
parameters*
JSON
new_badge Method Parameters
issuerId
string
name
string
Badge name (e.g. "Certified Data Analyst").
description
string
A description of the badge and what it represents.
criteria
string
Narrative describing the criteria to earn the badge.
image
base64
The image representing the badge as a base64 encoded string.
Your badge image will be saved on the InterPlanetary File System (IPFS) and served from the BWS IPFS gateway service. The images you use should be optimized to be consumed over the internet.
You must create your badge image to be less than 1 MB in size for fast access (there is a hard limit of 5MB).
Only the PNG image type is accepted.
new_badge API Call Example
new_badge Call Response
When the API call is successfully executed, it returns the badge id
, which is also the url you can use to fetch the badge image.
list_badges
Use this operation to get the list of all the badges you created.
POST
https://api.bws.ninja/v1/call
Request Body
solution*
string
BWS.Blockchain.Badges
operation*
string
list_badges
list_badges API Call Example
list_badges Call Response
Once executed correctly, you will get a list of your badges, including the badge ID and the badge data.
delete_badge
Use this API operation to delete an existing Badge.
You can only delete badges with no active Awards!
Once a certificate has been awarded to an individual (recipient), the related badge can not be deleted.
POST
https://api.bws.ninja/v1/call
Request Body
solution*
string
BWS.Blockchain.Badges
operation*
string
delete_badge
parameters*
JSON
delete_badge Method Parameters
badgeId
string
The badge ID to delete.
delete_badge API Call Example
delete_badge Call Response
If the call succeeds and the badge gets deleted, you will get a standard 200 response.
Last updated