Update an NFT
Partial Update an NFT
Example
curl --location --request PATCH 'https://dev.underdogprotocol.com/v2/projects/n/4/nfts/1' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"attributes": {
"points": "40000"
}
}'
const axios = require('axios');
let data = JSON.stringify({
"attributes": {
"points": "40000"
}
});
let config = {
method: 'patch',
url: 'https://dev.underdogprotocol.com/v2/projects/n/4/nfts/1',
headers: {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Response
{
"id": 1,
"status": "confirmed",
"mintAddress": "Dic1tC9yBhaDerQpV8ZBAsruBUKQsRWtCWysG965ADWi",
"name": "LeGoat",
"image": "https://underdog-test-bucket-dev.s3.amazonaws.com/Dic1tC9yBhaDerQpV8ZBAsruBUKQsRWtCWysG965ADWi/image.png",
"attributes": {
"points": "40000"
}
}
Update an NFT
Example
curl --location --request PUT 'https://dev.underdogprotocol.com/v2/projects/n/4/nfts/1' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "LeKareem",
"image": "https://upload.wikimedia.org/wikipedia/commons/a/a0/Kareem_Abdul-Jabbar_May_2014.jpg",
"attributes": {
"points": "40000"
}
}'
const axios = require('axios');
let data = JSON.stringify({
"name": "LeKareem",
"image": "https://upload.wikimedia.org/wikipedia/commons/a/a0/Kareem_Abdul-Jabbar_May_2014.jpg",
"attributes": {
"points": "40000"
}
});
let config = {
method: 'put',
url: 'https://dev.underdogprotocol.com/v2/projects/n/4/nfts/1',
headers: {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Response
{
"id": 1,
"status": "confirmed",
"mintAddress": "Dic1tC9yBhaDerQpV8ZBAsruBUKQsRWtCWysG965ADWi",
"name": "LeGoat",
"image": "https://underdog-test-bucket-dev.s3.amazonaws.com/Dic1tC9yBhaDerQpV8ZBAsruBUKQsRWtCWysG965ADWi/image.png",
"attributes": {
"points": "40000"
}
}
Last updated