Introduction

API Documentation of Thetokenlist

Base url : https://api-dev.thetokenlist.com/graphql/nft-middleware

Admin

All the APIs related to admin goes here


Login

This API is for login to admin account


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/admin
GRAPHQLstringQUERY
content-typestringJSONapplication/json

Request

{
  admin_login(email: "nftadmin@gmail.com", password: "nftadmin@123") {
    message
    token
  }
}



Request Parameters

FieldsTypeDescriptionRequired
emailstringemail of the admin
passwordstringpassword of the admin

Success

{
    "data": {
        "admin_login": {
            "message": "Login success",
            "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiYWRtaW4iLCJhY2NvdW50VHlwZSI6ImFkbWluIiwiaWF0IjoxNjUyMzI4MjAyLCJleHAiOjE2NTIzNDk4MDJ9.qPBFexWB-bYK3P5o9SvoJIiUABnJJ80baKqfw8Uj6Hw"
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Incorrect email address",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["admin_login"]
        }
    ],
    "data": {
        "admin_login": null
    }
}


{
    "errors": [
        {
            "message": "Incorrect password",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["admin_login"]
        }
    ],
    "data": {
        "admin_login": null
    }
}

Fetch All Creators

This API is for to get list of all creators


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/admin
GRAPHQLstringQUERY
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokenadmin token

Request

{
  list_all_creators(page_size: 10, page_number: 1) {
    message
    data {
      _id
      name
      email
      img
      wallet_id {
        _id
        wallet_id
      }
    }
    hasMore
  }
}


Request Parameters

FieldsTypeDescriptionRequired
page_sizeintegertotal number of data to be displayed
page_numberintegerpage number to filter data

Success

{
    "data": {
        "list_all_creators": {
            "message": "data listed",
            "data": [
                {
                    "_id": "62299c9254f6c2bcd4b2f09a",
                    "name": "Sachin T S",
                    "email": "sachinsuresh704@gmail.com",
                    "img": null,
                    "wallet_id": {
                        "_id": "6229df0fcb68a946e41b8421",
                        "wallet_id": "EnbSFnpMCQz7NzmfuKpPF1u4B8htaA19iYVkkrJi1aPy"
                    }
                },
                {
                    "_id": "62469e32f63e08df6e01159f",
                    "name": "jimshad",
                    "email": "jimshaddb@gmail.com",
                    "img": null,
                    "wallet_id": {
                        "_id": "6246b6eef63e08baf90115b8",
                        "wallet_id": "HrVUNq8PyKwym8dTwdBe7gHmaV3UWBkxztmBttHKPQX3"
                    }
                }
            ],
            "hasMore": false
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["list_all_creators"]
        }
    ],
    "data": {
        "list_all_creators": null
    }
}

Fetch All NFTs

This API is for to get list of all NFts


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/admin
GRAPHQLstringQUERY
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokenadmin token

Request

{
  list_all_nfts(page_size: 10, page_number: 1, status: "all", creator: "") {
    message
    data {
      _id
      name
      description
      art_url
      royalty_percentage
      nft_id
      status
      is_sold
      creator_id {
        _id
        name
        email
      }
    }
    hasMore
  }
}



Request Parameters

FieldsTypeDescriptionRequired
page_sizeintegertotal number of data to be displayed
page_numberintegerpage number to filter data
statusstringto filter data based on NFT status
creatorstring_id of the creator to get NFTs created by the given creator

Success

{
    "data": {
        "list_all_nfts": {
            "message": "data listed",
            "data": [
                {
                    "_id": "624fbdc6521415d06a5087cc",
                    "name": "Boy",
                    "description": "Cartoon character",
                    "art_url": "https://nft-store-assets.s3.amazonaws.com/4eb0dd60-597c-4291-b19e-75e6e378289d.png",
                    "royalty_percentage": 0,
                    "nft_id": "FWz7BCZvkJiib9K7NuNGaH12xa51ggZesoqENaM7We9L",
                    "status": "sold",
                    "is_sold": true,
                    "creator_id": {
                        "_id": "62299c9254f6c2bcd4b2f09a",
                        "name": "Sachin T S",
                        "email": "sachinsuresh704@gmail.com"
                    }
                },
                {
                    "_id": "624fbf7a52141537ef508815",
                    "name": "Man with Glasses",
                    "description": "Man cartoon",
                    "art_url": "https://nft-store-assets.s3.amazonaws.com/2c408c83-0000-48fe-9ea5-d60c4251e360.png",
                    "royalty_percentage": 1,
                    "nft_id": "56QzcVEztAGFXr17ow3SBvmPvt7rKaQzMN8d4Ny3zzSo",
                    "status": "sold",
                    "is_sold": true,
                    "creator_id": {
                        "_id": "62299c9254f6c2bcd4b2f09a",
                        "name": "Sachin T S",
                        "email": "sachinsuresh704@gmail.com"
                    }
                }
            ],
            "hasMore": true
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["list_all_nfts"]
        }
    ],
    "data": {
        "list_all_nfts": null
    }
}

