Skip to main content

POAPs

POAPs, or Proof of Attendant Protocol, is a specific type of non-fungible token that shows that you have attended an event. In essence they are a specific type of NFT with the particularity that they can only be transferred by the user who has created or minted them or in other words, more in web3 language, the user who has the minter role. This specialized API is designed for working with POAP tokens. With this API, you can effortlessly deploy POAP contracts, check token balances, retrieve token metadata URIs, find the owner of a specific POAP token, and perform token transfers. Utilize the power of POAPs to issue and manage unique event-based tokens on the blockchain. Let's get started!

Endpoints

Deploy

This endpoint deploys a POAP smart contract and mint the tokens (more than one), if it is needed in a single call.

The call that must be performed is:

POST https://api.vottun.tech/erc/v1/poap/deploy

Request

The request must include a json body with the following fields:

nametyperequireddescriptionexample
namestringyesThis field represents the name of the token.VottunPOAP
amountintyesThe amount of tokens that will be minted in the deployment.[10, 30, 80]
ipfsUristringyesThe base uri of the metadata for all the assets in the smart contract. Each asset will have its metadata assigned in ipfsUri/{tokenId}.jsonhttps://ipfsgw.vottun.tech/ipfs/bafkreiag3egtciz...6hh3aumr7ly
networkintyesThe chain id80001
gasLimitintnothe maximum amount of work you estimate a validator will do for the transaction. It this field is not set, the platform will estimate the gas in background before sending the transaction.4000000
aliasstringyesThis field represents an alias or a user-friendly nickname for the contract.My first POAP contract

With a body like this:

{
"name": "VottunPOAP",
"amount": 50,
"ipfsUri": "https://ipfsgw.vottun.tech/ipfs/bafkreifzkqw4b3v4pwunobgoporuqh3i7zwyasuxeme3jkch54y5ed2lmu",
"network": 80001,
"gasLimit": 5000000,
"alias": "My first POAP contract"
}

Response

It will return a json with the following fields:

nametypedescriptionexample
contractAddressstringThe contract Address0x62F0E381Cd7f3e856176a..2b9cB7Eb02856C511
txHashstringThe transaction Hash0x72f9f35c4fe92b6580..6db6719e903

Example

{
"contractAddress": "0x62F0E381Cd7f3e..b2b9cB7Eb02856C511",
"txHash": "0x72f9f35c4fe92b658..c5608c31df06807fc9f5e7243e6db6719e903"
}

Http status

resulthttp status
The smart contract transaction has been inserted succesfully201
The request does not include the correct information as per format or content400
The customer is not authorized401
There is an error with any of the vottun dependencies or with the customer (in this case contact with Vottun)503

Transfer

This endpoint transfers amount copies of an NFT to the given address. The operation is performed in the given contract and network and as it is mentioded before the operation can only be executed by the minter of the tokens. The call that must be performed is:

POST https://api.vottun.tech/erc/v1/poap/transfer

Request

The request must include a json body with the following fields:

nametyperequireddescriptionexample
contractAddressstringyesThis field represents represent the address of the contract.0x9b7127AfAE2cF200...65c5b03Ac9d291d9a90Dc
networkintyesThe chain id43113
tostringyesThis field is the account where the tokens are going to be sent.0xfE463ce3BFda970...C15547D0425D1332A8994a
idintyesThe id or the token that will be transfered.1

With a body like this:

{
"contractAddress": "0xD2C2EE38649E3725F754Fc8FdAAB8299eBF4D6D7",
"network": 43113,
"to": "0xc235ef36Ba17D7845E9A070cE40b8834f6204CDB",
"id": 1
}

Response

The transfer request will return a json with the following information:

nametypedescriptionexample
txHashstringThe transaction Hash0xb3ba0828ac232..63ddfef73b5d6860a82a6
nonceintthe transaction number from the accounth27

Example

{
"txHash": "0xb3ba0828ac232c48b69bb3..63ddfef73b5d6860a82a6",
"nonce": 27
}

Http status

resulthttp status
The transaction has been inserted succesfully201
The request does not include the correct information as per format or content400
The customer is not authorized401
There is an error with any of the vottun dependencies or with the customer (in this case contact with Vottun)503

Balance Of

This endpoint retrieves the amount of a specific NFT for the given address and smart contract, on the specified network. The call that must be performed is:

GET|POST https://api.vottun.tech/erc/v1/poap/balanceOf

Request

nametyperequireddescriptionexample
contractAddressstringyesThis field represents represent the address of the contract.0x9b7127AfAE2cF200...65c5b03Ac9d291d9a90Dc
networkintyesThe chain id43113
addressstringyesThis field represents the address where you wanted to know the amount of tokens it has.0xfE463ce3BFd..47D0425D1332A8994a
idintyesThe id of the token you wanted to know the amount that the given address has.3

With a body like this:

{
"contractAddress": "0xD2C2EE38649E3725F754Fc8FdAAB8299eBF4D6D7",
"network": 43113,
"address": "0x323d7A1A9EEECaE3966F59a370893cccE8Bb1f85",
"id":3
}

Response

The response will return a json object with the balance of the address we sent

Example

{
"balance": 9
}

Http status

resulthttp status
Information request is successful200
The request does not include the correct information as per format or content400
The customer is not authorized401

Token Uri

This endpoint retrieves the uri of the metadata of the given NFT from the given contract. Usually resolves to a JSON object that contains the information about the NFT. The call that must be performed is:

GET|POST https://api.vottun.tech/erc/v1/erc1155/tokenUri

Request

nametyperequireddescriptionexample
contractAddressstringyesThis field represents represent the address of the contract.0x9b7127AfAE2cF200...65c5b03Ac9d291d9a90Dc
networkintyesThe chain id43113
idintyesThe id of the token you wanted to know uri of the token.3

With a body like this:

{
"contractAddress": "0xD2C2EE38649E3725F754Fc8FdAAB8299eBF4D6D7",
"network": 43113,
"id": 3
}

Response

The response will uri of the given token id

Example

{
"uri": "https://ipfsgw.vottun.tech/ipfs/bafkreiag3egtcizssi6p2g4mczednwdhba5vriqf2rlhnry6hh3aumr7ly/1.json"
}

Http status

resulthttp status
Information request is successful200
The request does not include the correct information as per format or content400
The customer is not authorized401