Zelus Labs API
  • Welcome!
  • Features
  • Quick Start
  • Reference
    • OpenAPI
    • Account API
      • Account Status
      • Account Contracts
    • Wallet API
      • Wallet Create
      • Wallet Balance
      • Wallet NFTs
    • NFT API
      • Minting an NFT
      • Get NFT metadata
Powered by GitBook
On this page
  • Endpoint Details
  • Examples
  • Notes

Was this helpful?

  1. Reference
  2. Account API

Account Contracts

PreviousAccount StatusNextWallet API

Last updated 1 year ago

Was this helpful?

The getAccountContracts API method provides the client with a list of available NFT smart contracts that can be used with the Wallet and Minting APIs. Need to have NFT contracts set up, or want to add your own? .

Endpoint Details

Description
Data

API Name

HTTP Method

GET

URL

/v1/account/contracts

Headers

Key
Value

Content-Type

application/json

x-api-key

API_KEY

Parameters

There are no parameters required for this request.

The response will contain a list of available NFT contracts.

{
    result: {
        contracts: [
            {
                id:   string, // id of contract, form "contract_UUID"
                name: string  // name of contract
            },
        ]
    } | error?: IResponseError   // Optional error information
}

Success response example

{
    "result": {
        "contracts": [
            {
                "id": "contract_6635e90e-31f0-11ee-be56-0242ac120002",
                "name": "DEMO_DIGITAL_COLLECTIBLES"
            },
        ]
    }
}

Error messages

  • Invalid API Key

    • { "code: 401, "message": "Invalid api key" }

Examples

curl -X GET 'https://sandbox.api.labs.zelus.io/v1/account/contracts' \
     -H "x-api-key: YOUR_API_KEY"
import requests

url = "https://sandbox.api.labs.zelus.io/v1/account/contracts"
headers = {
    "x-api-key": "YOUR_API_KEY"
}

response = requests.get(url, headers=headers)
contracts = response.json()['result']['contracts'] # Parsing response

for contract in contracts:
    print(f"Contract ID: {contract['id']}")
    print(f"Contract Name: {contract['name']}\n")
const axios = require('axios');

const url = "https://sandbox.api.labs.zelus.io/v1/account/contracts";
const headers = {
    "x-api-key": "YOUR_API_KEY"
};

axios.get(url, { headers: headers }).then(response => {
    const contracts = response.data.result.contracts; // Parsing response
    
    contracts.forEach(contract => {
        console.log(`Contract ID: ${contract.id}`);
        console.log(`Contract Name: ${contract.name}\n`);
    });
}).catch(error => {
    console.error('Error:', error.response.data);
});

Notes

  • The request to this endpoint does not require any specific parameters or form-data.

  • The response will contain a list of active NFT contracts available for the customer. If an error occurs, an IResponseError object may be included in the response.

Reach out to us
getAccountContracts