Fetch All Wallets

This API is for to get list of all wallets


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/admin
GRAPHQLstringQUERY
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokenadmin token

Request

{
  list_all_wallets(page_size: 2, page_number: 1) {
    message
    data {
      _id
      wallet_id
      is_linked
      user_id {
        _id
        name
        email
      }
    }
    hasMore
  }
}


Request Parameters

FieldsTypeDescriptionRequired
page_sizeintegertotal number of data to be displayed
page_numberintegerpage number to filter data

Success

{
    "data": {
        "list_all_wallets": {
            "message": "data listed",
            "data": [
                {
                    "_id": "62579d28ba8a2b819c325d94",
                    "wallet_id": "4nWNM7zdy9gtgpiURL1e9e8SmEneUHGx3qnEnqWBF5Qr",
                    "is_linked": true,
                    "user_id": {
                        "_id": "624fcb2b521415c21a508ac5",
                        "name": "Nicky Jacob",
                        "email": "nickyjacob@gmail.com"
                    }
                },
                {
                    "_id": "6246b6eef63e08baf90115b8",
                    "wallet_id": "HrVUNq8PyKwym8dTwdBe7gHmaV3UWBkxztmBttHKPQX3",
                    "is_linked": true,
                    "user_id": {
                        "_id": "62469e32f63e08df6e01159f",
                        "name": "jimshad",
                        "email": "jimshaddb@gmail.com"
                    }
                }
            ],
            "hasMore": true
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["list_all_wallets"]
        }
    ],
    "data": {
        "list_all_wallets": null
    }
}

Fetch Ledger Wallet Details

This API is for to get details of the ledger wallet


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/admin
GRAPHQLstringQUERY
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokenadmin token

Request

{
  list_ledger_details {
    wallet_address
    wallet_balance
  }
}


Success

{
    "data": {
        "list_ledger_details": {
            "wallet_address": "HMo5HENvpN42pBoeXLG5kwHa4XTBdjxUmkPYTyQjNkft",
            "wallet_balance": 23.3
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 2
                }
            ],
            "path": ["list_ledger_details"]
        }
    ],
    "data": {
        "list_ledger_details": null
    }
}

Fetch All NFT Types

This API is for to get list of all NFT types


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/admin
GRAPHQLstringQUERY
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokenadmin token

Request

{
  list_all_nft_types(page_size: 10, page_number: 1) {
    message
    data {
      _id
      name
      description
      qr_based
      is_visible
    }
    hasMore
  }
}

Request Parameters

FieldsTypeDescriptionRequired
page_sizeintegertotal number of data to be displayed
page_numberintegerpage number to filter data

Success

{
    "data": {
        "list_all_nft_types": {
            "message": "data listed",
            "data": [
                {
                    "_id": "62edda58bdeee16f97d14b18",
                    "name": "equity shares",
                    "description": "secondary marketplace for buyers and sellers of India’s hottest startups and privately held companies",
                    "qr_based": true,
                    "is_visible": true
                },
                {
                    "_id": "62edd8f7bdeee1d2bbd14b0a",
                    "name": "agriculture land",
                    "description": "Marketplace to make food trade easy, fast and transparent",
                    "qr_based": true,
                    "is_visible": true
                },
                {
                    "_id": "62edd7eebdeee110dcd14b00",
                    "name": "event tickets",
                    "description": "Buy and sell tickets online for concerts, sports, theater, family and other events near you.",
                    "qr_based": true,
                    "is_visible": true
                }
            ],
            "hasMore": false
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["list_all_nft_types"]
        }
    ],
    "data": {
        "list_all_nft_types": null
    }
}

Fetch NFT Type Details

