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
  • new_field
  • Request Body
  • new_field API Call Example
  • list_fields
  • Request Body
  • list_fields API Call Example
  • delete_field
  • Request Body
  • delete_field API Call Example

Was this helpful?

  1. Marketplace Solutions
  2. BWS.NFT.GameCube
  3. NFT Game Cube API

Field

Represents a virtual sports field tokenized into interactive zones or sections ("CUBES"). It is the foundational canvas for all game interactions.

Each field is typically linked to a real-world sports match. Examples:

  • Real Madrid Stadium

  • Madison Square Garden

new_field

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

Request Body

Name
Type
Description

solution*

string

BWS.NFT.GameCube

operation*

string

new_field

parameters*

JSON

check method parameters

new_field Method Parameters

Parameter
Type
Desciption

name

string

Field name (e.g. Camp Nou)

sport

string

Sport (e.g. Football)

fieldLength

number

Field length in centimeters (e.g. 12000)

fieldWidth

number

Field width in centimeters (e.g. 9000)

cubeLength

number

The square size of a single cube (e.g. 300 for a cube of 3x3 meters)

new_field API Call Example

const axios = require('axios');

/* build request to use BWS Badges solution */
const request = {
{
  "solution": "BWS.NFT.GameCube",
  "operation": "new_field",
  "parameters":  {
     "name": "Camp Nou",
     "sport": "football",
     "fieldLength": 12000,
     "fieldWidth": 8000,
     "cubeLength": 300      
  }
}

/* call BWS API using Axios */
let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.bws.ninja/v1/call',
  headers: { 
    'X-Api-Key': 'XqaLg...... A5k2V729v', /* use your API key here! */
    'Content-Type': 'application/json'
  },
  data : JSON.stringify(request)
};

axios.request(config)
  .then((response) => {
    console.log(JSON.stringify(response.data));
  })
  .catch((error) => {
    console.log(error);
  });

new_field Call Response

When the API call is successfully executed, it returns thefieldId, which will be used to link NFT Game Cube related objects.

All the cubes for that field are created when creating a new field.

{
  "statusCode": 200,
  "info": {
    "fieldId": "5a1486f3-753c-4194-b2d4-ea68b6e420c2"
  }
}

list_fields

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

Request Body

Name
Type
Description

solution*

string

BWS.NFT.GameCube

operation*

string

list_fields

parameters

JSON

(optional) check method parameters

list_fields Method Parameters (optional)

Parameter
Type
Desciption

field_id

string

Field Id

list_fields API Call Example

const axios = require('axios');

/* build request to use BWS Badges solution */
const request = {
{
  "solution": "BWS.NFT.GameCube",
  "operation": "list_fields",
  "parameters":  {
     "fieldId": "5a1486f3-753c-4194-b2d4-ea68b6e420c2"   
  }
}

/* call BWS API using Axios */
let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.bws.ninja/v1/call',
  headers: { 
    'X-Api-Key': 'XqaLg...... A5k2V729v', /* use your API key here! */
    'Content-Type': 'application/json'
  },
  data : JSON.stringify(request)
};

axios.request(config)
  .then((response) => {
    console.log(JSON.stringify(response.data));
  })
  .catch((error) => {
    console.log(error);
  });

list_fields Call Response

When the API call is successfully executed, it returns the list of fields you created or a single field if fieldIdparameter is included in the call.

{
  "statusCode": 200,
  "info": {
     "fields": [
            {
                "fieldId": "5a1486f3-753c-4194-b2d4-ea68b6e420c2",
                "status": "ready",
                "data": {
                    "name": "Camp Nou",
                    "sport": "football",
                    "fieldLength": 12000,
                    "fieldWidth": 8000,
                    "cubeLength": 300
                }
            }
        ]
  }
}

delete_field

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

Request Body

Name
Type
Description

solution*

string

BWS.NFT.GameCube

operation*

string

delete_field

parameters*

JSON

check method parameters

delete_field Method Parameters

Parameter
Type
Desciption

fieldId

string

Field Id to delete.

delete_field API Call Example

const axios = require('axios');

/* build request to use BWS Badges solution */
const request = {
{
  "solution": "BWS.NFT.GameCube",
  "operation": "delete_field",
  "parameters":  {
     "fieldId": "5a1486f3-753c-4194-b2d4-ea68b6e420c2"   
  }
}

/* call BWS API using Axios */
let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.bws.ninja/v1/call',
  headers: { 
    'X-Api-Key': 'XqaLg...... A5k2V729v', /* use your API key here! */
    'Content-Type': 'application/json'
  },
  data : JSON.stringify(request)
};

axios.request(config)
  .then((response) => {
    console.log(JSON.stringify(response.data));
  })
  .catch((error) => {
    console.log(error);
  });

delete_field Call Response

When the API call is executed without errors, it returns a successful status code.

All the cubes created and assigned to the deleted field are also deleted.

{
  "statusCode": 200,
  "info": {
    "fieldId": "5a1486f3-753c-4194-b2d4-ea68b6e420c2"
  }
}

PreviousCalendarNextCubes

Last updated 1 month ago

Was this helpful?