0% found this document useful (0 votes)
31 views6 pages

API Document For NFT Flow

The document contains information about APIs for managing NFTs and user accounts on a system. It includes API endpoints, request types, headers and bodies for adding a user, logging in as a user, creating and validating NFTs, getting wallet addresses, and updating NFT data after creation on the blockchain. Credentials are provided for an admin account and sample user to test the APIs.

Uploaded by

test test1
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
31 views6 pages

API Document For NFT Flow

The document contains information about APIs for managing NFTs and user accounts on a system. It includes API endpoints, request types, headers and bodies for adding a user, logging in as a user, creating and validating NFTs, getting wallet addresses, and updating NFT data after creation on the blockchain. Credentials are provided for an admin account and sample user to test the APIs.

Uploaded by

test test1
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 6

Admin Account -:

Username: nftadmin
Password: h5P73m8m2qnVynPD

1. Add user -:
API URL: http://45.79.123.103:3001/adduser

Request Type: POST

Request Headers:
Content-Type:application/json

Request Body:
{"username":"nftadmin","password":"h5P73m8m2qnVynPD","user":{"username":"User1","password":"
h5P73m8m2qnV"}}

Response:
{"id_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6IlVzZXIxIiwiaWQiOjIsImlhdCI6MT
YxODYwMTU4OCwiZXhwIjoxNjE4NjE5NTg4fQ.JdLjveh7fphnGSlPSrHlH1rpm_v1-rawPX39EAzu7Lg","acces
s_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2dvbnRvLmNvbSIsImF1ZCI6I
m5vZGVqcy1qd3QtYXV0aCIsImV4cCI6MTYxODYwNTE4OCwic2NvcGUiOiJmdWxsX2FjY2VzcyIsInN1YiI6ImJ
uYnNlbmRlcnxPc2lsbGEiLCJqdGkiOiJ0OEZKcHhLaFRRWnJTU3d4IiwiYWxnIjoiSFMyNTYiLCJpYXQiOjE2MTg2
MDE1ODh9.C4hzQEb_hOVlzXbHny5id8XsiZ1BGEwBIl_CzeR6Rak"}

2. Login -:
API URL: http://45.79.123.103:3001/login

Request Type: POST

Request Headers:
Content-Type:application/json

Request Body:
{"username":"User1","password":"h5P73m8m2qnV"}

Response:
{"id_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6IlVzZXIxIiwiaWQiOjIsImlhdCI6MT
YxODYwMTU4OCwiZXhwIjoxNjE4NjE5NTg4fQ.JdLjveh7fphnGSlPSrHlH1rpm_v1-rawPX39EAzu7Lg","acces
s_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2dvbnRvLmNvbSIsImF1ZCI6I
m5vZGVqcy1qd3QtYXV0aCIsImV4cCI6MTYxODYwNTE4OCwic2NvcGUiOiJmdWxsX2FjY2VzcyIsInN1YiI6ImJ
uYnNlbmRlcnxPc2lsbGEiLCJqdGkiOiJ0OEZKcHhLaFRRWnJTU3d4IiwiYWxnIjoiSFMyNTYiLCJpYXQiOjE2MTg2
MDE1ODh9.C4hzQEb_hOVlzXbHny5id8XsiZ1BGEwBIl_CzeR6Rak"}

3. Create NFT -:

API URL : http://45.79.123.103:3001/createnft

Request Type: POST

Request Headers:
Content-Type:application/json

Authorization: “Bearer
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2dvbnRvLmNvbSIsImF1ZCI6Im5vZGVqcy
1qd3QtYXV0aCIsImV4cCI6MTYxODYwNTE4OCwic2NvcGUiOiJmdWxsX2FjY2VzcyIsInN1YiI6ImJuYnNlbmRlc
nxPc2lsbGEiLCJqdGkiOiJ0OEZKcHhLaFRRWnJTU3d4IiwiYWxnIjoiSFMyNTYiLCJpYXQiOjE2MTg2MDE1ODh9
.C4hzQEb_hOVlzXbHny5id8XsiZ1BGEwBIl_CzeR6Rak”

Request Body:

"data": [

"certificate_path":
https://docs.google.com/spreadsheets/d/1uSEtbC6Jni25EgJDMFYgCZzuncPvyG",

"certificate_name": "john’s certificate",

“certificate_hash” : “9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08”
"walletlists":
"0xF19F3f238081f2B5c321d1439554c63D73815952;0x94B486961aC9792ef592CEb903D7586c5
9536Bd5",

“requestuniqueId": "186fa4d0-d307-484c-bc7b-f84b665f570b"

},

"certificate_path":
https://docs.google.com/spreadsheets/d/2rtdfgdfgdfgdEgJDMFYgCZzuncPvyG",

"certificate_name": "mate’s certificate",

“certificate_hash” : “9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08”

"walletlists":
"0xF19F3f238081f2B5c321d1439554c63D73815952;0x94B486961aC9792ef592CEb903D7586c5
9536Bd5 ",

“requestuniqueId": "9254a727-63cc-4dc4-aa33-c2c6974689ef"

Response:
{
"status": true,
"code": 200,
}

4. Validate NFT -:
API URL : http://45.79.123.103:3001/validatenft

Request Type: POST

Request Headers:
Content-Type:application/json

Authorization: “Bearer
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2dvbnRvLmNvbSIsImF1ZCI6Im5vZGVqcy
1qd3QtYXV0aCIsImV4cCI6MTYxODYwNTE4OCwic2NvcGUiOiJmdWxsX2FjY2VzcyIsInN1YiI6ImJuYnNlbmRlc
nxPc2lsbGEiLCJqdGkiOiJ0OEZKcHhLaFRRWnJTU3d4IiwiYWxnIjoiSFMyNTYiLCJpYXQiOjE2MTg2MDE1ODh9
.C4hzQEb_hOVlzXbHny5id8XsiZ1BGEwBIl_CzeR6Rak”

Request Body:

"nftuniqueid" : "0x7aaeedf76bc5f1377806844f630330f6d3e26052"

"wallet_adress":"0xF19F3f238081f2B5c321d1439554c63D73815952",

"wallet_index":"2"

Response:
{
"status": true,
"code": 200,
"data": {
"certificate_path":
https://docs.google.com/spreadsheets/d/2rtdfgdfgdfgdEgJDMFYgCZzuncPvyG",
"certificate_name": "mate’s certificate",

“certificate_hash” : “9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08”,

“requestuniqueId": "9254a727-63cc-4dc4-aa33-c2c6974689ef"

}
}

5. Get wallet -:
API URL : http://45.79.123.103:3001/getwallet

Request Type: POST


Request Headers:
Content-Type:application/json

Request Body:

{ count:3; }

Response:
{
"status": true,
"code": 200,
"data": [
{
"Wallet_adress":"0xa9Ab95b55a109d67e35EeaD0F8e9Df20d30937FB",
"Wallet_index":"0"
},
{
"wallet_adress":"0x94B486961aC9792ef592CEb903D7586c59536Bd5",
"wallet_index":"1"
},
{
"wallet_adress":"0xF19F3f238081f2B5c321d1439554c63D73815952",
"wallet_index":"2"
}
]
}

6. Update NFT -:
Note: We will call this api when create NFT will generate from backend

API URL: /UpdateNFT


Request Headers:
{
“Content-Type”: “application/json”,
“X-API-KEY” : “We will provide the api key”,
“X-Access-Token”: “We will provide the access token”
}

Request Body:
[
{
“Id”: “Unique Id Provided by us in the Create NFT API”,
“NFT”: “Created NFT from your Blockchain”
},
{
“Id”: “Unique Id Provided by us in the Create NFT API”,
“NFT”: “Created NFT from your Blockchain”
},
]

Response:
{
"status": true,
"code": 200,
}

You might also like