This API provides information about NFT type


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/admin
GRAPHQLstringQUERY
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokenadmin token

Request

{
  list_nft_type_details(_id: "62edda58bdeee16f97d14b18") {
    message
    data {
      _id
      name
      description
      qr_based
      is_visible
      fields {
        _id
        min
        max
        is_visible
        is_nft_name
      }
    }
  }
}

Request Parameters

FieldsTypeDescriptionRequired
_idstring_id of the NFT type

Success

{
    "data": {
        "list_nft_type_details": {
            "message": "data listed",
            "data": {
                "_id": "62edda58bdeee16f97d14b18",
                "name": "equity shares",
                "description": "secondary marketplace for buyers and sellers of India’s hottest startups and privately held companies",
                "qr_based": true,
                "is_visible": true,
                "fields": [
                    {
                        "_id": "62edda58bdeee1af4ad14b19",
                        "name": "company_name",
                        "type": "text",
                        "min": null,
                        "max": null,
                        "is_visible": true,
                        "is_nft_name": true
                    },
                    {
                        "_id": "62edda58bdeee10b38d14b1a",
                        "name": "company_type",
                        "type": "text",
                        "min": null,
                        "max": null,
                        "is_visible": true,
                        "is_nft_name": false
                    },
                    {
                        "_id": "62edda58bdeee1e4d9d14b1b",
                        "name": "company_id",
                        "type": "text",
                        "min": null,
                        "max": null,
                        "is_visible": true,
                        "is_nft_name": false
                    }
                ]
            }
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["list_nft_type_details"]
        }
    ],
    "data": {
        "list_nft_type_details": null
    }
}

Add New Creator

This API is for to add a new creator


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/admin
GRAPHQLstringMUTATION
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokenadmin token

Request

mutation {
  add_new_creator(name: "sachin", wallet_id: "", email: "sachinsuresh704@gmail.com") {
    message
  }
}

Request Parameters

FieldsTypeDescriptionRequired
namestringname of the creator
wallet_idstring_id of the non assigned wallet
emailstringemail of the creator

Success

{
    "data": {
        "add_new_creator": {
            "message": "creator added successfully"
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["add_new_creator"]
        }
    ],
    "data": {
        "add_new_creator": null
    }
}

Give Coins To Users

This API is for to give coins to users


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/admin
GRAPHQLstringMUTATION
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokenadmin token

Request

mutation {
  add_funq_credits(credits: 10, user_id: "62edda58bdeee16f97d14b18") {
    message
  }
}

Request Parameters

FieldsTypeDescriptionRequired
creditsintegerThe number of coins the user receives
user_idstring_id of the user

Success

{
    "data": {
        "add_funq_credits": {
            "message": "credits added successfully"
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["add_funq_credits"]
        }
    ],
    "data": {
        "add_funq_credits": null
    }
}

Update Creator Access Of Users

This API is for to update creator access of users


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/admin
GRAPHQLstringMUTATION
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokenadmin token

Request

mutation {
  update_creator_access(user_id: "62edda58bdeee16f97d14b18") {
    message
  }
}

Request Parameters

FieldsTypeDescriptionRequired
user_idstring_id of the user

Success

{
    "data": {
        "update_creator_access": {
            "message": "updated successfully"
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["update_creator_access"]
        }
    ],
    "data": {
        "update_creator_access": null
    }
}

Dashboard

All the APIs related to dashboard goes here


Send OTP

This API is for to send an OTP to the email address for login


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/creators
GRAPHQLstringMUTATION
content-typestringJSONapplication/json

Request

mutation {
  send_otp(email: "sachinsuresh704@gmail.com") {
    message
  }
}


Request Parameters

FieldsTypeDescriptionRequired
emailstringemail of the user

Success

{
    "data": {
        "send_otp": {
            "message": "OTP sent successfully"
        }
    }
}

Error



Login With OTP

This API is for logging into the user account


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/creators
GRAPHQLstringQUERY
content-typestringJSONapplication/json

Request

{
  login_with_otp(email: "sachinsuresh704@gmail.com", otp: "12345") {
    message
    token
  }
}


Request Parameters

FieldsTypeDescriptionRequired
emailstringemail of the user
otpstringOTP received in the email

Success

