HashCase Developer API (1.0.0)

Download OpenAPI specification:Download

HashCase Developer Support: developer@hashcase.co

HashCase Developer API allows you to seamlessly integrate and distribute NFTs and digital assets on various blockchains, whithout the need to integrate any additional blockchain infrastructure. It allows you to focus on your core business offerings, and making the most out of the digital assests ecosystem, while letting HashCase handle all the complexities of blockchain infrastructure.

Collections

A collection is a set of NFTs that are created and managed by the owner. Collections can be created on different blockchains and can have different standards. They can be used to group NFTs based on different themes, categories, or any other criteria. You can create and manage collections on the HashCase owner platform and distribute them using the HashCase Developer API. You'll only have access to the collections that you own. Each collection has a unique ID, name, description, image_uri and on-chain details such as chain type, chain ID, contract address, and standard.

Get all my collections

Get a list of all collections created by the owner.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get collection by ID

Get a collection by ID.

query Parameters
collectionId
required
string

Collection ID

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "chain_type": "string",
  • "chain_id": "string",
  • "contract_address": "string",
  • "standard": "string",
  • "image_uri": "string"
}

Items

An item is a unique digital asset that is part of a collection. You can create and manage items on the HashCase owner platform and distribute them using the HashCase Developer API. You'll only have access to the items of the collections that you own. Each item has a unique ID, name, description, image_uri, collection_id, token_id, and attributes.

Get all items of my collections

Get a list of all items in all collections created by the owner.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get items of a collection

Get a list of all items in a collection.

query Parameters
collectionId
required
string

Collection ID

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get item by ID

Get an item by ID.

query Parameters
itemId
required
string

Item ID

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "image_uri": "string",
  • "collection_id": "string",
  • "token_id": "string",
  • "claimable": true,
  • "attributes": { }
}

User

To authenticate a user, you need to redirect to HashCase's Verification URL, and provide a callback URL where the user will be redirected after the verification process is complete. After the user is verified, you will receive a Bearer Token that you can use to authenticate the user for all the operations related to the user. The bearer token expires every 30 minutes, and you need to redirect the user to the verification URL again to get a new token. Each user has a unique ID, profile, email, and wallet addresses for Ethereum, FVM and any other supported blockchains.

Get user details

Get user details.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "profile": {
    },
  • "email": "string",
  • "eth_wallet_address": "string",
  • "fvm_wallet_address": "string"
}

Get user items

Get a list of all my items owned by the user.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

NFTs

NFTs are unique digital assets that are owned by the user. These are asset level representations of items that are part of a collection. You can mint, transfer, and upgrade NFTs using the HashCase Developer API. Each NFT has a userId and itemId.

Get user NFTs

Get a list of all my NFTs and their amounts owned by the user.

Responses

Response samples

Content type
application/json
{
  • "itemId_1": 1,
  • "itemId_2": 2
}

Mint NFT to user

Mint an NFT of given Item ID to the user's wallet.

Request Body schema: application/json
itemId
required
string

Item ID

amount
required
number

Amount

Responses

Request samples

Content type
application/json
{
  • "itemId": "string",
  • "amount": 1
}

Response samples

Content type
application/json
{
  • "transactionHash": "string",
  • "tokenId": "string"
}

Transfer NFT of a user

Transfer an NFT of given Item ID to a given wallet address.

Request Body schema: application/json
itemId
required
string

Item ID

amount
required
number

Amount

toWalletAddress
string

Receiver Wallet Address

Responses

Request samples

Content type
application/json
{
  • "itemId": "string",
  • "amount": 1,
  • "toWalletAddress": "string"
}

Response samples

Content type
application/json
{
  • "transactionHash": "string",
  • "tokenId": "string"
}

Set approval for NFT of a user

Set approval for an NFT of given Item ID to a given wallet address.

Request Body schema: application/json
itemId
required
string

Item ID

amount
required
number

Amount

toWalletAddress
string

Receiver Wallet Address

Responses

Request samples

Content type
application/json
{
  • "itemId": "string",
  • "amount": 1,
  • "toWalletAddress": "string"
}

Response samples

Content type
application/json
{
  • "transactionHash": "string",
  • "tokenId": "string"
}

TokenGating

TokenGating is a mechanism to check if the user has a specific item or the amount of a specific item. This can be used to gate access to certain features or content based on the user's ownership of specific items. For example, you can use TokenGating to check if the user has a specific NFT to allow access to a specific feature or content. You can also use TokenGating to check the amount of a specific NFT to allow access to a specific feature or content. This can be used to create a variety of features such as access control, loyalty programs, and more.

Check if user has item

Check if the user has the given item.

query Parameters
itemId
required
string

Item ID

Responses

Response samples

Content type
application/json
false

