Update a Project
Partial Update an Project
Example
curl --location --request PATCH 'https://dev.underdogprotocol.com/v2/projects/n/1' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
"image": "https://assets.pokemon.com/assets/cms2/img/pokedex/full/005.png"
}'
const axios = require('axios');
let data = JSON.stringify({
"image": "https://assets.pokemon.com/assets/cms2/img/pokedex/full/005.png"
});
let config = {
method: 'patch',
url: 'https://dev.underdogprotocol.com/v2/projects/n/1',
headers: {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Response
{
"id": 1,
"status": "confirmed",
"mintAddress": "6ntqAJmmkJup9h9EX3B5vETCj6ZYhZNfmQ6Rqm2myGmE",
"name": "Underdogs",
"description": "Pokemnon",
"image": "https://underdog-test-bucket-dev.s3.amazonaws.com/6ntqAJmmkJup9h9EX3B5vETCj6ZYhZNfmQ6Rqm2myGmE/image.png"
}
Update a Project
Example
curl --location --request PUT 'https://dev.underdogprotocol.com/v2/projects/n/1' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
"image": "https://assets.pokemon.com/assets/cms2/img/pokedex/full/005.png",
"description": "Pokemnon"
}'
const axios = require('axios');
let data = JSON.stringify({
"image": "https://assets.pokemon.com/assets/cms2/img/pokedex/full/005.png",
"description": "Pokemnon"
});
let config = {
method: 'put',
url: 'https://dev.underdogprotocol.com/v2/projects/n/1',
headers: {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Response
{
"id": 1,
"status": "confirmed",
"mintAddress": "6ntqAJmmkJup9h9EX3B5vETCj6ZYhZNfmQ6Rqm2myGmE",
"name": "Underdogs",
"description": "Pokemnon",
"image": "https://underdog-test-bucket-dev.s3.amazonaws.com/6ntqAJmmkJup9h9EX3B5vETCj6ZYhZNfmQ6Rqm2myGmE/image.png"
}
Update Name & Symbol
Update Project Name
Example
curl --location --request PUT 'https://dev.underdogprotocol.com/v2/projects/n/1/name' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
"name": "Project"
}'
const axios = require('axios');
let data = JSON.stringify({
"name": "Project"
});
let config = {
method: 'put',
url: 'https://dev.underdogprotocol.com/v2/projects/n/1/name',
headers: {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Response
{
"transactionId": "b8bde20a-a689-4ce7-9199-b5e4ca08e1cc",
"projectId": 1,
"transferable": false,
"mintAddress": "6ntqAJmmkJup9h9EX3B5vETCj6ZYhZNfmQ6Rqm2myGmE"
}
Update Project Symbol
Example
curl --location --request PUT 'https://dev.underdogprotocol.com/v2/projects/n/1/symbol \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
"symbol": "TEST"
}'
const axios = require('axios');
let data = JSON.stringify({
"symbol": "TEST"
});
let config = {
method: 'put',
url: 'https://dev.underdogprotocol.com/v2/projects/n/1/symbol',
headers: {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Response
{
"transactionId": "b8bde20a-a689-4ce7-9199-b5e4ca08e1cc",
"projectId": 1,
"transferable": false,
"mintAddress": "6ntqAJmmkJup9h9EX3B5vETCj6ZYhZNfmQ6Rqm2myGmE"
}
Last updated