{
    "data": {
        "login_with_otp": {
            "message": "Login success",
            "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyMjk5YzkyNTRmNmMyYmNkNGIyZjA5YSIsIm5hbWUiOiJTYWNoaW4gVCBTIiwiYWNjb3VudFR5cGUiOiJjcmVhdG9yIiwiaWF0IjoxNjUyMzMxMjg1LCJleHAiOjE2NTIzNTI4ODV9.W3iuq0X7mSCQTC7c4D38rXIe5NgX0A6LgoIxoMwoJAo"
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Incorrect OTP",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["login_with_otp"]
        }
    ],
    "data": {
        "login_with_otp": null
    }
}

Fetch All NFTs

This API is for to get list of all NFTs


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/creators
GRAPHQLstringQUERY
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokencreator token

Request

{
  list_all_nfts(page_size: 2, page_number: 1, status: "all") {
    message
    data {
      _id
      name
      description
      art_url
      nft_id
      status
    }
    hasMore
  }
}


Request Parameters

FieldsTypeDescriptionRequired
page_sizeintegertotal number of data to be displayed
page_numberintegerpage number to filter data
statusstringto filter data based on NFT status

Success

{
    "data": {
        "list_all_nfts": {
            "message": "data listed",
            "data": [
                {
                    "_id": "624fc253521415614f508933",
                    "name": "Old man",
                    "description": "Old man cartoon character",
                    "art_url": "https://nft-store-assets.s3.amazonaws.com/033d711b-5554-47c2-8c7f-41e935cab405.png",
                    "nft_id": "2iRD8A88h1SRkK1Hhra53jqnfEkhXx5mK58PvLb5YTRW",
                    "status": "sold"
                },
                {
                    "_id": "6253ec74fb9f6b511cf05fbf",
                    "name": "Boy",
                    "description": "cartoon boy",
                    "art_url": "https://nft-store-assets.s3.amazonaws.com/0c3a1492-d05a-4299-ac87-44a9a6c72950.png",
                    "nft_id": "J7jzYCEi3sFdiH8vs14Saabw3joB8rFzTuraMQecxNpg",
                    "status": "sold"
                }
            ],
            "hasMore": true
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["list_all_nfts"]
        }
    ],
    "data": {
        "list_all_nfts": null
    }
}

Fetch All Own NFTs

This API is for to get list of all own NFTs


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/creators
GRAPHQLstringQUERY
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokencreator token

Request

{
  list_all_own_nfts(page_size: 10, page_number: 1) {
    message
    data {
      _id
      name
      description
      art_url
      nft_id
      status
    }
    hasMore
  }
}


Request Parameters

FieldsTypeDescriptionRequired
page_sizeintegertotal number of data to be displayed
page_numberintegerpage number to filter data

Success

{
    "data": {
        "list_all_own_nfts": {
            "message": "data listed",
            "data": [
                {
                    "_id": "624fc253521415614f508933",
                    "name": "Old man",
                    "description": "Old man cartoon character",
                    "art_url": "https://nft-store-assets.s3.amazonaws.com/033d711b-5554-47c2-8c7f-41e935cab405.png",
                    "nft_id": "2iRD8A88h1SRkK1Hhra53jqnfEkhXx5mK58PvLb5YTRW",
                    "status": "created"
                },
                {
                    "_id": "6253ec74fb9f6b511cf05fbf",
                    "name": "Boy",
                    "description": "cartoon boy",
                    "art_url": "https://nft-store-assets.s3.amazonaws.com/0c3a1492-d05a-4299-ac87-44a9a6c72950.png",
                    "nft_id": "J7jzYCEi3sFdiH8vs14Saabw3joB8rFzTuraMQecxNpg",
                    "status": "created"
                }
            ],
            "hasMore": true
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["list_all_own_nfts"]
        }
    ],
    "data": {
        "list_all_own_nfts": null
    }
}

Fetch NFT Details

This API is for to get details of an NFT


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/creators
GRAPHQLstringQUERY
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokencreator token

Request

{
  list_nft_details(_id: "624fc253521415614f508933") {
    message
    data {
      _id
      name
      description
      update_authority
      art_url
      royalty_percentage
      nft_id
      is_for_sale
      selling_price
      status
      creator_id {
        _id
        name
        email
      }
      owner_id {
        _id
        name
        email
      }
    }
  }
}


Request Parameters

FieldsTypeDescriptionRequired
_idstring_id of the NFT

Success

