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
        • X Filtering
        • Leaderboard Points
        • Report Schedule
Powered by GitBook
On this page
  • new_field-calendar
  • Request Body
  • new_field-calendar API Call Example
  • list_field-calendars
  • Request Body
  • list_field-calendars API Call Example
  • delete_field-calendar
  • Request Body
  • delete_field-calendar API Call Example

Was this helpful?

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

Plays (Field-Calendar)

This relationship models the temporal lifecycle of a Field in the NFT Game Cube solution. A Field defines a sports ground's static, spatial configuration (like a 12×8 football pitch), while Calendar entries dynamically represent individual matches, tournaments, or rounds on that Field.

Examples:

  • PSG Champions League 2026

  • New York Knicks 2026 NBA Season

Images The images sent using base64 encoding are saved into IPFS using the BWS IPFS Solution. When getting object details, the IPFS URL is returned.

new_field-calendar

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

Request Body

Name
Type
Description

solution*

string

BWS.NFT.GameCube

operation*

string

new_calendar

parameters*

JSON

check method parameters

new_field-calendar Method Parameters

Parameter
Type
Desciption

fieldId

string

Field Id.

calendarId

string

Calendar Id.

description

string

The field calendar name (e.g. PSG 2025-26)

image

string

An image base64 encoded.

new_field-calendar API Call Example

const axios = require('axios');

/* build request to use BWS Badges solution */
const request = {
{
  "solution": "BWS.NFT.GameCube",
  "operation": "new_field-calendar",
  "parameters":  {
      "fieldId": "8a7324f4-311d-43a8-a28f-87d9c424c354",
      "calendarId": "8a7324f4-311d-43a8-a28f-87d9c424c354",
      "description": "PSG 2025-26",
      "image": "9j/4AAQSkZJRgABAQIAHA... " /* base64 encoded image string */
  }
}

/* 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-calendar Call Response

When the API call is successfully executed, it returns the fieldId and calendarId used to create the calendar and the related data, including the name and the image IPFS url.

{
  "statusCode": 200,
  "info": {
        "fieldId": "5a1486f3-753c-4194-b2d4-ea68b6e420c2",
        "calendarId": "8a7324f4-311d-43a8-a28f-87d9c424c354",
        "data": {
            "name": "PSG 2025-26",
            "image": "https://ipfs.bws.ninja/ipfs/QmQnRDsQPvNJ9RgT9bagHmCLQVxCyZxatkPpj3Avb1hsM8"
        }
  }
}

list_field-calendars

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

Request Body

Name
Type
Description

solution*

string

BWS.NFT.GameCube

operation*

string

list_field-calendars

parameters

JSON

check method parameters

list_field-calendars Method Parameters (optional)

Parameter
Type
Desciption

field_id

string

Field Id

list_field-calendars API Call Example

const axios = require('axios');

/* build request to use BWS Badges solution */
const request = {
{
  "solution": "BWS.NFT.GameCube",
  "operation": "list_field-calendars",
  "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_field-calendars Call Response

When the API call is successfully executed, it returns the calendars list linked to the provided field.

{
  "statusCode": 200,
  "info": {
    "calendars": [
            {
                "fieldId": "5a1486f3-753c-4194-b2d4-ea68b6e420c2",
                "calendarId": "8a7324f4-311d-43a8-a28f-87d9c424c354",
                "data": {
                    "name": "PSG 2025-26",
                    "image": "https://ipfs.bws.ninja/ipfs/QmQnRDsQPvNJ9RgT9bagHmCLQVxCyZxatkPpj3Avb1hsM8"
                }
            }
        ]
  }
}

delete_field-calendar

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

Request Body

Name
Type
Description

solution*

string

BWS.NFT.GameCube

operation*

string

delete_calendar

parameters*

JSON

check method parameters

delete_field-calendar Method Parameters

Parameter
Type
Desciption

fieldId

string

The Filed Id we used to create the relationship we want to delete.

calendarId

string

The Calendar Id we used to create the relatinship to delete.

delete_field-calendar API Call Example

const axios = require('axios');

/* build request to use BWS Badges solution */
const request = {
{
  "solution": "BWS.NFT.GameCube",
  "operation": "delete_calendar",
  "parameters":  {
     "fieldId": "5a1486f3-753c-4194-b2d4-ea68b6e420c2",
     "calendarId": "8a7324f4-311d-43a8-a28f-87d9c424c354"  
  }
}

/* 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-calendar Call Response

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

{
  "statusCode": 200
}

PreviousCubesNextMatch

Last updated 1 month ago

Was this helpful?