Get amount of item

Get the amount of the given item owned by the user.

query Parameters
itemId
required
string

Item ID

Responses

Response samples

Content type
application/json
5

Loyalty Points

Loyalty Points are a mechanism to reward users based on their ownership of specific items. These can be set up for each item and collection on the HashCase owner platform. You can use Loyalty Points to create a variety of features such as loyalty programs, rewards, and more.

Each Loyalty class has a unique code for a given owner, and contains a value and type. Negative values can be used for redemption of points. Types can be as simple as points to complex as recurring points and badges. Loyalty points can also be added to individual user for your organization. These won't be visible to other organizations, but will be visible to you and the user.

Loyalty data is a list of codes that the user has earned. You can use this data to check if the user has earned a specific code, and then reward them accordingly. It is sequential and can be used to track user progress.

Get user loyalty data

Get the entire loyalty data of the user for your organization.

Responses

Response samples

Content type
application/json
[
  • "CODE1",
  • "CODE2",
  • "CODE3"
]

Get user loyalty points

Get the total loyalty points of the user for all of your collections.

Responses

Response samples

Content type
application/json
{
  • "points": 100
}

Set user loyalty data

Set the loyalty data of the user for your organization.

Request Body schema: application/json
loyaltyData
required
Array of strings

Loyalty Data

Responses

Request samples

Content type
application/json
{
  • "loyaltyData": [
    ]
}

Add user loyalty points

Add loyalty points to the user for all of your collections.

Request Body schema: application/json
code
string

Code

Responses

Request samples

Content type
application/json
{
  • "code": "REDEEM_#123"
}

Upgradable NFTs

Upgradable NFTs are a mechanism to upgrade an NFT of a lower level item to that of a higher level item. This can be set up for each collection on the HashCase owner platform. You can use Upgradable NFTs to create a variety of features such as upgradable items, leveling up, and more. An upgrade is not reversible, and the lower level item is transferred to the owner's wallet when an upgrade is performed.

Get user upgradable NFTs

Get a list of all upgradable NFTs owned by the user.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Upgrade NFT of a user

Upgrade an NFT of given Item ID to that of a higher level item.

Request Body schema: application/json
itemId
required
string

Item ID

steps
required
number

Steps to upgrade

amount
required
number

Amount

Responses

Request samples

Content type
application/json
{
  • "itemId": "string",
  • "steps": 0,
  • "amount": 1
}

Response samples

Content type
application/json
{
  • "transactionHash": "string",
  • "tokenId": "string"
}

Photo NFTs

Photo NFTs are a mechanism to mint an NFT from a photo to the user's wallet. This can be set up for a 721 collection on the HashCase owner platform. You will need to provide the photo and the collection ID of the 721 contract to mint a photo NFT. The image will be stored on IPFS.

Get user photo NFTs

Get a list of all photo NFTs owned by the user.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Mint Photo NFT

Mint a photo NFT from the given photo and mint it to the user's wallet.

Request Body schema: application/json
photo
required
string

Photo

collectionId
required
string

Collection ID of 721 Contract

Responses

Request samples

Content type
application/json
{
  • "photo": "string",
  • "collectionId": "string"
}

Response samples

Content type
application/json
{
  • "transactionHash": "string",
  • "tokenId": "string"
}

Free Claim/Mint

A free claim/mint link is a unique link that can be used to claim/mint an NFT for free. This comes in handy when you want to air-drop NFTs to a specific set of emails. HashCase will generate a unique link for each email, which you can then mail to the users. The email user can use the link to claim/mint the NFT to their wallet on the HashCase user platform.

Get all free claims/mints

Get a list of all free claims/mints created by the owner.

Responses

Response samples

Content type
application/json
[]

Generate free claim/mint link

Generate a free claim/mint link for the given item.

Request Body schema: application/json
itemId
required
string

Item ID

Responses

Request samples

Content type
application/json
{
  • "itemId": "string"
}

Response samples

Content type
application/json

Paid Claim/Mint

A paid claim/mint link is a unique link that can be used to claim/mint an NFT for a specific amount. HashCase user platform already has payment integrations, allowing you to sell NFTs directly to the users without any hassle. You can generate a paid claim/mint link for the given item and amount, and share it with an email. The email user can use the link to claim/mint the NFT to their wallet on the HashCase user platform.

Get all paid claims/mints

Get a list of all paid claims/mints created by the owner.

Responses

Response samples

Content type
application/json
[]

Generate paid claim/mint link

Generate a paid claim/mint link for the given item and amount.

Request Body schema: application/json
itemId
required
string

Item ID

amount
required
number

Amount

Responses

Request samples

Content type
application/json
{
  • "itemId": "string",
  • "amount": 1
}

Response samples

Content type
application/json