{
    "data": {
        "list_nft_details": {
            "message": "data listed",
            "data": {
                "_id": "624fc253521415614f508933",
                "name": "Old man",
                "description": "Old man cartoon character",
                "update_authority": "62299c9254f6c2bcd4b2f09a",
                "art_url": "https://nft-store-assets.s3.amazonaws.com/033d711b-5554-47c2-8c7f-41e935cab405.png",
                "royalty_percentage": 0,
                "nft_id": "2iRD8A88h1SRkK1Hhra53jqnfEkhXx5mK58PvLb5YTRW",
                "is_for_sale": false,
                "selling_price": 0,
                "status": "sold",
                "creator_id": {
                    "_id": "62299c9254f6c2bcd4b2f09a",
                    "name": "Sachin T S",
                    "email": "sachinsuresh704@gmail.com"
                },
                "owner_id": {
                    "_id": "62299c9254f6c2bcd4b2f09a",
                    "name": "Sachin T S",
                    "email": "sachinsuresh704@gmail.com"
                }
            }
        }
    }
}

Error

{
    "errors": [
        {
            "message": "art not found",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["list_nft_details"]
        }
    ],
    "data": {
        "list_nft_details": null
    }
}
{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["list_nft_details"]
        }
    ],
    "data": {
        "list_nft_details": null
    }
}

Fetch User Profile

This API is for to get profile details of a users


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/creators
GRAPHQLstringQUERY
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokencreator token

Request

{
  view_profile {
    message
    data {
      _id
      name
      email
      img
      is_creator
      acc_balance
      funq_credits
      wallet_address
    }
  }
}



Success

{
    "data": {
        "view_profile": {
            "message": "data listed",
            "data": {
                "_id": "62299c9254f6c2bcd4b2f09a",
                "name": "Sachin T S",
                "email": "sachinsuresh704@gmail.com",
                "img": null,
                "is_creator": true,
                "acc_balance": 2125523918.95,
                "funq_credits": 35,
                "wallet_address": "EnbSFnpMCQz7NzmfuKpPF1u4B8htaA19iYVkkrJi1aPy"
            }
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["view_profile"]
        }
    ],
    "data": {
        "view_profile": null
    }
}

Fetch All Transactions

This API is for to get list of all Transactions


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/creators
GRAPHQLstringQUERY
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokencreator token

Request

{
  list_all_transactions(page_size: 2, page_number: 1, tag: "nft") {
    message
    data {
      _id
      txn_id
      type
      tag
      nft_id
      status
      amount
      to
      from
    }
    hasMore
  }
}



Request Parameters

FieldsTypeDescriptionRequired
page_sizeintegertotal number of data to be displayed
page_numberintegerpage number to filter data
tagstringto filter data based on txn type

Success

{
    "data": {
        "list_all_transactions": {
            "message": "data listed",
            "data": [
                {
                    "_id": "62789ef3c048d385d34dc603",
                    "txn_id": "7305e946-cca5-4904-9694-10474e66a364",
                    "type": "sold",
                    "tag": "nft",
                    "nft_id": "2iRD8A88h1SRkK1Hhra53jqnfEkhXx5mK58PvLb5YTRW",
                    "status": "success",
                    "amount": 0.04,
                    "to": "sachinsuresh704@gmail.com",
                    "from": "9b3RBztwiSM4DFvoHtr6nENRZxfQkmJcfxY4VSWVSBrH"
                },
                {
                    "_id": "627899c6c048d306984dc5ce",
                    "txn_id": "eb8c0491-8cea-4dce-8e7b-161c4682d641",
                    "type": "sold",
                    "tag": "nft",
                    "nft_id": "J7jzYCEi3sFdiH8vs14Saabw3joB8rFzTuraMQecxNpg",
                    "status": "success",
                    "amount": 0.03,
                    "to": "sachinsuresh704@gmail.com",
                    "from": "9b3RBztwiSM4DFvoHtr6nENRZxfQkmJcfxY4VSWVSBrH"
                }
            ],
            "hasMore": true
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 2
                }
            ],
            "path": ["list_all_transactions"]
        }
    ],
    "data": {
        "list_all_transactions": null
    }
}

Fetch Funq Credits

This API is for to get total funq credits available for the user


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/creators
GRAPHQLstringQUERY
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokencreator token

Request

{
  show_funq_credits {
    message
    data {
      credits
    }
  }
}


Success

