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
        • BYOK (X API Token)
      • How does it work?
      • Commands
Powered by GitBook
On this page
  • new_event-type
  • Request Body
  • new_event-type API Call Example
  • list_event-types
  • Request Body
  • list_match-prizes API Call Example
  • update_event-type
  • Request Body
  • update_event-type API Call Example
  • delete_event-type
  • Request Body
  • delete_event-type API Call Example

Was this helpful?

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

Event Types

Defines in-game occurrences like goals, assists, or plays.

Events are registered with spatial coordinates and timestamps, affecting cube owners whose zones match the action location.

Examples:

  • Pass

  • Goal

new_event-type

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

Request Body

Name
Type
Description

solution*

string

BWS.NFT.GameCube

operation*

string

new_event-type

parameters*

JSON

check method parameters

new_event-type Method Parameters

Parameter
Type
Desciption

fieldId

string

The Match Id we want to assign the prize.

eventTypeName

string

The event type name (e.g. "pass").

eventTypePoints

string

The number of points to assign when the event is detected on a specific cube (e.g. "100").

new_event-type API Call Example

const axios = require('axios');

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

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

When the API call is successfully executed, it returns the evenTypeIdfor the newly created event type (to be used when registering events).

{
  "statusCode": 200,
  "info": {
       "eventTypeId": "34339c99-43cf-4fe9-b632-4f8606e3c1bc"
  }
}

list_event-types

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

Request Body

Name
Type
Description

solution*

string

BWS.NFT.GameCube

operation*

string

list_match-prizes

parameters*

JSON

check method parameters

list_event-types Method Parameters (optional)

Parameter
Type
Desciption

fieldId

string

The Field Id to get the list of events.

list_match-prizes API Call Example

const axios = require('axios');

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

When the API call is successfully executed, it returns the field available events.

{
  "statusCode": 200,
  "info": {
    "eventTypes": [
        {
            "fieldId": "5a1486f3-753c-4194-b2d4-ea68b6e420c2",
            "eventTypeId": "34339c99-43cf-4fe9-b632-4f8606e3c1bc",
            "eventTypeName": "pass",
            "eventTypePoints": "100"
        }
    ]
  }
}

update_event-type

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

Request Body

Name
Type
Description

solution*

string

BWS.NFT.GameCube

operation*

string

update_event-type

parameters*

JSON

check method parameters

update_event-type Method Parameters

Parameter
Type
Desciption

eventTypeId

string

The Event Type Id we want to update the assigned points.

fieldId

string

The Field Id the event is linked to.

eventTypePoints

string

The new number points assigned to the event (e.g. "1000")

update_event-type API Call Example

const axios = require('axios');

/* build request to use BWS Badges solution */
const request = {
{
  "solution": "BWS.NFT.GameCube",
  "operation": "update_event-type",
  "parameters":  {
     "eventTypdId": "34339c99-43cf-4fe9-b632-4f8606e3c1bc",
     "fieldId": "5a1486f3-753c-4194-b2d4-ea68b6e420c2",
     "eventTypePoints": "1000"
  }
}

/* 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);
  });

update_match-prize Call Response

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

{
  "statusCode": 200
}

delete_event-type

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

Request Body

Name
Type
Description

solution*

string

BWS.NFT.GameCube

operation*

string

delete_event-type

parameters*

JSON

check method parameters

delete_event-type Method Parameters

Parameter
Type
Desciption

eventTypeId

string

The Event Type Id if the event we want to delete.

fieldId

string

The Field Id the event is linked to.

delete_event-type API Call Example

const axios = require('axios');

/* build request to use BWS Badges solution */
const request = {
{
  "solution": "BWS.NFT.GameCube",
  "operation": "delete_event-type",
  "parameters":  {
     "eventTypdId": "34339c99-43cf-4fe9-b632-4f8606e3c1bc",
     "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_event-type Call Response

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

{
  "statusCode": 200
}

PreviousPrizesNextLive Events

Last updated 1 month ago

Was this helpful?