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
  • Fetch
  • Request Body
  • Blockchain Job Status List

Was this helpful?

  1. API How Tos
  2. Main API Methods

'fetch' API Method

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

Blockchain operations are mostly asynchronous, meaning you request something and need to wait until the response or confirmation is available.

Because of that, you will find most Blockchain Web Services API calls are also asynchronous, meaning you get a jobId you can use it to fetch the operation status and results.

CODE EXAMPLE

Javascript code example to 'fetch' job status and results.

var parameters = {
  "jobId": "b064cc6b-f394-4ca4-9c51-be506e4cc59d",
};

$.ajax({
  method: 'POST',
  url: 'https://api.bws.ninja/v1/fetch',
  dataType: 'json',
  data: JSON.stringify(parameters),
  headers: {
    'Content-Type': 'application/json',
    'X-Api-Key': 'ExV0d92KzQ8QgsTVnevddpbB8cUaAfPs7ntVF8g0'
  }
});

Fetch

Use this operation to fetch the status and results of a previously called operation.

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

Request Body

Name
Type
Description

parameters*

JSON

Method Parameters

Parameter
Type
Value(s)

jobId

string

API RESPONSE EXAMPLE (BWS.NFT.zK)

A response showing a job has correctly been registered.

{
    "statusCode": 200,
    "statusMessage": "",
    "info": {
        "status": {
            "Value": "completed"
        },
        "request": {
            "solution": "BWS.NFT.zK",
            "version": 1,
            "network": "mumbai",
            "operation": "new",
            "parameters": {
                "name": "BWS NFT Limited Edition",
                "description": "This NFT is a limited edition, with only 100 copies in existence, each meticulously verified on the blockchain.",
                "image": "ipfs://QmcduEBAppXxnyn37deHHf33Ep7cPbYxn1mH36Nvvowkiu",
                "attributes": [{
                    "trait_type": "Rarity",
                    "value": "Ultra rare"
                }]
            }
        },
        "result": {
            "guid": "ed4f3b08-482d-44d6-b4f5-3e1209a8a00b",
            "nftTxHash": "0x4ce447adb73c291760a9674ab98380095a1a21c1d7638a9989867d8f33a817d9",
            "nftId": "62",
            "nftIPFSHash": "QmVqX5XZKnzVi9fvvMFWQEmSksV6K3TefxkzdbfrsoiPKU",
            "nftImageIPFSHash": "QmcduEBAppXxnyn37deHHf33Ep7cPbYxn1mH36Nvvowkiu",
            "nftJson": {
                "name": "BWS NFT Limited Edition",
                "description": "This NFT is a limited edition, with only 100 copies in existence, each meticulously verified on the blockchain.",
                "image": "ipfs://QmcduEBAppXxnyn37deHHf33Ep7cPbYxn1mH36Nvvowkiu",
                "attributes": {
                    "trait_type": "Rarity",
                    "value": "Ultra rare"
                }
            },
            "url": {
                "nft": "https://ipfs.io/ipfs/QmVqX5XZKnzVi9fvvMFWQEmSksV6K3TefxkzdbfrsoiPKU",
                "image": "https://ipfs.io/ipfs/QmcduEBAppXxnyn37deHHf33Ep7cPbYxn1mH36Nvvowkiu",
                "transaction": "https://mumbai.polygonscan.com/tx/0x4ce447adb73c291760a9674ab98380095a1a21c1d7638a9989867d8f33a817d9"
            },
            "status": "created",
            "network": "mumbai",
            "transferCodes": {
                "owner": "28fd5c00-085a-4f0f-b750-a4bdcf990270",
                "receiver": "0539f"
            }
        },
        "hash": "0x4ce447adb73c291760a9674ab98380095a1a21c1d7638a9989867d8f33a817d9",
        "txnUrl": "https://mumbai.polygonscan.com/tx/0x4ce447adb73c291760a9674ab98380095a1a21c1d7638a9989867d8f33a817d9",
        "certificateOfTrust": "https://s3.amazonaws.com/bws-backoffice-website-infra-staging/tx/mumbai/0x4ce447adb73c291760a9674ab98380095a1a21c1d7638a9989867d8f33a817d9.pdf",
        "certificateOfTrustJPG": "https://s3.amazonaws.com/bws-backoffice-website-infra-staging/tx/mumbai/0x4ce447adb73c291760a9674ab98380095a1a21c1d7638a9989867d8f33a817d9.jpg",
        "certificateOfTrustUrl": "https://staging.bws.ninja/tx.html?t=0x4ce447adb73c291760a9674ab98380095a1a21c1d7638a9989867d8f33a817d9",
        "guid": "0ee9b165-064d-41c8-904a-b72de22cced6",
        "type": {
            "value": "blockchain-job"
        },
        "timestampInMillis": 1698684152535
    }
}

Blockchain Job Status List

When calling fetch API endpoint to get a job status, you can get one of the following statuses, representing which status your blockchain process is.

Status
Description

registered

The job has correctly been registered for execution.

calling

The transaction is been called.

running

The transaction is running on Blockchain Network.

transferring

In some scenarios, there is a transfer (e.g. transferring an NFT).

snapshotting

completed

Call has completed (success).

failed

Call execution has failed.

Previous'call' API MethodNextAPI Responses

Last updated 4 months ago

Was this helpful?

check

The jobId you get when running a .

The blockchain transaction has finished, and BWS is creating the (optional).

call API method
Certificate Of Trust
Method Parameters