{
    "data": {
        "show_funq_credits": {
            "message": "data listed",
            "data": {
                "credits": 35
            }
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["show_funq_credits"]
        }
    ],
    "data": {
        "show_funq_credits": null
    }
}

Create New NFT

The API allows you to create a new NFT


REST


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/creators/create-new-nft
METHODstringPOST
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokencreator token

Request

{
    "type_id": "6253ec74fb9f6b511cf05fbf",
    "file": "base64img"
}

contains more fields based on the NFT type


Request Parameters

FieldsTypeDescriptionRequired
type_idstring_id of the NFT type
filestringimg file in base64 format

Success

{ "message": "NFT created", "_id": "624fc253521415614f508933" }

Error

{
    "message": "unauthorized"
}

Send NFT To Email

The API allows you to send a NFT via email to another user


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/creators
GRAPHQLstringMUTATION
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokencreator token

Request

mutation {
  send_nft_to_email(email: "sachinsuresh704@gmail.com", name: "sachin", nft_id: "624fc253521415614f508933") {
    message
  }
}


Request Parameters

FieldsTypeDescriptionRequired
emailstringemail of the user
namestringname of the user
nft_idstring_id of the nft

Success

{
    "data": {
        "send_nft_to_email": {
            "message": "NFT sent successfully"
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["send_nft_to_email"]
        }
    ],
    "data": {
        "send_nft_to_email": null
    }
}

Send NFT To Wallet

The API allows you to send a NFT via solana wallet address to another user


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/creators
GRAPHQLstringMUTATION
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokencreator token

Request

mutation {
  send_nft_to_wallet(nft_id: "2iRD8A88h1SRkK1Hhra53jqnfEkhXx5mK58PvLb5YTRW", dest_wallet_id: "6Qq7ERSHTZGnPpWarzbf1ZU9AMTqJgdj7WA16eSRiyZ4") {
    message
  }
}



Request Parameters

FieldsTypeDescriptionRequired
dest_wallet_idstringpublic address of the wallet
nft_idstringpublic address of the nft

Success

{
    "data": {
        "send_nft_to_wallet": {
            "message": "NFT sent successfully"
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["send_nft_to_wallet"]
        }
    ],
    "data": {
        "send_nft_to_wallet": null
    }
}

List NFTs in Marketplace

Using the API, you can list NFTs on the marketplace


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/creators
GRAPHQLstringMUTATION
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokencreator token

Request

mutation {
  sell_nfts(nft_data: ["2iRD8A88h1SRkK1Hhra53jqnfEkhXx5mK58PvLb5YTRW", "J7jzYCEi3sFdiH8vs14Saabw3joB8rFzTuraMQecxNpg"], amount: 1000) {
    message
  }
}


Request Parameters

FieldsTypeDescriptionRequired
nft_dataarraythe NFT's public address
amountfloatListing the amount in Indian rupees

Success

{
    "data": {
        "sell_nfts": {
            "message": "Artworks added for sales"
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 2
                }
            ],
            "path": ["sell_nfts"]
        }
    ],
    "data": {
        "sell_nfts": null
    }
}

Redeem Wallet Amount

This API allows you to redeem wallet balances into another wallet


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/creators
GRAPHQLstringMUTATION
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokencreator token

Request

mutation {
  redeem_wallet_amount(dest_wallet_id: "6Qq7ERSHTZGnPpWarzbf1ZU9AMTqJgdj7WA16eSRiyZ4", amount: 0.5) {
    message
  }
}

Request Parameters

FieldsTypeDescriptionRequired
dest_wallet_idstringpublic address of the wallet
amountfloatamount to redeem

Success

{
    "data": {
        "redeem_wallet_amount": {
            "message": "redeemed successfully"
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["redeem_wallet_amount"]
        }
    ],
    "data": {
        "redeem_wallet_amount": null
    }
}

Delete a NFT

The API allows you to delete a NFT


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/creators
GRAPHQLstringMUTATION
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokencreator token

Request

mutation {
  delete_nft(nft_id: "624fc253521415614f508933") {
    message
  }
}

Request Parameters

FieldsTypeDescriptionRequired
nft_idstring_id of the NFT

Success

{
    "data": {
        "delete_nft": {
            "message": "deleted successfully"
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["delete_nft"]
        }
    ],
    "data": {
        "delete_nft": null
    }
}

Marketplace

All the APIs related to marketplace goes here


Send OTP

