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_match-prize
  • Request Body
  • new_match-prize API Call Example
  • list_match-prizes
  • Request Body
  • list_match-prizes API Call Example
  • update_match-prize
  • Request Body
  • update_match-prize API Call Example
  • delete_match-prize
  • Request Body
  • delete_match-prize API Call Example

Was this helpful?

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

Prizes

A Prize represents a reward asset or benefit that users can receive based on their CUBE performance, in a specific Match (or Season). It can be a digital NFT, a token bonus, a physical good, or an experience, configurable by the solution owner to drive fan engagement and incentivize Cube ownership. Examples:

  • Signed Merchandise

  • VIP Match Tickets

  • Zoom Call or AMA with an Athlete

  • Bonus $BWS Tokens

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_match-prize

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

Request Body

Name
Type
Description

solution*

string

BWS.NFT.GameCube

operation*

string

new_match-prize

parameters*

JSON

check method parameters

new_match-prize Method Parameters

Parameter
Type
Desciption

matchId*

string

The Match Id we want to assign the prize.

calendarId*

string

Calendar Id of the match.

position*

number

1, 2 or 3 for first, second and third prize.

name*

string

The prize name (e.g. FODEN SIGNED FRAME)

description*

string

Prize description (e.g. Phil Foden, known for his incredible..)

snapshot*

string

An image base64 encoded string to announce the match.

htmlDescription

string

The HTML description of the prize (e.g. <div><p>The ...)

image1

string

An image base64 encoded string.

image2

string

An image base64 encoded string.

image3

string

An image base64 encoded string.

new_match-prize API Call Example

const axios = require('axios');

/* build request to use BWS Badges solution */
const request = {
{
  "solution": "BWS.NFT.GameCube",
  "operation": "new_match-prize",
  "parameters":  {
      "matchId": "e16d3f98-4eeb-44b9-837c-eddbbfe305ee",
      "calendarId": "8a7324f4-311d-43a8-a28f-87d9c424c354",
      "position": 1,
      "name": "FODEN SIGNED FRAME",
      "description": "Phil Foden, known for his incredible ...",
      "snapshot": "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_match-prize Call Response

When the API call is successfully executed, it returns the prizeId for the newly created prize.

{
  "statusCode": 200,
  "info": {
       "prizeId": "b6ec4971-b573-4bfc-981c-582a33006abf"
  }
}

list_match-prizes

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_match-prizes Method Parameters (optional)

Parameter
Type
Desciption

matchId

string

The Match Id we want to list the prizes.

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_match-prizes",
  "parameters":  {
      "matchId": "e16d3f98-4eeb-44b9-837c-eddbbfe305ee"  
  }
}

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

When the API call is successfully executed, it returns the match prizes, including the image IPFS url.

{
  "statusCode": 200,
  "info": {
   "prizes": [
        {
            "prizeId": "b6ec4971-b573-4bfc-981c-582a33006abf",
            "matchId": "e16d3f98-4eeb-44b9-837c-eddbbfe305ee",
            "position": "3",
            "calendarId": "8a7324f4-311d-43a8-a28f-87d9c424c354",
            "data": {
                "name": "FODEN SIGNED FRAME",
                "description": "Phil Foden, known for his incredible skill, vision, and versatility, has dazzled fans and critics alike with his breathtaking performances.",
                "snapshot": "https://ipfs.bws.ninja/ipfs/QmSg27Xz3yWva6yM9Agn7JWYVyKH35uVdaUHe58Jhnks9a"
            }
        }
    ]
  }
}

update_match-prize

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

Request Body

Name
Type
Description

solution*

string

BWS.NFT.GameCube

operation*

string

update-match-prize

parameters*

JSON

check method parameters

update_match-prize Method Parameters

Parameter
Type
Desciption

matchId*

string

The Match Id we want to assign the prize.

calendarId*

string

Calendar Id of the match.

prizeId*

string

The prize Id you get when creating a new match prize.

name

string

The prize name (e.g. FODEN SIGNED FRAME)

description

string

Prize description (e.g. Phil Foden, known for his incredible..)

snapshot

string

An image base64 encoded string to announce the match.

htmlDescription

string

The HTML description of the prize (e.g. <div><p>The ...)

image1

string

An image base64 encoded string.

image2

string

An image base64 encoded string.

image3

string

An image base64 encoded string.

update_match-prize API Call Example

const axios = require('axios');

/* build request to use BWS Badges solution */
const request = {
{
  "solution": "BWS.NFT.GameCube",
  "operation": "update_match-prize",
  "parameters":  {
     "prizeId": "b6ec4971-b573-4bfc-981c-582a33006abf",
     "matchId": "e16d3f98-4eeb-44b9-837c-eddbbfe305ee",
     "calendarId": "8a7324f4-311d-43a8-a28f-87d9c424c354",
     "htmlDescription": "<div><p>The .. "
  }
}

/* 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_match-prize

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

Request Body

Name
Type
Description

solution*

string

BWS.NFT.GameCube

operation*

string

delete_match-prize

parameters*

JSON

check method parameters

delete_match-prize Method Parameters

Parameter
Type
Desciption

prizeId

string

The Prize Id to delete.

delete_match-prize API Call Example

const axios = require('axios');

/* build request to use BWS Badges solution */
const request = {
{
  "solution": "BWS.NFT.GameCube",
  "operation": "delete_match-prize",
  "parameters":  {
     "prizeId": "b6ec4971-b573-4bfc-981c-582a33006abf"
  }
}

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

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

{
  "statusCode": 200
}

PreviousMatchNextEvent Types

Last updated 1 month ago

Was this helpful?