REST API
You can access the Rest API through the Swagger UI from the App API section. Navigate to Network -> Deployed Apps -> App -> Rest API
https://<membership_id>.spydra.app/tokenize/<app_id>
Get the base URL from Network -> Deployed Apps -> App -> Rest API page.
Select your organization at the top right of this page.
Alternatively, you can from the URL by getting the <membership_id> by navigating
to Network -> Members page and getting the <app_id> by navigating to the Network ->
Deployed Apps -> App Overview page.
Assets
An asset can be any object in your business process that needs to be tracked on the Blockchain. For e.g. financial instruments (equities, bonds, loans, and funds), tangible assets (real estate, artworks, precious metals), or intellectual property can be different types of assets.
Query an asset.
The type of asset defined in the Asset Tokenization App settings.
Id of the asset. This is the Id that is maintained in your system and corresponds to value of the Primary Key attribute defined in the Asset Tokenization App settings.
For referenced objects, depth up to which references to be returned. For e.g. if depth=1, one level of references will be resolved.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
GET /tokenize/<chaincodeccid>/asset?assetType=text&id=text HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Accept: */*
{
"id": "Prop1",
"assetType": "Property",
"data": {
"id": "Prop1",
"name": "Flat xyz",
"address": "Chicago, Illinois",
"locality": "Harbor Drive"
},
"owners": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
],
"createdAt": "2023-02-15T15:47:00.027Z",
"createdBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
},
"updatedAt": "2023-02-17T12:10:24.156Z",
"updatedBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
}
Create an asset or a list of assets.
Whether to wait for the asset to be created before returning a response or not. When async=false (default), the API will wait for the transaction to be committed on the Ledger and then return the transaction Id. If async=true, the API will return immediately with a receipt Id. The reciept Id can be used to check the status of the transaction anytime using the /asset/receipt
endpoint.
The type of asset defined in the Asset Tokenization App settings.
Property
Custom JSON object representing an asset. You can submit a single asset or multiple assets in one request by providing an array of assets here.
{"id":"Prop1","name":"Flat xyz","address":"Chicago, Illinois","locality":"Harbor Drive"}
POST /tokenize/<chaincodeccid>/asset HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 122
{
"assetType": "Property",
"data": [
{
"id": "Prop1",
"name": "Flat xyz",
"address": "Chicago, Illinois",
"locality": "Harbor Drive"
}
]
}
{
"transactionId": "dd7817b56429532ceea32e2111faa20a7af87c945e7d8163ae2384c560b565f2",
"receiptId": "643d316fa27b8c7dcdb31c49"
}
Create or update an asset or a list of assets. If an asset with the same id exists, the existing asset will be updated.
Whether to wait for the asset to be created before returning a response or not. When async=false (default), the API will wait for the transaction to be committed on the Ledger and then return the transaction Id. If async=true, the API will return immediately with a receipt Id. The reciept Id can be used to check the status of the transaction anytime using the /asset/receipt
endpoint.
The type of asset defined in the Asset Tokenization App settings.
Property
Custom JSON object representing an asset. You can submit a single asset or multiple assets in one request by providing an array of assets here.
{"id":"Prop1","name":"Flat xyz","address":"Chicago, Illinois","locality":"Harbor Drive"}
PUT /tokenize/<chaincodeccid>/asset HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 122
{
"assetType": "Property",
"data": [
{
"id": "Prop1",
"name": "Flat xyz",
"address": "Chicago, Illinois",
"locality": "Harbor Drive"
}
]
}
{
"transactionId": "dd7817b56429532ceea32e2111faa20a7af87c945e7d8163ae2384c560b565f2",
"receiptId": "643d316fa27b8c7dcdb31c49"
}
Delete one or more assets.
Whether to wait for the asset to be deleted before returning or not. When async=false (default), the API will wait for the transaction to be committed on the Ledger and then return the transaction Id. If async=true, the API will return immediately with a receipt Id. The reciept Id can be used to check the status of the transaction anytime using the /asset/receipt
endpoint.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
The type of asset defined in the Asset Tokenization App settings.
Property
Id of the asset. This is the Id that is maintained in your system and corresponds to the value of the Primary Key attribute defined in the Asset Tokenization App settings. You can submit a single id or multiple Ids in one request by providing an array here.
Prop1
DELETE /tokenize/<chaincodeccid>/asset HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 39
{
"assetType": "Property",
"id": [
"Prop1"
]
}
{
"transactionId": "dd7817b56429532ceea32e2111faa20a7af87c945e7d8163ae2384c560b565f2",
"receiptId": "643d316fa27b8c7dcdb31c49"
}
Update an asset or a list of assets.
Whether to wait for the asset to be updated before returning or not. When async=false (default), the API will wait for the transaction to be committed on the Ledger and then return the transaction Id. If async=true, the API will return immediately with a receipt Id. The reciept Id can be used to check the status of the transaction anytime using the /asset/receipt
endpoint.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
The type of asset defined in the Asset Tokenization App settings.
Property
Custom JSON object representing an asset. You can submit a single asset or multiple assets in one request by providing an array of assets here.
{"id":"Prop1","name":"Flat xyz","address":"Chicago, Illinois","locality":"Harbor Drive"}
PATCH /tokenize/<chaincodeccid>/asset HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 122
{
"assetType": "Property",
"data": [
{
"id": "Prop1",
"name": "Flat xyz",
"address": "Chicago, Illinois",
"locality": "Harbor Drive"
}
]
}
{
"transactionId": "dd7817b56429532ceea32e2111faa20a7af87c945e7d8163ae2384c560b565f2",
"receiptId": "643d316fa27b8c7dcdb31c49"
}
Update owners of an asset. This method replaces the current owners with the new owner array provided.
Whether to wait for the asset to be updated before returning or not. When async=false (default), the API will wait for the transaction to be committed on the Ledger and then return the transaction Id. If async=true, the API will return immediately with a receipt Id. The reciept Id can be used to check the status of the transaction anytime using the /asset/receipt
endpoint.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
The type of asset defined in the Asset Tokenization App settings.
Property
PATCH /tokenize/<chaincodeccid>/asset/owners HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 111
{
"assetType": "Property",
"data": [
{
"id": "Prop1",
"owners": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
]
}
]
}
{
"transactionId": "dd7817b56429532ceea32e2111faa20a7af87c945e7d8163ae2384c560b565f2",
"receiptId": "643d316fa27b8c7dcdb31c49"
}
Get the asset along with history of changes.
The type of asset defined in the Asset Tokenization App settings.
Id of the asset. This is the Id that is maintained in your system and corresponds to the value of the Primary Key attribute defined in the Asset Tokenization App settings.
For referenced objects, depth up to which references to be returned.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
GET /tokenize/<chaincodeccid>/asset/history?assetType=text&id=text HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Accept: */*
{
"id": "Prop1",
"assetType": "Property",
"count": 1,
"records": [
{
"trasactionType": "CREATED",
"transactionId": "6c94ff55155722c28611630e7d6795145e0282e9fabf10bf3460f396e2a6218b",
"transactionTime": "2023-02-16T11:55:07.776Z",
"data": {
"id": "Prop1",
"name": "Flat xyz",
"address": "Chicago, Illinois",
"locality": "Harbor Drive"
},
"owners": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
],
"createdAt": "2023-02-15T15:47:00.027Z",
"createdBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
},
"updatedAt": "2023-02-17T12:10:24.156Z",
"updatedBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
}
]
}
Get all assets.
The type of asset defined in the Asset Tokenization App settings.
The number of records to be returned in a page. The default is 25.
The bookmark returned by previous request.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
GET /tokenize/<chaincodeccid>/asset/all?assetType=text HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Accept: */*
{
"count": 1,
"bookmark": "text",
"records": [
{
"id": "Prop1",
"assetType": "Property",
"data": {
"id": "Prop1",
"name": "Flat xyz",
"address": "Chicago, Illinois",
"locality": "Harbor Drive"
},
"owners": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
],
"createdAt": "2023-02-15T15:47:00.027Z",
"createdBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
},
"updatedAt": "2023-02-17T12:10:24.156Z",
"updatedBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
}
]
}
Get the status of an already submitted transaction using the returned receipt id.
The receipt id returned while submitting the transaction.
GET /tokenize/<chaincodeccid>/asset/receipt?receiptId=text HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Accept: */*
{
"transactionId": "6c94ff55155722c28611630e7d6795145e0282e9fabf10bf3460f396e2a6218b",
"status": "COMMITTED",
"message": "Success"
}
Get statistics about asset usage.
GET /tokenize/<chaincodeccid>/asset/stats HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Accept: */*
{
"totalCount": 100,
"countByType": [
{
"assetType": "Property",
"count": 30
}
]
}
Asset Ownership
Get ownership transfer request by id.
Id of the ownership approval request.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
GET /tokenize/<chaincodeccid>/asset/ownershipTransfer/request?id=text HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Accept: */*
{
"id": "9a7b337324d807e3622c29aad435bf6e6ea1d14a8c4e3850c5627f3be4356d12_124134",
"approvers": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123",
"status": "PENDING"
}
],
"numRequired": 1,
"status": "PENDING",
"timeout": 60,
"data": {
"name": "Flat xyz",
"address": "Chicago, Illinois",
"locality": "Harbor Drive",
"metadata": {
"assetType": "Property",
"id": [
"Prop1"
],
"newOwner": {
"orgId": "641b0eb2623fc30540d70fa7",
"userId": "6002"
}
}
},
"owners": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
],
"createdAt": "2023-02-15T15:47:00.027Z",
"createdBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
},
"updatedAt": "2023-02-17T12:10:24.156Z",
"updatedBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
}
Request ownership of an asset to be transferred.
Whether to wait for the asset to be updated before returning or not. When async=false (default), the API will wait for the transaction to be committed on the Ledger and then return the transaction Id. If async=true, the API will return immediately with a receipt Id. The reciept Id can be used to check the status of the transaction anytime using the /asset/receipt
endpoint.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
The type of asset defined in the Asset Tokenization App settings.
Property
POST /tokenize/<chaincodeccid>/asset/ownershipTransfer/request HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 293
{
"assetType": "Property",
"approvals": [
{
"id": [
"Prop1"
],
"approvers": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
],
"numRequired": 1,
"additionalOwners": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
],
"data": {
"name": "Flat xyz",
"address": "Chicago, Illinois",
"locality": "Harbor Drive"
}
}
]
}
{
"transactionId": "dd7817b56429532ceea32e2111faa20a7af87c945e7d8163ae2384c560b565f2",
"receiptId": "643d316fa27b8c7dcdb31c49"
}
Approve ownership transfer request.
Whether to wait for the asset to be updated before returning or not. When async=false (default), the API will wait for the transaction to be committed on the Ledger and then return the transaction Id. If async=true, the API will return immediately with a receipt Id. The reciept Id can be used to check the status of the transaction anytime using the /asset/receipt
endpoint.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
Id of the approval request. You can approve multiple ownership transfer requests together by providing an array of Ids here.
641821e82c44573cb52c7d97
POST /tokenize/<chaincodeccid>/asset/ownershipTransfer/approve HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 35
{
"id": [
"641821e82c44573cb52c7d97"
]
}
{
"transactionId": "dd7817b56429532ceea32e2111faa20a7af87c945e7d8163ae2384c560b565f2",
"receiptId": "643d316fa27b8c7dcdb31c49"
}
Reject ownership transfer request.
Whether to wait for the asset to be updated before returning or not. When async=false (default), the API will wait for the transaction to be committed on the Ledger and then return the transaction Id. If async=true, the API will return immediately with a receipt Id. The reciept Id can be used to check the status of the transaction anytime using the /asset/receipt
endpoint.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
Id of the approval request. You can approve multiple ownership transfer requests together by providing an array of Ids here.
641821e82c44573cb52c7d97
POST /tokenize/<chaincodeccid>/asset/ownershipTransfer/reject HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 35
{
"id": [
"641821e82c44573cb52c7d97"
]
}
{
"transactionId": "dd7817b56429532ceea32e2111faa20a7af87c945e7d8163ae2384c560b565f2",
"receiptId": "643d316fa27b8c7dcdb31c49"
}
Get the status of ownership transfer requests submitted by an entity.
The number of records to be returned in a page. The default is 25.
The bookmark returned by previous request.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
GET /tokenize/<chaincodeccid>/asset/ownershipTransfer/request/my HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Accept: */*
{
"count": 3,
"bookmark": "text",
"records": [
{
"id": "9a7b337324d807e3622c29aad435bf6e6ea1d14a8c4e3850c5627f3be4356d12_124134",
"approvers": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123",
"status": "PENDING"
}
],
"numRequired": 1,
"status": "PENDING",
"timeout": 60,
"data": {
"name": "Flat xyz",
"address": "Chicago, Illinois",
"locality": "Harbor Drive",
"metadata": {
"assetType": "Property",
"id": [
"Prop1"
],
"newOwner": {
"orgId": "641b0eb2623fc30540d70fa7",
"userId": "6002"
}
}
},
"owners": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
],
"createdAt": "2023-02-15T15:47:00.027Z",
"createdBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
},
"updatedAt": "2023-02-17T12:10:24.156Z",
"updatedBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
}
]
}
Get the ownership transfer requests in queue for approval.
Get only pending requests. The default is true.
The number of records to be returned in a page. The default is 25.
The bookmark returned by previous request.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
GET /tokenize/<chaincodeccid>/asset/ownershipTransfer/request/approvals HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Accept: */*
{
"count": 3,
"bookmark": "text",
"records": [
{
"id": "9a7b337324d807e3622c29aad435bf6e6ea1d14a8c4e3850c5627f3be4356d12_124134",
"approvers": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123",
"status": "PENDING"
}
],
"numRequired": 1,
"status": "PENDING",
"timeout": 60,
"data": {
"name": "Flat xyz",
"address": "Chicago, Illinois",
"locality": "Harbor Drive",
"metadata": {
"assetType": "Property",
"id": [
"Prop1"
],
"newOwner": {
"orgId": "641b0eb2623fc30540d70fa7",
"userId": "6002"
}
}
},
"owners": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
],
"createdAt": "2023-02-15T15:47:00.027Z",
"createdBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
},
"updatedAt": "2023-02-17T12:10:24.156Z",
"updatedBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
}
]
}
Get the ownership transfer requests for a particular asset.
The Id of the asset for which ownership transfer requests need to be fetched.
Get only pending requests. The default is true.
The number of records to be returned in a page. The default is 25.
The bookmark returned by previous request.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
GET /tokenize/<chaincodeccid>/asset/ownershipTransfer/request/byAsset?assetId=true HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Accept: */*
{
"count": 3,
"bookmark": "text",
"records": [
{
"id": "9a7b337324d807e3622c29aad435bf6e6ea1d14a8c4e3850c5627f3be4356d12_124134",
"approvers": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123",
"status": "PENDING"
}
],
"numRequired": 1,
"status": "PENDING",
"timeout": 60,
"data": {
"name": "Flat xyz",
"address": "Chicago, Illinois",
"locality": "Harbor Drive",
"metadata": {
"assetType": "Property",
"id": [
"Prop1"
],
"newOwner": {
"orgId": "641b0eb2623fc30540d70fa7",
"userId": "6002"
}
}
},
"owners": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
],
"createdAt": "2023-02-15T15:47:00.027Z",
"createdBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
},
"updatedAt": "2023-02-17T12:10:24.156Z",
"updatedBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
}
]
}
Get the ownership transfer requests for a particular asset.
Id of the ownership approval request.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
GET /tokenize/<chaincodeccid>/asset/ownershipTransfer/request/history?id=text HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Accept: */*
{
"id": "9a7b337324d807e3622c29aad435bf6e6ea1d14a8c4e3850c5627f3be4356d12_124134",
"count": 1,
"records": [
{
"trasactionType": "CREATED",
"transactionId": "6c94ff55155722c28611630e7d6795145e0282e9fabf10bf3460f396e2a6218b",
"transactionTime": "2023-02-16T11:55:07.776Z",
"approvers": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123",
"status": "PENDING"
}
],
"numRequired": 1,
"timeout": 60,
"status": "PENDING",
"data": {
"name": "Flat xyz",
"address": "Chicago, Illinois",
"locality": "Harbor Drive",
"metadata": {
"assetType": "Property",
"id": [
"Prop1"
],
"newOwner": {
"orgId": "641b0eb2623fc30540d70fa7",
"userId": "6002"
}
}
},
"owners": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
],
"createdAt": "2023-02-15T15:47:00.027Z",
"createdBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
},
"updatedAt": "2023-02-17T12:10:24.156Z",
"updatedBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
}
]
}
Approval
Get approval request by id.
Id of the approval request.
A unique name that represents this type of approval. The type is used to distinguish between different types of approvals in the systems. For e.g. LoanRequestApproval and LoanDisbursementApproval can be different approval types in the system. The type is also required while making other Approval API related calls.
Example: LoanRequestApproval
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
GET /tokenize/<chaincodeccid>/approval?id=text&approvalType=text HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Accept: */*
{
"id": "9a7b337324d807e3622c29aad435bf6e6ea1d14a8c4e3850c5627f3be4356d12_124134",
"approvers": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123",
"status": "PENDING"
}
],
"numRequired": 1,
"timeout": 60,
"status": "PENDING",
"data": {
"name": "Flat xyz",
"address": "Chicago, Illinois",
"locality": "Harbor Drive"
},
"owners": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
],
"createdAt": "2023-02-15T15:47:00.027Z",
"createdBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
},
"updatedAt": "2023-02-17T12:10:24.156Z",
"updatedBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
}
Create a new approval request.
Whether to wait for the asset to be updated before returning or not. When async=false (default), the API will wait for the transaction to be committed on the Ledger and then return the transaction Id. If async=true, the API will return immediately with a receipt Id. The reciept Id can be used to check the status of the transaction anytime using the /asset/receipt
endpoint.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
A unique name that represents this type of approval. The type is used to distinguish between different types of approvals in the systems. For e.g. LoanRequestApproval and LoanDisbursementApproval can be different approval types in the system. The type is also required while making other Approval API related calls.
LoanRequestApproval
POST /tokenize/<chaincodeccid>/approval HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 232
{
"approvalType": "LoanRequestApproval",
"approvals": [
{
"approvers": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
],
"numRequired": 1,
"timeout": 60,
"data": {
"name": "Flat xyz",
"address": "Chicago, Illinois",
"locality": "Harbor Drive"
}
}
]
}
{
"transactionId": "dd7817b56429532ceea32e2111faa20a7af87c945e7d8163ae2384c560b565f2",
"receiptId": "643d316fa27b8c7dcdb31c49"
}
Approve the request.
Whether to wait for the asset to be updated before returning or not. When async=false (default), the API will wait for the transaction to be committed on the Ledger and then return the transaction Id. If async=true, the API will return immediately with a receipt Id. The reciept Id can be used to check the status of the transaction anytime using the /asset/receipt
endpoint.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
A unique name that represents this type of approval. The type is used to distinguish between different types of approvals in the systems. For e.g. LoanRequestApproval and LoanDisbursementApproval can be different approval types in the system. The type is also required while making other Approval API related calls.
LoanRequestApproval
POST /tokenize/<chaincodeccid>/approval/accept HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 99
{
"approvalType": "LoanRequestApproval",
"approvals": [
{
"id": "ea09a7ff705d69eb",
"comment": "Approved"
}
]
}
{
"transactionId": "dd7817b56429532ceea32e2111faa20a7af87c945e7d8163ae2384c560b565f2",
"receiptId": "643d316fa27b8c7dcdb31c49"
}
Reject approval request.
Whether to wait for the asset to be updated before returning or not. When async=false (default), the API will wait for the transaction to be committed on the Ledger and then return the transaction Id. If async=true, the API will return immediately with a receipt Id. The reciept Id can be used to check the status of the transaction anytime using the /asset/receipt
endpoint.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
A unique name that represents this type of approval. The type is used to distinguish between different types of approvals in the systems. For e.g. LoanRequestApproval and LoanDisbursementApproval can be different approval types in the system. The type is also required while making other Approval API related calls.
LoanRequestApproval
POST /tokenize/<chaincodeccid>/approval/reject HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 99
{
"approvalType": "LoanRequestApproval",
"approvals": [
{
"id": "ea09a7ff705d69eb",
"comment": "Rejected"
}
]
}
{
"transactionId": "dd7817b56429532ceea32e2111faa20a7af87c945e7d8163ae2384c560b565f2",
"receiptId": "643d316fa27b8c7dcdb31c49"
}
Cancel approval request.
Whether to wait for the asset to be updated before returning or not. When async=false (default), the API will wait for the transaction to be committed on the Ledger and then return the transaction Id. If async=true, the API will return immediately with a receipt Id. The reciept Id can be used to check the status of the transaction anytime using the /asset/receipt
endpoint.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
A unique name that represents this type of approval. The type is used to distinguish between different types of approvals in the systems. For e.g. LoanRequestApproval and LoanDisbursementApproval can be different approval types in the system. The type is also required while making other Approval API related calls.
LoanRequestApproval
POST /tokenize/<chaincodeccid>/approval/cancel HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 101
{
"approvalType": "LoanRequestApproval",
"approvals": [
{
"id": "ea09a7ff705d69eb",
"comment": "Cancelling"
}
]
}
{
"transactionId": "dd7817b56429532ceea32e2111faa20a7af87c945e7d8163ae2384c560b565f2",
"receiptId": "643d316fa27b8c7dcdb31c49"
}
Get the status of approval requests submitted by an entity.
A unique name that represents this type of approval. The type is used to distinguish between different types of approvals in the systems. For e.g. LoanRequestApproval and LoanDisbursementApproval can be different approval types in the system. The type is also required while making other Approval API related calls.
Example: LoanRequestApproval
The number of records to be returned in a page. The default is 25.
The bookmark returned by previous request.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
GET /tokenize/<chaincodeccid>/approval/my?approvalType=text HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Accept: */*
{
"count": 3,
"bookmark": "text",
"records": [
{
"id": "9a7b337324d807e3622c29aad435bf6e6ea1d14a8c4e3850c5627f3be4356d12_124134",
"approvers": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123",
"status": "PENDING"
}
],
"numRequired": 1,
"timeout": 60,
"status": "PENDING",
"data": {
"name": "Flat xyz",
"address": "Chicago, Illinois",
"locality": "Harbor Drive"
},
"owners": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
],
"createdAt": "2023-02-15T15:47:00.027Z",
"createdBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
},
"updatedAt": "2023-02-17T12:10:24.156Z",
"updatedBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
}
]
}
Get the approval requests in queue for approval.
A unique name that represents this type of approval. The type is used to distinguish between different types of approvals in the systems. For e.g. LoanRequestApproval and LoanDisbursementApproval can be different approval types in the system. The type is also required while making other Approval API related calls.
Example: LoanRequestApproval
Get only pending requests. The default is true.
The number of records to be returned in a page. The default is 25.
The bookmark returned by previous request.
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
GET /tokenize/<chaincodeccid>/approval/queue?approvalType=text HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Accept: */*
{
"count": 3,
"bookmark": "text",
"records": [
{
"id": "9a7b337324d807e3622c29aad435bf6e6ea1d14a8c4e3850c5627f3be4356d12_124134",
"approvers": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123",
"status": "PENDING"
}
],
"numRequired": 1,
"status": "PENDING",
"timeout": 60,
"data": {
"name": "Flat xyz",
"address": "Chicago, Illinois",
"locality": "Harbor Drive",
"metadata": {
"assetType": "Property",
"id": [
"Prop1"
],
"newOwner": {
"orgId": "641b0eb2623fc30540d70fa7",
"userId": "6002"
}
}
},
"owners": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
],
"createdAt": "2023-02-15T15:47:00.027Z",
"createdBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
},
"updatedAt": "2023-02-17T12:10:24.156Z",
"updatedBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
}
]
}
Get the approval requests for a particular asset.
Id of the approval request.
A unique name that represents this type of approval. The type is used to distinguish between different types of approvals in the systems. For e.g. LoanRequestApproval and LoanDisbursementApproval can be different approval types in the system. The type is also required while making other Approval API related calls.
Example: LoanRequestApproval
The entity (like user, suborg etc) within the org on behalf of which the request is being made.
Example: userId:123
GET /tokenize/<chaincodeccid>/approval/history?id=text&approvalType=text HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Accept: */*
{
"id": "9a7b337324d807e3622c29aad435bf6e6ea1d14a8c4e3850c5627f3be4356d12_124134",
"count": 1,
"records": [
{
"trasactionType": "CREATED",
"transactionId": "6c94ff55155722c28611630e7d6795145e0282e9fabf10bf3460f396e2a6218b",
"transactionTime": "2023-02-16T11:55:07.776Z",
"approvers": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123",
"status": "PENDING"
}
],
"numRequired": 1,
"timeout": 60,
"status": "PENDING",
"data": {
"name": "Flat xyz",
"address": "Chicago, Illinois",
"locality": "Harbor Drive"
},
"owners": [
{
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
],
"createdAt": "2023-02-15T15:47:00.027Z",
"createdBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
},
"updatedAt": "2023-02-17T12:10:24.156Z",
"updatedBy": {
"orgId": "63c912fd5902d6c20ac43c89",
"userId": "123"
}
}
]
}
Status check API.
GET /tokenize/<chaincodeccid>/status HTTP/1.1
Host: <networkorgid>.<publicdomain>
X-API-KEY: YOUR_API_KEY
Accept: */*
OK
No content
Tokens
Token APIs allow you to tokenize your assets and issue Non-Fungible Tokens (NFTs) or fungible tokens seamlessly. Tokeniseanything asse you want- real estate, artwork, collectibles, or any other valuable asset. Using these APIs, you can issue, mint, burn tokens. Additionally, user can set approvers for their token account, get balance, view all transactions etc.
ERC1155
ERC1155 is a popular token standard in the blockchain industry that allows for the creation and management of both fungible and non-fungible tokens. It provides a flexible and efficient way to represent multiple token types within a single smart contract.
Vault
Vault is a mechanism for fractionalisation that allows for the division of assets into smaller, more manageable fractions. This concept is particularly relevant in the world of finance and investment, where it enables the creation of new investment opportunities and increased liquidity.
A custodian is a trusted party responsible for safeguarding and managing the assets held within the vault. A custodian can deposit or withdraw assets from a vault.
Last updated
Was this helpful?