This API is for to send an OTP to the email address for login


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/users
GRAPHQLstringMUTATION
content-typestringJSONapplication/json

Request

mutation {
  send_otp(email: "sachinsuresh704@gmail.com") {
    message
  }
}


Request Parameters

FieldsTypeDescriptionRequired
emailstringemail of the user

Success

{
    "data": {
        "send_otp": {
            "message": "OTP sent successfully"
        }
    }
}

Error



Login With OTP

This API is for logging into the user account


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/users
GRAPHQLstringQUERY
content-typestringJSONapplication/json

Request

{
  login_with_otp(email: "sachinsuresh704@gmail.com", otp: "12345") {
    message
    token
  }
}


Request Parameters

FieldsTypeDescriptionRequired
emailstringemail of the user
otpstringOTP received in the email

Success

{
    "data": {
        "login_with_otp": {
            "message": "Login success",
            "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyMjk5YzkyNTRmNmMyYmNkNGIyZjA5YSIsIm5hbWUiOiJTYWNoaW4gVCBTIiwiYWNjb3VudFR5cGUiOiJjcmVhdG9yIiwiaWF0IjoxNjUyMzMxMjg1LCJleHAiOjE2NTIzNTI4ODV9.W3iuq0X7mSCQTC7c4D38rXIe5NgX0A6LgoIxoMwoJAo"
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Incorrect OTP",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["login_with_otp"]
        }
    ],
    "data": {
        "login_with_otp": null
    }
}

Fetch All Creators

This API is for getting the list of all creators


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/users
GRAPHQLstringQUERY
content-typestringJSONapplication/json

Request

{
  list_all_creators(page_size: 2, page_number: 1) {
    message
    data {
      _id
      name
      email
      img
    }
    hasMore
  }
}


Request Parameters

FieldsTypeDescriptionRequired
page_sizeintegertotal number of data to be displayed
page_numberintegerpage number to filter data

Success

{
    "data": {
        "list_all_creators": {
            "message": "data listed",
            "data": [
                {
                    "_id": "6277405dc048d34ecb4dc58b",
                    "name": "xjtzli",
                    "email": "paysackhq@gmail.com",
                    "img": null
                },
                {
                    "_id": "6255282ac27cdd85d5cf36d1",
                    "name": "jimshad",
                    "email": "user1@gmail.com",
                    "img": null
                }
            ],
            "hasMore": true
        }
    }
}

Error



Fetch All Creator NFTs

This API is for getting the list of all NFTs created by a creator


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/users
GRAPHQLstringQUERY
content-typestringJSONapplication/json

Request

{
  list_all_creator_nfts(creator_id: "6277405dc048d34ecb4dc58b", page_size: 2, page_number: 1) {
    message
    data {
      creator {
        _id
        name
        email
        img
      }
      arts {
        _id
        name
        art_url
        nft_id
      }
    }
    hasMore
  }
}

Request Parameters

FieldsTypeDescriptionRequired
page_sizeintegertotal number of data to be displayed
page_numberintegerpage number to filter data
creator_idstring_id of the creator

Success

{
    "data": {
        "list_all_creator_nfts": {
            "message": "data listed",
            "data": {
                "creator": {
                    "_id": "62299c9254f6c2bcd4b2f09a",
                    "name": "Sachin T S",
                    "email": "sachinsuresh704@gmail.com",
                    "img": null
                },
                "arts": [
                    {
                        "_id": "6257ac81ba8a2b3e71325ec0",
                        "name": "Boy",
                        "art_url": "https://nft-store-assets.s3.amazonaws.com/b6e367bc-612e-4388-a685-fdf7c0490df1.png",
                        "nft_id": "EsgkMutFq5xa58gGcb86M2uzAdDJbcegzwgGMuiCCMMN"
                    },
                    {
                        "_id": "6257ac1dba8a2bd3d0325e8b",
                        "name": "Man",
                        "art_url": "https://nft-store-assets.s3.amazonaws.com/e8621f14-fcc0-41ad-94a3-13d6297d24e8.png",
                        "nft_id": "ntQXvzKjCyretMDpvAd35Ya3wwzZtWkNRN5UujccsTa"
                    }
                ]
            },
            "hasMore": true
        }
    }
}

Error

{
    "errors": [
        {
            "message": "creator not found",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["list_all_creator_nfts"]
        }
    ],
    "data": {
        "list_all_creator_nfts": null
    }
}

