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
new_match-prize
POST
https://api.bws.ninja/v1/call
Request Body
solution*
string
BWS.NFT.GameCube
operation*
string
new_match-prize
parameters*
JSON
check method parameters
new_match-prize Method Parameters
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
solution*
string
BWS.NFT.GameCube
operation*
string
list_match-prizes
parameters*
JSON
check method parameters
list_match-prizes Method Parameters (optional)
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
solution*
string
BWS.NFT.GameCube
operation*
string
update-match-prize
parameters*
JSON
check method parameters
update_match-prize Method Parameters
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
solution*
string
BWS.NFT.GameCube
operation*
string
delete_match-prize
parameters*
JSON
check method parameters
delete_match-prize Method Parameters
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
}
Last updated
Was this helpful?