Fetch All User NFTs

This API is for to get list of all NFTs by a user


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/users
GRAPHQLstringQUERY
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokenuser token

Request

{
  list_all_user_nfts(type: "all", page_size: 2, page_number: 1) {
    message
    data {
      _id
      name
      art_url
      nft_id
    }
    hasMore
  }
}

Request Parameters

FieldsTypeDescriptionRequired
page_sizeintegertotal number of data to be displayed
page_numberintegerpage number to filter data
typestringto filter data based on NFT ownership

Success

{
    "data": {
        "list_all_user_nfts": {
            "message": "data listed",
            "data": [
                {
                    "_id": "6257ac81ba8a2b3e71325ec0",
                    "name": "Boy",
                    "art_url": "https://nft-store-assets.s3.amazonaws.com/b6e367bc-612e-4388-a685-fdf7c0490df1.png",
                    "nft_id": "EsgkMutFq5xa58gGcb86M2uzAdDJbcegzwgGMuiCCMMN"
                },
                {
                    "_id": "6257ac1dba8a2bd3d0325e8b",
                    "name": "Man",
                    "art_url": "https://nft-store-assets.s3.amazonaws.com/e8621f14-fcc0-41ad-94a3-13d6297d24e8.png",
                    "nft_id": "ntQXvzKjCyretMDpvAd35Ya3wwzZtWkNRN5UujccsTa"
                }
            ],
            "hasMore": true
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Unauthorized",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["list_all_user_nfts"]
        }
    ],
    "data": {
        "list_all_user_nfts": null
    }
}

Fetch NFT Details

This API is for getting the details of an NFT


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/users
GRAPHQLstringQUERY
content-typestringJSONapplication/json

Request

{
  list_nft_details(nft_id: "2iRD8A88h1SRkK1Hhra53jqnfEkhXx5mK58PvLb5YTRW") {
    message
    data {
      _id
      name
      description
      update_authority
      art_url
      royalty_percentage
      nft_id
      maximum_supply
      is_for_sale
      selling_price
      owner_id {
        _id
        name
        email
      }
      creator_id {
        _id
        name
        email
      }
    }
  }
}


Request Parameters

FieldsTypeDescriptionRequired
nft_idstringpublic address of the NFT

Success

{
    "data": {
        "list_nft_details": {
            "message": "data listed",
            "data": {
                "_id": "624fc253521415614f508933",
                "name": "Old man",
                "description": "Old man cartoon character",
                "update_authority": "62299c9254f6c2bcd4b2f09a",
                "art_url": "https://nft-store-assets.s3.amazonaws.com/033d711b-5554-47c2-8c7f-41e935cab405.png",
                "royalty_percentage": 0,
                "nft_id": "2iRD8A88h1SRkK1Hhra53jqnfEkhXx5mK58PvLb5YTRW",
                "maximum_supply": null,
                "is_for_sale": false,
                "selling_price": 0,
                "owner_id": {
                    "_id": "62299c9254f6c2bcd4b2f09a",
                    "name": "Sachin T S",
                    "email": "sachinsuresh704@gmail.com"
                },
                "creator_id": {
                    "_id": "62299c9254f6c2bcd4b2f09a",
                    "name": "Sachin T S",
                    "email": "sachinsuresh704@gmail.com"
                }
            }
        }
    }
}

Error

{
    "errors": [
        {
            "message": "art not found",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["list_nft_details"]
        }
    ],
    "data": {
        "list_nft_details": null
    }
}

Fetch All Listed NFTs

This API is for getting the list of all NFTs added for sales


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/users
GRAPHQLstringQUERY
content-typestringJSONapplication/json

Request

{
  list_all_selling_nfts(page_size: 2, page_number: 1) {
    message
    data {
      _id
      amount
      is_sold
      seller_id
    }
    hasMore
  }
}

Request Parameters

FieldsTypeDescriptionRequired
page_sizeintegertotal number of data to be displayed
page_numberintegerpage number to filter data

Success

{
    "data": {
        "list_all_selling_nfts": {
            "message": "data listed",
            "data": [
                {
                    "_id": "62511d083b5ded111f2bf507",
                    "amount": 40000000,
                    "is_sold": false,
                    "seller_id": "62299c9254f6c2bcd4b2f09a"
                }
            ],
            "hasMore": false
        }
    }
}

Error