Stablecoin Wrapper API Package

Oracle Blockchain Platform Digital Assets Edition includes a wrapper API package that extends the REST API to support operations specific to the life cycle of a stablecoin.

The wrapper API package uses the API Gateway service and OCI Functions to deploy API routes specifically for managing the stablecoin life cycle. The stablecoin wrapper API package is downloadable from the Oracle Blockchain Platform console, and includes an archive file that contains the wrapper API package including the Terraform scripts required for deployment. You deploy this file to a Resource Manager stack on Oracle Cloud Infrastructure (OCI) to create the necessary Oracle resources for the wrapper APIs. It also includes a Postman collection that enables you to test the deployed wrapper APIs. The collection includes preconfigured requests with endpoints and payloads that correspond to the APIs defined in the wrapper API package.

Wrapper APIs

activateStablecoinAccount
Original method name: activateAccount
This POST method activates a fungible token account. This method can be called only by a Token Admin or Org Admin of the specified organization. Deleted accounts cannot be activated.
Payload:
{
    "tokenId": "{{bc-token-id}}",
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "endorsers": {{endorsers}}
}
Parameters:
  • tokenId: string – The ID of the token.
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Returns:
  • On success, a JSON representation of the account status object for the specified token account.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "6cea484aa4e311b3913e7706c668d1e7df1531b7561f4777ab8550542be18b5d",
        "payload": {
            "assetType": "oaccountStatus",
            "status_id": "oaccountStatus~cfe302f06bf732f248315725bb601d7906d7c1d4c167d04ac3a5283b8dbc7fc4",
            "account_id": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2",
            "status": "active"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 294
    }
}
addOrgAdmin
Original method name: addOrgAdmin
This method adds organization admins to the token chaincode. This method can be called only by a Token Admin or Org Admin of the specified organization.
Payload:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "sameOrgEndorser": true
}
Parameters:
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
  • sameOrgEndorser: boolean – A Boolean value that indicates whether transaction endorsements must be from the same organization as the requester.
Return Value Example:

{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "96a84dffcb9156f7271dfb414e8c43b540595044cf9145f5fd56e9873797fc4a",
        "payload": {
            "msg": "Successfully added Org Admin (Org_Id: CB, User_Id: cb)"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 197
    }
}
addOrgAuditor
Original method name: addOrgAuditor
This method adds organization auditors to the token chaincode. This method can be called only by a Token Admin or Org Admin of the specified organization.
Payload:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "sameOrgEndorser": true
}
Parameters:
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
  • sameOrgEndorser: boolean – A Boolean value that indicates whether transaction endorsements must be from the same organization as the requester.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "44bbad35a1478cb714e32f7cfd551897868a203520aab9cea5771d3aadc1cf03",
        "payload": {
            "msg": "Successfully added Org Auditor (Org_Id: CB, User_Id: cb)"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 198
    }
}
addRole
Original method name: addRole
This method adds the role to the specified user and token. Account IDs are formed by creating a SHA-256 hash of the concatenated token ID, organization ID, and user ID. This method can be called only by a Token Admin or Org Admin of the specified organization.
Payload:
{
    "tokenId": "{{bc-token-id}}",
    "role": "role value (for example minter / burner / notary)",
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "endorsers": {{endorsers}}
}
Parameters:
  • tokenId: string – The ID of the token.
  • role: string – The name of the role to add to the specified user. The mintable and burnable behaviors are correspondingly tied to the minter_role_name and burner_role_name properties in the specification file. Similarly, the notary behavior is tied to the notary_role_name property in the specification file.
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "29ea766dee8e6d273eba3c40a9fea75a1aa85dc3c280d40695f6224c5c52d93c",
        "payload": {
            "msg": "Successfully added role 'notary' to Account Id: oaccount~2eb5f8a9bc561f8f41a4ea3be9511958cc6684ef14f2337ca396efc301b627d8 (Org-Id: CB, User-Id: manager_user_cb)"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 201
    }
}
addTokenAdmin
Original method name: addTokenAdmin
This POST method adds a user as a Token Admin of the token chaincode. The method can be called only by a Token Admin of the token chaincode. The first invocation is from the admin who instantiates the chaincode.
Payload:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "sameOrgEndorser": true
}
Parameters:
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
  • sameOrgEndorser: boolean – A Boolean value that indicates whether transaction endorsements must be from the same organization as the requester.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "bd7416689b1acdace3c557faebbc0ad9a51671c10278ba6909350a6fe4b08eed",
        "payload": {
            "msg": "User (Org_Id: CB, User_Id: cb) is already Token Admin."
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 193
    }
}
addTokenAuditor
Original method name: addTokenAuditor
This POST method adds token auditors to the token chaincode. This method can be called only by the Token Admin of the chaincode.
Payload:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "sameOrgEndorser": true
}
Parameters:
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
  • sameOrgEndorser: boolean – A Boolean value that indicates whether transaction endorsements must be from the same organization as the requester.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "cd81f6c4c9e7c18ece357dbf5c139ef66ef2d6566be3b14de5f6d0a3fd4bb2f0",
        "payload": {
            "msg": "Successfully added Token Auditor (Org_Id: CB, User_Id: cb)"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 196
    }
}
approveBurn
Original method name: approveBurn
Notaries can call this POST method to approve a burn request.
Payload:
{
    "tokenId": "{{bc-token-id}}",
    "operationId": "operation_id value",
    "sameOrgEndorser": true
}
Parameters:
  • tokenId: string – The ID of the token.
  • operationId: string – The unique operation ID of the mint request to approve.
  • sameOrgEndorser: boolean – A Boolean value that indicates whether transaction endorsements must be from the same organization as the requester.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "8252371040e41753fd843bd086692f4e1ee7d89ffa3a50bfa121c5f1565f922f",
        "payload": {
            "msg": "Successfully burned 1 tokens from account id: oaccount~0d7b3f73aea28065017ce8b79c0bb19256dc0cb475a0b2a85192bd110f69535c (Org-Id: CB, User-Id: retirer_user_cb)"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 209
    }
}
approveMint
Original method name: approveMint
Notaries can call this POST method to approve a mint request.
Payload:
{
    "tokenId": "{{bc-token-id}}",
    "operationId": "operation_id value",
    "sameOrgEndorser": true
}
Parameters:
  • tokenId: string – The ID of the token.
  • operationId: string – The unique operation ID of the mint request to approve.
  • sameOrgEndorser: boolean – A Boolean value that indicates whether transaction endorsements must be from the same organization as the requester.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "a4537ef34a955b023b7c205b9abf06a6c79e4fdd761fb24f41b8eb34126b66c0",
        "payload": {
            "msg": "Successfully minted 10 tokens to Account Id: oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0 (Org-Id: CB, User-Id: creator_user_cb)"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 204
    }
}
approveTransaction
Original method name: approveTransaction
Approvers can call this POST method to approve a hold transaction.
Payload:
{
    "tokenId": "{{bc-token-id}}",
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "endorsers": {{endorsers}}
}
Parameters:
  • tokenId: string – The ID of the token.
  • orgId: string – The membership service provider (MSP) ID of the user.
  • userId: string – The user name or email ID of the user.
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "44685b0ff1b0ee72d57cb62900aae30638d65c82f264d5de7b28375732171702",
        "payload": {
            "assetType": "ApprovalTransactions",
            "approvalTransactionId": "hold1~oaccount~1cf5d40c7ea7b9dceedfc66292ab843c1583564c3ecaf9f5ceb11f834018b02f",
            "approvalOperationId": "hold1",
            "fromAccountId": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2",
            "toAccountId": "oaccount~79c427e614530eacad6fb07cff6048f6b96283e65019301320c9684932846f64",
            "approverAccountId": "oaccount~1cf5d40c7ea7b9dceedfc66292ab843c1583564c3ecaf9f5ceb11f834018b02f",
            "totalApprovals": 1,
            "timestamp": "2025-11-21T12:32:43.000Z"
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010",
        "blockNumber": 289
    }
}
associateTokenToAccount
Original method name: associateTokenToAccount
This POST method associates a specified account ID to a specified token. This method can be called only by a Token Admin or Org Admin of the specified organization.
Payload:
{
    "accountId": "account_id value",
    "tokenId": "{{bc-token-id}}",
    "endorsers": {{endorsers}}
}
Parameters:
  • accountId: string – The ID of the account.
  • tokenId: string – The ID of the token.
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "efc7381fb6fc6174a40e83ff5f09d2bbf7f6f490365e3bbf19d5502c2cfec474",
        "payload": {
            "bapAccountVersion": 0,
            "assetType": "oaccount",
            "account_id": "oaccount~1c6aa60e220b8fc70caf4cea1ed723ddb193a00321e5e0004def062816b77090",
            "user_id": "cb12",
            "org_id": "CB",
            "token_type": "fungible",
            "token_id": "USD",
            "token_name": "Stablecoin",
            "balance": 0,
            "onhold_balance": 0,
            "max_daily_amount": 10000,
            "daily_amount": 0,
            "max_daily_transactions": 100,
            "daily_transactions": 0,
            "current_date": "2024-12-11T00:00:00.000Z"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 216
    }
}
bulkTransferTokens
Original method name: bulkTransferTokens
This method transfers tokens in bulk from the caller account to the accounts that are specified in the flow object. The quantities must be within the decimal values specified by the decimal parameter of the divisible behavior in the specification file.
Payload:
{
    "tokenId": "{{bc-token-id}}",
    "flow": "[flow value]",
    "endorsers": {{endorsers}}
}
Parameters:
  • token_id: string – The ID of the token.
  • flow : object[] – An array of JSON objects that specify receivers and quantities.
    • to_orgId: string – The membership service provider (MSP) ID of the receiver in the current organization.
    • userId: string – The user name or email ID of the receiver.
    • quantity: number – The number of tokens to transfer.
    You specify the flow parameter in a different format if you are using Visual Studio Code versus the CLI or a Postman collection.
    Visual Studio Code:
    [
      { "to_org_id": "Org1MSP", "to_user_id": "user1", "quantity": 10 },
      { "to_org_id": "Org1MSP", "to_user_id": "user2", "quantity": 10 }
    ]
    
    CLI / Postman:
    "[{ \"to_org_id\": \"Org1MSP\", \"to_user_id\": \"user1\", \"quantity\": 10 }, { \"to_org_id\": \"Org1MSP\", \"to_user_id\": \"user2\", \"quantity\": 10 }]"
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "ad6a9555e6512ffe4bd3500d0942e171deadc1d724cd80da7179e39e1d05aa4e",
        "payload": {
            "msg": "Successfully transferred 10 tokens from Account Id 'oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2' (Org-Id: CentralBank, User-Id: cb__creator_demo).",
            "from_account_id": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2",
            "sub_transactions": [
                {
                    "to_account_id": "oaccount~79c427e614530eacad6fb07cff6048f6b96283e65019301320c9684932846f64",
                    "amount": 5
                },
                {
                    "to_account_id": "oaccount~09abdd306d4fcbc1b794e2e0b8fc4ce3d8282e11846ef35d675cc9540da4ad1b",
                    "amount": 5
                }
            ]
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 302
    }
}
createAccount
Original method name: createAccount
This method creates an account for a specified user and token. An account must be created for any user who will have tokens at any point. Accounts track balances, on-hold balances, and transaction history. An account ID is formed by concatenating the asset type, the token ID, and a SHA-256 hash of the user ID and organization (membership service provider) ID. This method can be called only by a Token Admin of the chaincode or by an Org Admin of the specified organization.
Payload:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "tokenType": "fungible",
    "dailyLimits": "{\"max_daily_amount\":10000,\"max_daily_transactions\":100}",
    "endorsers": {{endorsers}}
}
Parameters:
  • orgId – The membership service provider (MSP) ID of the user to create the account for. The ID must begin with an alphanumeric character and can include letters, numbers, and special characters such as underscores (_), periods (.), at signs (@), and hyphens (-).
  • userId – The user name or email ID of the user. The ID must begin with an alphanumeric character and can include letters, numbers, and special characters such as underscores (_), periods (.), at signs (@), and hyphens (-).
  • tokenType: TokenType – The type of token, which must be fungible.
  • dailyLimits: JSON object – A JSON object of the following type.
    {
         "max_daily_amount": 100000
         "max_daily_transactions": 10000
     }
    In the example, the max_daily_amount value is the maximum amount of tokens that can be transacted daily and max_daily_transactions value is the maximum number of transactions that can be completed daily.
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "453821c7ffd477987ef8ccbd836b893969531ab768098cd4a99e3b89cd38a391",
        "payload": {
            "bapAccountVersion": 0,
            "assetType": "oaccount",
            "account_id": "oaccount~28ac774001f374064029d51af4fb67e26ea1ea9ef62828b7a72dbf3beb8efd8d",
            "user_id": "admin_user_cb",
            "org_id": "CB",
            "token_type": "fungible",
            "token_id": "",
            "token_name": "",
            "balance": 0,
            "onhold_balance": 0,
            "max_daily_amount": 10000,
            "daily_amount": 0,
            "max_daily_transactions": 100,
            "daily_transactions": 0,
            "current_date": "2024-12-09T00:00:00.000Z"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 188
    }
}
createApprovalPolicyCheck
Original method name: createApprovalPolicyCheck
This method creates a new approval policy, which defines transaction thresholds and the required sequential approvers. This method can be called only by a Token Admin.
Payload:
{
    "asset": "{\"approvalPolicyId\":\"approvalPolicyId value\",\"transactionLowerLimit\":\"transactionLowerLimit value\",\"transactionUpperLimit\":\"transactionUpperLimit value\",\"numberOfApprovalsRequired\":999,\"approverDetails\":[{\"approverOrgId\":\"approverOrgId value\",\"approverUserId\":\"approverUserId value\",\"approvalSequence\":999}]}",
    "endorsers": {{endorsers}}
}
Parameters:
  • asset: ApprovalPolicyCheck class – A class that defines approval rules for a transaction, which includes the following fields:
    • approvalPolicyId – The system generates this ID. You do not provide this field manually.
    • transactionLowerLimit – The minimum transaction amount the approval policy applies to.
    • transactionUpperLimit – The maximum transaction amount the approval policy applies to.
    • numberOfApprovalsRequired – The total number of approvals needed before the transaction can be completed.
    • approverDetails – A list of approvers along with their assigned approval sequence, which defines the mandatory order for approvals.
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "3a5701ca90ffb98832421c7d5377eb9c0df9fdab30a0a3ce06216808bdea098e",
        "payload": {
            "status": "active",
            "assetType": "ApprovalPolicyCheck",
            "approvalPolicyId": "GPID~500~1000",
            "transactionLowerLimit": "500",
            "transactionUpperLimit": "1000",
            "numberOfApprovalsRequired": 2,
            "approverDetails": [
                {
                    "approverOrgId": "CentralBank",
                    "approverUserId": "manager",
                    "approvalSequence": 1
                },
                {
                    "approverOrgId": "CentralBank",
                    "approverUserId": "creator",
                    "approvalSequence": 2
                }
            ]
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 284
    }
}
createStablecoinAccountPolicyCheck
Original method name: createAccountPolicyCheck
This method creates a policy for a specified account. This method can be called only by a Token Admin or Org Admin of the specified organization.
Payload:
{
    "asset": "{\"accountPolicyId\":\"accountPolicyId value\",\"orgId\":\"{{bc-org-id}}\",\"userId\":\"{{bc-user-id}}\",\"kycCompliance\":\"kycCompliance value\",\"amlCompliance\":\"amlCompliance value\",\"riskScore\":999,\"restrictionFlag\":\"restrictionFlag value\"}",
    "endorsers": {{endorsers}}
}
Parameters:
  • asset: AccountPolicyCheck class – A class that defines account policy parameters, which includes the following fields:
    • accountPolicyId – The system generates this ID from the specified orgId and userId fields. You do not provide this field manually.
    • orgId – The membership service provider (MSP) ID of the user to create the policy for.
    • userId – The user name or email ID of the user to create the policy for.
    • kycCompliance – A Boolean value that indicates whether the account satisfies KYC (Know Your Customer) requirements.
    • amlCompliance – A Boolean value that indicates whether the account satisfies AML (Anti-Money Laundering) requirements.
    • riskScore – The risk score associated with the account, which is used for compliance evaluation.
    • restrictionFlag – A Boolean value that indicates whether the account is subject to restricted transfers. If set to true, only transfers within the lowest approval-policy threshold are allowed.
    • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "02875ca9c6a7408da3f81156214228b91b09c4bb2b8026d7a5733b53598c6635",
        "payload": {
            "assetType": "AccountPolicyCheck",
            "accountPolicyId": "APID~CentralBank~cb__creator_demo",
            "orgId": "CentralBank",
            "userId": "cb__creator_demo",
            "kycCompliance": "true",
            "amlCompliance": "true",
            "riskScore": 1000,
            "restrictionFlag": "false"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 272
    }
}
deleteApprovalPolicyCheck
Original method name: deleteApprovalPolicyCheck
This method deletes the approval policy for a specified policy ID. This method can be called only by a Token Admin.
Payload:
{
    "id": "id value",
    "endorsers": {{endorsers}}
}
Parameters:
  • id: string – The unique approval policy ID.
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "5ac54d3279a183022a00495aee3c25c2893388ff9aaaecd5c3b594edfa49ad8f",
        "payload": {
            "isValid": true,
            "message": "Successfully deleted asset with ID [GPID~500~1000] from ledger"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 286
    }
}
deleteStablecoinAccount
Original method name: deleteAccount
This method deletes a fungible token account. It returns an error if the accountStatus value for the account is not found in ledger. This method can be called only by a Token Admin.
Payload:
{
    "tokenId": "{{bc-token-id}}",
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "endorsers": {{endorsers}}
}
Parameters:
  • tokenId: string – The ID of the token.
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "4bec8fc6cf31f86944b4e73334a03c55ad5630625e8320f5b9cf7cca30af929b",
        "payload": {
            "assetType": "oaccountStatus",
            "status_id": "oaccountStatus~e0a22965c400dd325e386b862b2552bbd26a281ebe4d1c29c08ccc465a26678d",
            "account_id": "oaccount~e888c90d38470956e3d98eccaa158f86a1bf0923900803b2b7cb7b4e0c10a18e",
            "status": "deleted"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 297
    }
}
deleteStablecoinAccountPolicyCheck
Original method name: deleteAccountPolicyCheck
This method deletes the policy for a specified policy ID. This method can be called only by a Token Admin or Org Admin of the specified organization.
Payload:
{
    "id": "id value",
    "endorsers": {{endorsers}}
}
Parameters:
  • id: string – The unique account policy ID.
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "5ac54d3279a183022a00495aee3c25c2893388ff9aaaecd5c3b594edfa49ad8f",
        "payload": {
            "isValid": true,
            "message": "Successfully deleted asset with ID [GPID~500~1000] from ledger"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 286
    }
}
executeHoldTokens
Original method name: executeHoldTokens
This method approves a hold on tokens, which triggers the transfer of the tokens from the sender to the receiver. The quantity of tokens put on hold previously by the token owner is now transferred to the recipient. If the quantity value is less than the actual hold value, the remaining amount is available again to the owner of the token. If the roles behavior is specified in the behaviors section of the token model and the notary_role_name value is set, the caller account must have the notary role. Otherwise, any caller with an account can function as a notary.
Payload:
{
    "tokenId": "{{bc-token-id}}",
    "operationId": "operation_id value",
    "quantity": 1,
    "endorsers": {{endorsers}}
}
Parameters:
  • tokenId: string – The ID of the token.
  • operationId: string – The unique operation ID of the mint request to approve.
  • quantity: number – The number of held tokens to transfer.
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "c1149aaa486abc4931d9024c18dfcb230bb321723d1160b0bf981c0011c4856a",
        "payload": {
            "msg": "Account Id: oaccount~51e676d7182a02ea7418ef58a6d54ecfe3858ef40b4ffb3d859b320da3921594 (Org-Id: CB, User-Id: issuer_user_cb) is successfully executed '10' tokens from Operation Id '8e3145'."
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 213
    }
}
getStablecoinAccountTransactionHistory
Original method name: getAccountTransactionHistory
This method returns an array of account transaction history details for a specified user and token. This method can be called only by a Token Admin or Token Auditor of the chaincode, an Org Admin or Org Auditor of the specified organization, or the AccountOwner of the account.
/getStablecoinAccountTransactionHistory?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}
Parameters:
  • tokenId: string – The ID of the token.
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": [
            {
                "transaction_id": "otransaction~64c5a4830949eae1424600f3d4a438c6f603a7c3ea31a68e374b899803999e22",
                "transacted_amount": 10,
                "timestamp": "2024-12-11T13:37:28.000Z",
                "balance": 550,
                "onhold_balance": 10,
                "token_id": "USD",
                "category": "category value",
                "description": "description value",
                "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0",
                "transaction_type": "REJECT_MINT",
                "transacted_org_id": "CB",
                "transacted_user_id'": "creator_user_cb"
            },
            {
                "transaction_id": "otransaction~a4537ef34a955b023b7c205b9abf06a6c79e4fdd761fb24f41b8eb34126b66c0",
                "transacted_amount": 10,
                "timestamp": "2024-12-11T13:36:32.000Z",
                "balance": 550,
                "onhold_balance": 10,
                "token_id": "USD",
                "description": "description value",
                "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0",
                "transaction_type": "APPROVE_MINT",
                "transacted_org_id": "CB",
                "transacted_user_id'": "creator_user_cb"
            },
            {
                "transaction_id": "otransaction~6237a759422bd9fb112742e8cd7e6450df5a74a32236d9b1005571afed8904a4",
                "transacted_amount": 10,
                "timestamp": "2024-12-11T13:36:18.000Z",
                "balance": 540,
                "onhold_balance": 10,
                "token_id": "USD",
                "category": "category value",
                "description": "description value",
                "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0",
                "transaction_type": "REQUEST_MINT",
                "transacted_org_id": "CB",
                "transacted_user_id'": "creator_user_cb"
            },
            {
                "transaction_id": "otransaction~06b35071415d74aa1a7c18449149c937d886cae76a832c44cf8d98e84586e76e",
                "transacted_amount": 10,
                "timestamp": "2024-12-11T13:35:46.000Z",
                "balance": 540,
                "onhold_balance": 10,
                "token_id": "USD",
                "category": "category value",
                "description": "description value",
                "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0",
                "transaction_type": "REQUEST_MINT",
                "transacted_org_id": "CB",
                "transacted_user_id'": "creator_user_cb"
            }
        ],
        "encode": "JSON"
    }
}
getAllAccounts
Original method name: getAllAccounts
This method returns a list of all accounts. This method can be called only by a Token Admin or Token Auditor.
Payload:
{{api-gateway-endpoint1}}/getAllAccounts
Parameters:
  • none
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": [
            {
                "key": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2",
                "valueJson": {
                    "account_id": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2",
                    "assetType": "oaccount",
                    "balance": 49390,
                    "bapAccountVersion": 7,
                    "current_date": "2025-11-21T00:00:00.000Z",
                    "daily_amount": 610,
                    "daily_transactions": 2,
                    "max_daily_amount": 10000,
                    "max_daily_transactions": 100,
                    "onhold_balance": 0,
                    "onhold_burn_balance": 0,
                    "org_id": "CentralBank",
                    "token_id": "t1",
                    "token_name": "stablecoin",
                    "token_type": "fungible",
                    "user_id": "cb__creator_demo"
                }
            },
            {
                "key": "oaccount~f44e4d75c0fec749392566e745cd39c453c3039aa7224ae417bc4379b645827c",
                "valueJson": {
                    "bapAccountVersion": 0,
                    "assetType": "oaccount",
                    "account_id": "oaccount~f44e4d75c0fec749392566e745cd39c453c3039aa7224ae417bc4379b645827c",
                    "user_id": "cb_manager_demo",
                    "org_id": "CentralBank",
                    "token_type": "fungible",
                    "token_id": "t1",
                    "token_name": "stablecoin",
                    "balance": 0,
                    "onhold_balance": 0,
                    "onhold_burn_balance": 0,
                    "max_daily_amount": 10000,
                    "daily_amount": 0,
                    "max_daily_transactions": 100,
                    "daily_transactions": 0,
                    "current_date": "2025-11-20T00:00:00.000Z"
                }
            },
            {
                "key": "oaccount~79c427e614530eacad6fb07cff6048f6b96283e65019301320c9684932846f64",
                "valueJson": {
                    "account_id": "oaccount~79c427e614530eacad6fb07cff6048f6b96283e65019301320c9684932846f64",
                    "assetType": "oaccount",
                    "balance": 610,
                    "bapAccountVersion": 2,
                    "current_date": "2025-11-20T00:00:00.000Z",
                    "daily_amount": 0,
                    "daily_transactions": 0,
                    "max_daily_amount": 10000,
                    "max_daily_transactions": 100,
                    "onhold_balance": 0,
                    "onhold_burn_balance": 0,
                    "org_id": "CentralBank",
                    "token_id": "t1",
                    "token_name": "stablecoin",
                    "token_type": "fungible",
                    "user_id": "cb_issuer_demo"
                }
            },
            {
                "key": "oaccount~1cf5d40c7ea7b9dceedfc66292ab843c1583564c3ecaf9f5ceb11f834018b02f",
                "valueJson": {
                    "account_id": "oaccount~1cf5d40c7ea7b9dceedfc66292ab843c1583564c3ecaf9f5ceb11f834018b02f",
                    "assetType": "oaccount",
                    "balance": 0,
                    "bapAccountVersion": 1,
                    "current_date": "2025-11-20T00:00:00.000Z",
                    "daily_amount": 0,
                    "daily_transactions": 0,
                    "max_daily_amount": 10000,
                    "max_daily_transactions": 100,
                    "onhold_balance": 0,
                    "onhold_burn_balance": 0,
                    "org_id": "CentralBank",
                    "token_id": "t1",
                    "token_name": "stablecoin",
                    "token_type": "fungible",
                    "user_id": "manager"
                }
            },
            {
                "key": "oaccount~09abdd306d4fcbc1b794e2e0b8fc4ce3d8282e11846ef35d675cc9540da4ad1b",
                "valueJson": {
                    "account_id": "oaccount~09abdd306d4fcbc1b794e2e0b8fc4ce3d8282e11846ef35d675cc9540da4ad1b",
                    "assetType": "oaccount",
                    "balance": 0,
                    "bapAccountVersion": 1,
                    "current_date": "2025-11-20T00:00:00.000Z",
                    "daily_amount": 0,
                    "daily_transactions": 0,
                    "max_daily_amount": 10000,
                    "max_daily_transactions": 100,
                    "onhold_balance": 0,
                    "onhold_burn_balance": 0,
                    "org_id": "CentralBank",
                    "token_id": "t1",
                    "token_name": "stablecoin",
                    "token_type": "fungible",
                    "user_id": "creator"
                }
            },
            {
                "key": "oaccount~e888c90d38470956e3d98eccaa158f86a1bf0923900803b2b7cb7b4e0c10a18e",
                "valueJson": {
                    "assetType": "oaccount",
                    "account_id": "oaccount~e888c90d38470956e3d98eccaa158f86a1bf0923900803b2b7cb7b4e0c10a18e",
                    "user_id": "user1",
                    "org_id": "CentralBank",
                    "token_type": "fungible",
                    "token_id": "t1",
                    "token_name": "stablecoin",
                    "balance": 0,
                    "onhold_balance": 0,
                    "onhold_burn_balance": 0,
                    "max_daily_amount": 10000,
                    "daily_amount": 0,
                    "max_daily_transactions": 100,
                    "daily_transactions": 0,
                    "current_date": "2025-11-24T00:00:00.000Z"
                }
            }
        ],
        "encode": "JSON"
    }
}
getAllOrgAccounts
Original method name: getAllOrgAccounts
This method returns a list of all token accounts that belong to a specified organization. This method can be called only by a Token Admin, Token Auditor, or by an Org Admin or Org Auditor of the specified organization.
Payload:
{{api-gateway-endpoint1}}/getAllOrgAccounts?orgId={{bc-org-id}}
Parameters:
  • orgId: string – The membership service provider (MSP) ID of the organization.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": [
            {
                "key": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2",
                "valueJson": {
                    "account_id": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2",
                    "assetType": "oaccount",
                    "balance": 49390,
                    "bapAccountVersion": 7,
                    "current_date": "2025-11-21T00:00:00.000Z",
                    "daily_amount": 610,
                    "daily_transactions": 2,
                    "max_daily_amount": 10000,
                    "max_daily_transactions": 100,
                    "onhold_balance": 0,
                    "onhold_burn_balance": 0,
                    "org_id": "CentralBank",
                    "token_id": "t1",
                    "token_name": "stablecoin",
                    "token_type": "fungible",
                    "user_id": "cb__creator_demo"
                }
            },
            {
                "key": "oaccount~f44e4d75c0fec749392566e745cd39c453c3039aa7224ae417bc4379b645827c",
                "valueJson": {
                    "bapAccountVersion": 0,
                    "assetType": "oaccount",
                    "account_id": "oaccount~f44e4d75c0fec749392566e745cd39c453c3039aa7224ae417bc4379b645827c",
                    "user_id": "cb_manager_demo",
                    "org_id": "CentralBank",
                    "token_type": "fungible",
                    "token_id": "t1",
                    "token_name": "stablecoin",
                    "balance": 0,
                    "onhold_balance": 0,
                    "onhold_burn_balance": 0,
                    "max_daily_amount": 10000,
                    "daily_amount": 0,
                    "max_daily_transactions": 100,
                    "daily_transactions": 0,
                    "current_date": "2025-11-20T00:00:00.000Z"
                }
            },
            {
                "key": "oaccount~79c427e614530eacad6fb07cff6048f6b96283e65019301320c9684932846f64",
                "valueJson": {
                    "account_id": "oaccount~79c427e614530eacad6fb07cff6048f6b96283e65019301320c9684932846f64",
                    "assetType": "oaccount",
                    "balance": 610,
                    "bapAccountVersion": 2,
                    "current_date": "2025-11-20T00:00:00.000Z",
                    "daily_amount": 0,
                    "daily_transactions": 0,
                    "max_daily_amount": 10000,
                    "max_daily_transactions": 100,
                    "onhold_balance": 0,
                    "onhold_burn_balance": 0,
                    "org_id": "CentralBank",
                    "token_id": "t1",
                    "token_name": "stablecoin",
                    "token_type": "fungible",
                    "user_id": "cb_issuer_demo"
                }
            },
            {
                "key": "oaccount~1cf5d40c7ea7b9dceedfc66292ab843c1583564c3ecaf9f5ceb11f834018b02f",
                "valueJson": {
                    "account_id": "oaccount~1cf5d40c7ea7b9dceedfc66292ab843c1583564c3ecaf9f5ceb11f834018b02f",
                    "assetType": "oaccount",
                    "balance": 0,
                    "bapAccountVersion": 1,
                    "current_date": "2025-11-20T00:00:00.000Z",
                    "daily_amount": 0,
                    "daily_transactions": 0,
                    "max_daily_amount": 10000,
                    "max_daily_transactions": 100,
                    "onhold_balance": 0,
                    "onhold_burn_balance": 0,
                    "org_id": "CentralBank",
                    "token_id": "t1",
                    "token_name": "stablecoin",
                    "token_type": "fungible",
                    "user_id": "manager"
                }
            },
            {
                "key": "oaccount~09abdd306d4fcbc1b794e2e0b8fc4ce3d8282e11846ef35d675cc9540da4ad1b",
                "valueJson": {
                    "account_id": "oaccount~09abdd306d4fcbc1b794e2e0b8fc4ce3d8282e11846ef35d675cc9540da4ad1b",
                    "assetType": "oaccount",
                    "balance": 0,
                    "bapAccountVersion": 1,
                    "current_date": "2025-11-20T00:00:00.000Z",
                    "daily_amount": 0,
                    "daily_transactions": 0,
                    "max_daily_amount": 10000,
                    "max_daily_transactions": 100,
                    "onhold_balance": 0,
                    "onhold_burn_balance": 0,
                    "org_id": "CentralBank",
                    "token_id": "t1",
                    "token_name": "stablecoin",
                    "token_type": "fungible",
                    "user_id": "creator"
                }
            },
            {
                "key": "oaccount~e888c90d38470956e3d98eccaa158f86a1bf0923900803b2b7cb7b4e0c10a18e",
                "valueJson": {
                    "assetType": "oaccount",
                    "account_id": "oaccount~e888c90d38470956e3d98eccaa158f86a1bf0923900803b2b7cb7b4e0c10a18e",
                    "user_id": "user1",
                    "org_id": "CentralBank",
                    "token_type": "fungible",
                    "token_id": "t1",
                    "token_name": "stablecoin",
                    "balance": 0,
                    "onhold_balance": 0,
                    "onhold_burn_balance": 0,
                    "max_daily_amount": 10000,
                    "daily_amount": 0,
                    "max_daily_transactions": 100,
                    "daily_transactions": 0,
                    "current_date": "2025-11-24T00:00:00.000Z"
                }
            }
        ],
        "encode": "JSON"
    }
}
getAllTokenAdmins
Original method name: getAllTokenAdmins
This method returns a list of all users who are a Token Admin. This method can be called only by the Token Admin or Token Auditor.
Payload:
{{api-gateway-endpoint1}}/getAllTokenAdmins
Parameters:
  • none
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "admins": [
                {
                    "org_id": "CentralBank",
                    "user_id": "cb_admin_demo"
                }
            ]
        },
        "encode": "JSON"
    }
}
getAllTokens
Original method name: getAllTokens
This method returns all tokens that are stored in the state database. This method can be called only by a Token Admin, Token Auditor, Org Admin, or Org Auditor. This method uses Berkeley DB SQL rich queries and can only be called when connected to the remote Oracle Blockchain Platform network.
Payload:
{{api-gateway-endpoint1}}/getAllTokens
Parameters:
  • none
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": [
            {
                "key": "t1",
                "valueJson": {
                    "assetType": "otoken",
                    "events": false,
                    "token_id": "t1",
                    "token_name": "stablecoin",
                    "token_desc": "token_desc value",
                    "token_standard": "ttf+",
                    "token_type": "fungible",
                    "token_unit": "fractional",
                    "behaviors": [
                        "divisible",
                        "mintable",
                        "transferable",
                        "burnable",
                        "holdable",
                        "roles"
                    ],
                    "roles": {
                        "minter_role_name": "minter",
                        "burner_role_name": "burner",
                        "notary_role_name": "notary",
                        "mint_approver_role_name": "notary",
                        "burn_approver_role_name": "notary"
                    },
                    "mintable": {
                        "max_mint_quantity": 0,
                        "mint_approval_required": true
                    },
                    "burnable": {
                        "burn_approval_required": true
                    },
                    "divisible": {
                        "decimal": 2
                    },
                    "currencyName": "currencyName value",
                    "conversionRate": 999
                }
            }
        ],
        "encode": "JSON"
    }
}
getApprovalPolicyCheckById
Original method name: getApprovalPolicyCheckById
This method gets the approval policy details for a specified policy ID. This method can be called only by a Token Admin or Token Auditor.
Payload:
{{api-gateway-endpoint1}}/getApprovalPolicyCheckById?id=id value
Parameters:
  • id: string – The unique approval policy ID.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "assetType": "ApprovalPolicyCheck",
            "approvalPolicyId": "GPID~0~100",
            "transactionLowerLimit": "0",
            "transactionUpperLimit": "100",
            "numberOfApprovalsRequired": 0,
            "approverDetails": []
        },
        "encode": "JSON"
    }
}
getApprovalTransactionsById
Original method name: getApprovalTransactionsById
This method gets the approval transaction for a specified transaction ID. This method can be called only by a Token Admin or Org Admin of the associated organization.
Payload:
{{api-gateway-endpoint1}}/getApprovalTransactionsById?id=id value
Parameters:
  • id: string – The system-generated ID of the approval transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "assetType": "ApprovalTransactions",
            "approvalTransactionId": "hold1~oaccount~1cf5d40c7ea7b9dceedfc66292ab843c1583564c3ecaf9f5ceb11f834018b02f",
            "approvalOperationId": "hold1",
            "fromAccountId": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2",
            "toAccountId": "oaccount~79c427e614530eacad6fb07cff6048f6b96283e65019301320c9684932846f64",
            "approverAccountId": "oaccount~1cf5d40c7ea7b9dceedfc66292ab843c1583564c3ecaf9f5ceb11f834018b02f",
            "totalApprovals": 1,
            "timestamp": "2025-11-21T12:32:43.000Z"
        },
        "encode": "JSON"
    }
}
getApproverDetailsByTransferAmount
Original method name: getApproverDetailsByTransferAmount
This method gets the approver details that are required for a given transfer amount. This method can be called only by a Token Admin or Token Auditor.
Payload:
{
    "Amount": 1,
    "endorsers": {{endorsers}}
}
Parameters:
  • amount: number – The transfer amount.
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "5874105c14abd67e68cb4dacf82f2a2dca6cc9da4f5b27fcc91c83a60b7249e1",
        "payload": {
            "approverDetails": [
                {
                    "approverOrgId": "CentralBank",
                    "approverUserId": "manager",
                    "approvalSequence": 1
                },
                {
                    "approverOrgId": "CentralBank",
                    "approverUserId": "creator",
                    "approvalSequence": 2
                }
            ]
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 292
    }
}
getMaxDailyAmount
Original method name: getMaxDailyAmount
This method gets the maximum daily cumulative transaction amount for a specified account. This method can be called only by a Token Admin or Token Auditor of the chaincode or an Org Admin or Org Auditor of the specified organization.
Payload:
{{api-gateway-endpoint1}}/getMaxDailyAmount?OrgId={{bc-org-id}}&UserId={{bc-user-id}}&TokenId={{bc-token-id}}
Parameters:
  • tokenId: string – The ID of the token.
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "max_daily_amount": 10000
        },
        "encode": "JSON"
    }
}
getMaxDailyTransactionCount
Original method name: getMaxDailyTransactionCount
This method gets the maximum number of daily transactions for a specified account. This method can be called only by a Token Admin or Token Auditor of the chaincode or an Org Admin or Org Auditor of the specified organization.
Payload:
{{api-gateway-endpoint1}}/getMaxDailyTransactionCount?OrgId={{bc-org-id}}&UserId={{bc-user-id}}&TokenId={{bc-token-id}}
Parameters:
  • tokenId: string – The ID of the token.
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "max_daily_transactions": 100
        },
        "encode": "JSON"
    }
}
getNetTokens
Original method name: getNetTokens
This GET method returns the total net number of tokens available in the system for a specified token. The net token total is the amount of tokens remaining after tokens are burned. This method can be called only by a Token Admin or Token Auditor, or an Org Admin or Org Auditor.
/getNetStablecoinTokens?tokenId={{bc-token-id}}
Parameters:
  • tokenId: string – The ID of the token.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "msg": "Net supply of token for Token Id: USD is 878 tokens.",
            "quantity": 878
        },
        "encode": "JSON"
    }
}
getOnHoldBalanceWithOperationId
Original method name: getOnHoldBalanceWithOperationId
This method returns the on-hold balance for a specified operation ID and token. This method can be called only by a Token Admin or Token Auditor, or by the sender, receiver, or notary associated with the operation.
Payload:
{{api-gateway-endpoint1}}/getOnHoldBalanceWithOperationId?tokenId={{bc-token-id}}&operationId=operation_id value
Parameters:
  • tokenId: string – The ID of the token.
  • operationId: string – A unique ID to identify the hold operation. Typically this ID is passed by the client application.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "msg": "Current Holding Balance of Operation 'hold2' for token 't1' is: 600",
            "holding_balance": 600
        },
        "encode": "JSON"
    }
}
getOnHoldDetailsWithOperationId
Original method name: getOnHoldDetailsWithOperationId
This method returns the on-hold transaction details for a specified operation ID and token. This method can be called only by a Token Admin or Token Auditor, or by the sender, receiver, or notary associated with the operation.
Payload:
{{api-gateway-endpoint1}}/getOnHoldDetailsWithOperationId?tokenId={{bc-token-id}}&operationId=operation_id value
Parameters:
  • tokenId: string – The ID of the token.
  • operationId: string – A unique ID to identify the hold operation. Typically this ID is passed by the client application.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "bapHoldVersion": 1,
            "assetType": "ohold",
            "holding_id": "ohold~stablecoin~t1~hold2",
            "operation_id": "hold2",
            "token_id": "t1",
            "token_name": "stablecoin",
            "operation_type": "transfer",
            "status": "pending",
            "from_account_id": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2",
            "to_account_id": "oaccount~79c427e614530eacad6fb07cff6048f6b96283e65019301320c9684932846f64",
            "notary_account_id": "oaccount~f44e4d75c0fec749392566e745cd39c453c3039aa7224ae417bc4379b645827c",
            "quantity": 600,
            "time_to_expiration": "0",
            "category": "category value",
            "description": "description value"
        },
        "encode": "JSON"
    }
}
getOnHoldIds
Original method name: getOnHoldIds
This GET method returns a list of all of the holding IDs for a specified account. This method can be called only by a Token Admin or Token Auditor of the chaincode, an Org Admin or Org Auditor of the specified organization, or the AccountOwner of the account.
/getOnHoldIds?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}
Parameters:
  • tokenId: string – The ID of the token.
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "msg": "Holding Ids are: ohold~Stablecoin~USD~8e3147,ohold~Stablecoin~USD~8e315",
            "holding_ids": [
                "ohold~Stablecoin~USD~8e3147",
                "ohold~Stablecoin~USD~8e315"
            ]
        },
        "encode": "JSON"
    }
}
getOrgAccountsByRole
Original method name: getOrgAccountsByRole
This method returns information about all accounts that have a specified role in a specified organization. This method can be called only by a Token Admin or Token Auditor, or by an Org Admin or Org Auditor of the specified organization.
Payload:
{{api-gateway-endpoint1}}/getOrgAccountsByRole?tokenId={{bc-token-id}}&role=role value (for example minter / burner / notary)&orgId={{bc-org-id}}
Parameters:
  • tokenId: string – The ID of the token.
  • role: string – The name of the role to check for.
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "accounts": [
                "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2"
            ]
        },
        "encode": "JSON"
    }
}
getOrgAdmins
Original method name: getOrgAdmins
This method returns a list of all users who are an Org Admin of an organization. This method can be called only by a Token Admin or Token Auditor, or by an Org Admin or Org Auditor of the associated organization.
Payload:
{{api-gateway-endpoint1}}/getOrgAdmins
Parameters:
  • none
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "admins": [
                {
                    "org_id": "CentralBank",
                    "user_id": "cb__creator_demo"
                }
            ]
        },
        "encode": "JSON"
    }
}
getOrgAuditors
Original method name: getOrgAuditors
This method returns a list of all users who are an Org Auditor of an organization. This method can be called only by a Token Admin or Token Auditor, or by an Org Admin or Org Auditor of the associated organization.
Payload:
{{api-gateway-endpoint1}}/getOrgAuditors
Parameters:
  • none
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "admins": [
                {
                    "org_id": "CentralBank",
                    "user_id": "cb_auditor_demo"
                }
            ]
        },
        "encode": "JSON"
    }
}
getOrgUsersByRole
Original method name: getOrgUsersByRole
This method returns information about all users that have a specified role in a specified organization. This method can be called only by a Token Admin or Token Auditor, or by an Org Admin or Org Auditor of the specified organization.
Payload:
{{api-gateway-endpoint1}}/getOrgUsersByRole?tokenId={{bc-token-id}}&role=role value (for example minter / burner / notary)&orgId={{bc-org-id}}
Parameters:
  • tokenId: string – The ID of the token.
  • role: string – The name of the role to check for.
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "users": [
                {
                    "token_id": "t1",
                    "user_id": "cb__creator_demo",
                    "org_id": "CentralBank"
                }
            ]
        },
        "encode": "JSON"
    }
}
getStablecoinAccount
Original method name: getAccount
This GET method returns account details for a specified user and token. This method can be called only by a Token Admin or Token Auditor of the chaincode, an Org Admin or Org Auditor of the specified organization, or the AccountOwner of the account.
Query:
/getStablecoinAccount?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}
Parameters:
  • tokenId: string – The ID of the token.
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "bapAccountVersion": 0,
            "assetType": "oaccount",
            "status": "active",
            "account_id": "oaccount~cdc6fa5e64bc29f700f99da69f980d8cbb768c7e1a11dd17274e75651f6afafe",
            "user_id": "admin_user_cb",
            "org_id": "CB",
            "token_type": "fungible",
            "token_id": "USD",
            "token_name": "Stablecoin",
            "balance": 0,
            "onhold_balance": 0,
            "max_daily_amount": 10000,
            "daily_amount": 0,
            "max_daily_transactions": 1000,
            "daily_transactions": 0,
            "current_date": "2024-11-20T00:00:00.000Z"
        },
        "encode": "JSON"
    }
}
getStablecoinAccountBalance
Original method name: getAccountBalance
This GET method returns the current balance for a specified account and token. This method can be called only by a Token Admin or Token Auditor of the chaincode, an Org Admin or Org Auditor of the specified organization, or the AccountOwner of the account.
/getStablecoinAccountBalance?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}
Parameters:
  • tokenId: string – The ID of the token.
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "msg": "Current Balance is: 100",
            "user_balance": 100
        },
        "encode": "JSON"
    }
}
getStablecoinAccountOnHoldBalance
Original method name: getAccountOnHoldBalance
This method returns the current on-hold balance for a specified account and token. This method can be called only by a Token Admin or Token Auditor, an Org Admin or Org Auditor of the specified organization, or the owner of the account.
Payload:
{{api-gateway-endpoint1}}/getStablecoinAccountOnHoldBalance?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}
Parameters:
  • tokenId: string – The ID of the token.
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "msg": "Total Holding Balance is: 600",
            "holding_balance": 600
        },
        "encode": "JSON"
    }
}
getStablecoinAccountOnHoldBurnBalance
Original method name: getAccountOnHoldBurnBalance
This method returns the on-hold burn balance for a specified user. This method can be called only by a Token Admin or Token Auditor, an Org Admin or Org Auditor of the specified organization, or the owner of the account.
Payload:
{{api-gateway-endpoint1}}/getStablecoinAccountOnHoldBurnBalance?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}
Parameters:
  • tokenId: string – The ID of the token.
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "msg": "Total On Hold Burning Balance is: 0",
            "onhold_burn_balance": 0
        },
        "encode": "JSON"
    }
}    
getStablecoinAccountPolicyCheckById
Original method name: getAccountPolicyCheckById
This method gets the account policy details for a specified policy ID. This method can be called only by a Token Admin or Token Auditor, or an Org Admin or Org Auditor of the specified organization.
Payload:
{{api-gateway-endpoint1}}/getStablecoinAccountPolicyCheckById?id=id value
Parameters:
  • id: string – The unique account policy ID.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "02875ca9c6a7408da3f81156214228b91b09c4bb2b8026d7a5733b53598c6635",
        "payload": {
            "assetType": "AccountPolicyCheck",
            "accountPolicyId": "APID~CentralBank~cb__creator_demo",
            "orgId": "CentralBank",
            "userId": "cb__creator_demo",
            "kycCompliance": "true",
            "amlCompliance": "true",
            "riskScore": 1000,
            "restrictionFlag": "false"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 272
    }
}
getStablecoinAccountsByRole
Original method name: getAccountsByRole
This method returns a list of all account IDs for a specified role and token. This method can be called only by a Token Admin or Token Auditor.
Payload:
{{api-gateway-endpoint1}}/getStablecoinAccountsByRole?tokenId={{bc-token-id}}&role=role value (for example minter / burner / notary)
Parameters:
  • tokenId: string – The ID of the token.
  • role: string – The name of the role to check for.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "accounts": [
                "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2"
            ]
        },
        "encode": "JSON"
    }
}
getStablecoinAccountsByUser
Original method name: getAccountsByUser
This method returns a list of all account IDs for a specified organization ID and user ID. This method can be called only by a Token Admin or Token Auditor of the chaincode, an Org Admin or Org Auditor of the specified organization, or the AccountOwner of the account.
/getStablecoinAccountsByUser?orgId={{bc-org-id}}&userId={{bc-user-id}}
Parameters:
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": [
            {
                "bapAccountVersion": 0,
                "assetType": "oaccount",
                "account_id": "oaccount~8db15b42910eeec401e1bf22c69dfdd11c820ecc26539ea03a3426fa25cb8c28",
                "user_id": "admin_user_cb",
                "org_id": "CB",
                "token_type": "fungible",
                "token_id": "",
                "token_name": "",
                "balance": 0,
                "onhold_balance": 0,
                "max_daily_amount": 10000,
                "daily_amount": 0,
                "max_daily_transactions": 1000,
                "daily_transactions": 0,
                "current_date": "2024-11-20T00:00:00.000Z"
            },
            {
                "bapAccountVersion": 0,
                "assetType": "oaccount",
                "account_id": "oaccount~cdc6fa5e64bc29f700f99da69f980d8cbb768c7e1a11dd17274e75651f6afafe",
                "user_id": "admin_user_cb",
                "org_id": "CB",
                "token_type": "fungible",
                "token_id": "USD",
                "token_name": "Stablecoin",
                "balance": 0,
                "onhold_balance": 0,
                "max_daily_amount": 10000,
                "daily_amount": 0,
                "max_daily_transactions": 1000,
                "daily_transactions": 0,
                "current_date": "2024-11-20T00:00:00.000Z"
            },
            {
                "bapAccountVersion": 0,
                "assetType": "oaccount",
                "account_id": "oaccount~28ac774001f374064029d51af4fb67e26ea1ea9ef62828b7a72dbf3beb8efd8d",
                "user_id": "admin_user_cb",
                "org_id": "CB",
                "token_type": "fungible",
                "token_id": "",
                "token_name": "",
                "balance": 0,
                "onhold_balance": 0,
                "max_daily_amount": 10000,
                "daily_amount": 0,
                "max_daily_transactions": 100,
                "daily_transactions": 0,
                "current_date": "2024-12-09T00:00:00.000Z"
            }
        ],
        "encode": "JSON"
    }
}
getStablecoinAccountStatus
Original method name: getAccountStatus
This method gets the current status of the token account. This method can be called by the Token Admin or Token Auditor, or an Org Admin or Org Auditor of the specified organization, or by the token account owner. If the accountStatus value is not found in the ledger, this method returns an accountStatus object with the status set to active.
Payload:
{{api-gateway-endpoint1}}/getStablecoinAccountStatus?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}
Parameters:
  • tokenId: string – The ID of the token.
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "assetType": "oaccountStatus",
            "status_id": "oaccountStatus~cfe302f06bf732f248315725bb601d7906d7c1d4c167d04ac3a5283b8dbc7fc4",
            "account_id": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2",
            "status": "active"
        },
        "encode": "JSON"
    }
}
getStablecoinAccountTransactionHistoryWithFilters
Original method name: getAccountTransactionHistoryWithFiltersFromRichHistDB
This method returns the account transaction history details from the rich history database. This method can be called only by a Token Admin or Token Auditor of the chaincode, an Org Admin or Org Auditor of the specified organization, or the AccountOwner of the account.
/getStablecoinAccountTransactionHistoryWithFilters?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}&customEndpoint=custom_endpoint value&bearerToken=bearer_token value&filters={"pageSize":20,"bookmark":"","startTime":"2022-01-16T15:16:36+00:00","endTime":"2022-01-17T15:16:36+00:00"}
Parameters:
  • tokenId: string – The ID of the token.
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
  • customEndpoint – The RESTful service endpoint of the rich history database to fetch the transaction history from.
  • bearerToken – The token to use to call the RESTful endpoint to ensure that the request is authorized.
  • filters: JSON object – An optional parameter. If empty, all records are returned. The pageSize property determines the number of records to return. If pageSize is 0, the default page size is 20. The bookmark property determines the starting index of the records to return. The startTime and endTime properties must be specified in RFC-3339 format.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": [
            {
                "transaction_id": "otransaction~64c5a4830949eae1424600f3d4a438c6f603a7c3ea31a68e374b899803999e22",
                "transacted_amount": 10,
                "timestamp": "2024-12-11T13:37:28.000Z",
                "balance": 550,
                "onhold_balance": 10,
                "token_id": "USD",
                "category": "category value",
                "description": "description value",
                "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0",
                "transaction_type": "REJECT_MINT",
                "transacted_org_id": "CB",
                "transacted_user_id'": "creator_user_cb"
            },
            {
                "transaction_id": "otransaction~a4537ef34a955b023b7c205b9abf06a6c79e4fdd761fb24f41b8eb34126b66c0",
                "transacted_amount": 10,
                "timestamp": "2024-12-11T13:36:32.000Z",
                "balance": 550,
                "onhold_balance": 10,
                "token_id": "USD",
                "description": "description value",
                "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0",
                "transaction_type": "APPROVE_MINT",
                "transacted_org_id": "CB",
                "transacted_user_id'": "creator_user_cb"
            },
            {
                "transaction_id": "otransaction~6237a759422bd9fb112742e8cd7e6450df5a74a32236d9b1005571afed8904a4",
                "transacted_amount": 10,
                "timestamp": "2024-12-11T13:36:18.000Z",
                "balance": 540,
                "onhold_balance": 10,
                "token_id": "USD",
                "category": "category value",
                "description": "description value",
                "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0",
                "transaction_type": "REQUEST_MINT",
                "transacted_org_id": "CB",
                "transacted_user_id'": "creator_user_cb"
            },
            {
                "transaction_id": "otransaction~06b35071415d74aa1a7c18449149c937d886cae76a832c44cf8d98e84586e76e",
                "transacted_amount": 10,
                "timestamp": "2024-12-11T13:35:46.000Z",
                "balance": 540,
                "onhold_balance": 10,
                "token_id": "USD",
                "category": "category value",
                "description": "description value",
                "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0",
                "transaction_type": "REQUEST_MINT",
                "transacted_org_id": "CB",
                "transacted_user_id'": "creator_user_cb"
            }
        ],
        "encode": "JSON"
    }
}
getTokenAuditors
Original method name: getTokenAuditors
This method returns all Token Auditors of the chaincode. This method can be called only by a Token Admin or Token Auditor.
Payload:
 	
{{api-gateway-endpoint1}}/getTokenAuditors
Parameters:
  • none
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "auditors": [
                {
                    "org_id": "CentralBank",
                    "user_id": "cb_auditor_demo"
                }
            ]
        },
        "encode": "JSON"
    }
}
getTokenById
Original method name: getTokenById
This method returns the token details for a specified token ID. This method can be called only by a Token Admin or Token Auditor, or an Org Admin or Org Auditor of any organization.
Payload:
{{api-gateway-endpoint1}}/getTokenById?tokenId={{bc-token-id}}
Parameters:
  • tokenId: string – The ID of the token.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "assetType": "otoken",
            "events": false,
            "token_id": "t1",
            "token_name": "stablecoin",
            "token_desc": "token_desc value",
            "token_standard": "ttf+",
            "token_type": "fungible",
            "token_unit": "fractional",
            "behaviors": [
                "divisible",
                "mintable",
                "transferable",
                "burnable",
                "holdable",
                "roles"
            ],
            "roles": {
                "minter_role_name": "minter",
                "burner_role_name": "burner",
                "notary_role_name": "notary",
                "mint_approver_role_name": "notary",
                "burn_approver_role_name": "notary"
            },
            "mintable": {
                "max_mint_quantity": 0,
                "mint_approval_required": true
            },
            "burnable": {
                "burn_approval_required": true
            },
            "divisible": {
                "decimal": 2
            },
            "currencyName": "currencyName value",
            "conversionRate": 999
        },
        "encode": "JSON"
    }
}
getTokenHistory
Original method name: getTokenHistory
This method returns the token history for a specified token ID. This method can be called only by a Token Admin or Token Auditor, or an Org Admin or Org Auditor of any organization.
Payload:
{{api-gateway-endpoint1}}/getTokenHistory?tokenId={{bc-token-id}}
Parameters:
  • tokenId: string – The ID of the token.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": [
            {
                "trxId": "28c205ee6f607d77490ab28aa99729a700c34e524efe805b213a526e58dd2b40",
                "timeStamp": "2025-11-20T21:30:16.000Z",
                "value": {
                    "assetType": "otoken",
                    "events": false,
                    "token_id": "t1",
                    "token_name": "stablecoin",
                    "token_desc": "token_desc value",
                    "token_standard": "ttf+",
                    "token_type": "fungible",
                    "token_unit": "fractional",
                    "behaviors": [
                        "divisible",
                        "mintable",
                        "transferable",
                        "burnable",
                        "holdable",
                        "roles"
                    ],
                    "roles": {
                        "minter_role_name": "minter",
                        "burner_role_name": "burner",
                        "notary_role_name": "notary",
                        "mint_approver_role_name": "notary",
                        "burn_approver_role_name": "notary"
                    },
                    "mintable": {
                        "max_mint_quantity": 0,
                        "mint_approval_required": true
                    },
                    "burnable": {
                        "burn_approval_required": true
                    },
                    "divisible": {
                        "decimal": 2
                    },
                    "currencyName": "currencyName value",
                    "conversionRate": 999
                }
            }
        ],
        "encode": "JSON"
    }
}
getTotalMintedTokens
Original method name: getTotalMintedTokens
This method returns the total number of minted tokens for a specified token. This method can be called only by a Token Admin, Token Auditor, Org Admin, or Org Auditor.
Query:
/getTotalCreatedStablecoinTokens?tokenId={{bc-token-id}}
Parameters:
  • tokenId: string – The ID of the token.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "msg": "Total minted token for Token Id: USD is 910 tokens.",
            "quantity": 910
        },
        "encode": "JSON"
    }
}
getTransactionById
Original method name: getTransactionById
This method returns the detailed transaction record for a specified transaction ID. This method can be called only by the Token Admin or by any account specified by the transaction (sender, receiver, or notary).
Payload:
{{api-gateway-endpoint1}}/getTransactionById?transactionId=transaction_id value
Parameters:
  • transaction_id string – The ID of the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "transaction_id": "otransaction~493a6cdcaac058ab6ae2bd001e8a761e378e99e283b06443041d286d46d077c4",
            "history": [
                {
                    "trxId": "493a6cdcaac058ab6ae2bd001e8a761e378e99e283b06443041d286d46d077c4",
                    "timeStamp": "2025-11-24T09:50:59.000Z",
                    "value": {
                        "assetType": "otransaction",
                        "transaction_id": "otransaction~493a6cdcaac058ab6ae2bd001e8a761e378e99e283b06443041d286d46d077c4",
                        "token_id": "t1",
                        "from_account_id": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2",
                        "from_account_onhold_burn_balance": 0,
                        "to_account_id": "oaccount~79c427e614530eacad6fb07cff6048f6b96283e65019301320c9684932846f64",
                        "to_account_onhold_burn_balance": 0,
                        "transaction_type": "ONHOLD",
                        "amount": 600,
                        "timestamp": "2025-11-24T09:50:59.000Z",
                        "number_of_sub_transactions": 0,
                        "holding_id": "ohold~stablecoin~t1~hold2",
                        "sub_transaction": "false",
                        "category": "category value",
                        "description": "description value"
                    }
                }
            ],
            "sub_transactions": []
        },
        "encode": "JSON"
    }
}
getUserByStablecoinAccountId
Original method name: getUserByAccountId
This method returns user details (org_id, user_id, and token_id) for a specified account. This method can be called only by a Token Admin or Token Auditor of the chaincode, or an Org Admin or Org Auditor of the specified organization.
Query:
/getUserByStablecoinAccountId?accountId=account_id value
Parameters:
  • accountId: string – The ID of the account.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "token_id": "USD",
            "user_id": "admin_user_cb",
            "org_id": "CB"
        },
        "encode": "JSON"
    }
}
getUsersByRole
Original method name: getUsersByRole
This GET method returns a list of all users for a specified role and token. This method can be called only by a Token Admin or Token Auditor of the chaincode.
Query:
/getUsersByRole?tokenId={{bc-token-id}}&role=role value (for example minter / burner / notary)
Parameters:
  • tokenId: string – The ID of the token.
  • role: string – The name of the role to search for.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "users": [
                {
                    "token_id": "USD",
                    "user_id": "creator_user_cb",
                    "org_id": "CB"
                },
                {
                    "token_id": "USD",
                    "user_id": "cb4",
                    "org_id": "CB"
                }
            ]
        },
        "encode": "JSON"
    }
}
holdTokens
Original method name: holdTokens
This method creates a hold on behalf of the owner of the tokens with the to_account_id account. A notary account is specified, which is responsible to either complete or release the hold. When the hold is created, the specified token balance from the payer is put on hold. A held balance cannot be transferred until the hold is either completed or released. The caller of this method must have an account already created.
Payload:
{
    "tokenId": "{{bc-token-id}}",
    "operationId": "operation_id value",
    "toOrgId": "to_org_id value",
    "toUserId": "to_user_id value",
    "notaryOrgId": "notary_org_id value",
    "notaryUserId": "notary_user_id value",
    "quantity": 1,
    "timeToExpiration": "time_to_expiration value",
    "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}",
    "endorsers": {{endorsers}}
}
Parameters:
  • tokenId: string – The ID of the token.
  • operationId: string – A unique ID to identify the hold operation. Typically this ID is passed by the client application.
  • toOrgId: string – The membership service provider (MSP) ID of the receiver in the current organization.
  • toUserId: string – The user name or email ID of the receiver.
  • notaryOrgId: string – The membership service provider (MSP) ID of the notary in the current organization.
  • notaryUserId: string – The user name or email ID of the notary.
  • quantity: number – The number of tokens to put on hold.
  • timeToExpiration – The time when the hold expires. Specify 0 for a permanent hold. Otherwise use the RFC-3339 format. For example, 2021-06-02T12:46:06Z.
  • infoDetails: JSON – The description and category as shown in the following example.
    {
       "category" : "category input",
       "description" : "description input"
    }
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "e575d339299bb98afe83207e749cd07654f209673c84c6973738b6094da33062",
        "payload": {
            "msg": "AccountId oaccount~51e676d7182a02ea7418ef58a6d54ecfe3858ef40b4ffb3d859b320da3921594 (Org-Id: CB , User-Id: issuer_user_cb) is successfully holding 10 tokens"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 211
    }
}
init
Original method name: init
This method is called when the chaincode is deployed. The user information is saved as the Token Admin of the chaincode.
Payload:
{
    "adminList": "[{\"org_id\":\"{{bc-org-id}}\",\"user_id\":\"{{bc-admin-user}}\"}]"
}
Parameters:
  • adminList: TokenAdminAsset[] – An array of JSON objects that contain an organization ID and user ID that specifies the token administrator, with the following format:
    {
       "org_id":"{{bc-org-id}}",
       "user_id":"{{bc-admin-user}
    }
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "fdb7dc89832c8045a333823b77fa24ae628178148dc93b3550040e070d7cd807",
        "payload": "",
        "encode": "UTF-8",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 263
    }
}
initializeStablecoinToken
Original method name: initializeStablecoinToken
This method creates a token and initializes the token properties. The asset and its properties are saved in the state database. This method can be called only by a Token Admin of the chaincode.
Payload:
{
    "tokenAsset": "{\"token_id\":\"{{bc-token-id}}\",\"token_desc\":\"token_desc value\",\"Currency_Name\":\"Currency_Name value\"}",
    "sameOrgEndorser": true
}
Parameters:
  • tokenAsset: <Token Class> – The token asset is passed as the parameter to this method. The properties of the token asset are described in the model file.
  • sameOrgEndorser: boolean – A Boolean value that indicates whether transaction endorsements must be from the same organization as the requester.
Returns:
  • On success, a JSON representation of the token asset that was created.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "aa7a4f4cc214e1a041a5a6fb7ca7530f08256559e538c9f9582e6fd12c9e65c8",
        "payload": {
            "assetType": "otoken",
            "events": false,
            "token_id": "t1",
            "token_name": "Stablecoin",
            "token_desc": "token_desc value",
            "token_standard": "ttf+",
            "token_type": "fungible",
            "token_unit": "fractional",
            "behaviors": [
                "divisible",
                "mintable",
                "transferable",
                "burnable",
                "holdable",
                "roles"
            ],
            "roles": {
                "minter_role_name": "minter",
                "burner_role_name": "burner",
                "notary_role_name": "notary",
                "mint_approver_role_name": "notary",
                "burn_approver_role_name": "notary"
            },
            "mintable": {
                "max_mint_quantity": 1000,
                "mint_approval_required": true
            },
            "burnable": {
                "burn_approval_required": true
            },
            "divisible": {
                "decimal": 2
            },
            "currency_name": "currency_name value",
            "token_to_currency_ratio": 999
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 267
    }
}
isInRole
Original method name: isInRole
This method returns a Boolean value to indicate if a user and token has a specified role. This method can be called only by a Token Admin or the owner of the account.
Payload:
{{api-gateway-endpoint2}}/isInRole?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}&role=role value (for example minter / burner / notary)
Parameters:
  • tokenId: string – The ID of the token.
  • orgId: string – The membership service provider (MSP) ID of the user.
  • userId: string – The user name or email ID of the user.
  • role: string – The name of the role.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "result": "true"
        },
        "encode": "JSON"
    }
}
isTokenAdmin
Original method name: isTokenAdmin
This method returns the Boolean value true if the specified account is a Token Admin, otherwise it returns false. THis method can be called only by a Token Admin.
Payload:
{{api-gateway-endpoint2}}/isTokenAdmin?orgId={{bc-org-id}}&userId={{bc-user-id}}
Parameters:
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "result": false
        },
        "encode": "JSON"
    }
}
rejectBurn
Original method name: rejectBurn
This method can be called by a notary to reject a burning request.
Payload:
{
    "tokenId": "{{bc-token-id}}",
    "operationId": "operation_id value",
    "sameOrgEndorser": true
}
Parameters:
  • tokenId: string – The ID of the token to reject for burning.
  • operationId: string – The unique operation ID that represents the burn request.
  • sameOrgEndorser: boolean – A Boolean value that indicates whether transaction endorsements must be from the same organization as the requester.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "474a08183986c84fe321aa925670539db3b1bc90b02fa65956ad8c771fff5bbe",
        "payload": {
            "msg": "Successfully rejected burn request with Operation Id 'burn1234' to burn 10 tokens of token id USD"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 210
    }
}
rejectMint
Original method name: rejectMint
This method can be called by a notary to reject a minting request.
Payload:
{
    "tokenId": "{{bc-token-id}}",
    "operationId": "operation_id value",
    "sameOrgEndorser": true
}
Parameters:
  • tokenId: string – The ID of the token to reject minting.
  • operationId: string – The unique operation ID that represents the mint request.
  • sameOrgEndorser: boolean – A Boolean value that indicates whether transaction endorsements must be from the same organization as the requester.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "64c5a4830949eae1424600f3d4a438c6f603a7c3ea31a68e374b899803999e22",
        "payload": {
            "msg": "Successfully rejected mint request with Operation Id 'op1234' to mint 10 tokens of token id USD"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 205
    }
}
releaseHoldTokens
Original method name: releaseHoldTokens
This POST method releases a hold on tokens. The transfer is not completed and all held tokens are available again to the original owner. This method can be called by the AccountOwner ID with the notary role within the specified time limit or by the payer, payee, or notary after the specified time limit.
Payload:
{
    "tokenId": "{{bc-token-id}}",
    "operationId": "operation_id value",
    "endorsers": {{endorsers}}
}
Parameters:
  • tokenId: string – The ID of the token.
  • operationId: string – A unique ID to identify the hold operation. Typically this ID is passed by the client application.
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "f04ba8895d52bc636d843f88476002bc99d01480c36be87c8fa259cd47a29380",
        "payload": {
            "msg": "Successfully released '10' tokens from Operation Id '8e3144' to Account Id: oaccount~51e676d7182a02ea7418ef58a6d54ecfe3858ef40b4ffb3d859b320da3921594 (Org-Id: CB, User-Id: issuer_user_cb)."
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 214
    }
}
removeOrgAdmin
Original method name: removeOrgAdmin
This POST method removes a user as a Org Admin of the chaincode. This method can be called only by a Token Admin or Org Admin of the specified organization.
Payload:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "sameOrgEndorser": true
}
Parameters:
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
  • sameOrgEndorser: boolean – A Boolean value that indicates whether transaction endorsements must be from the same organization as the requester.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "e2a634f6093f89b1984e20ff86a513fabb7c3ade7cc9e27d9734b4aaf6c88597",
        "payload": {
            "msg": "Successfully removed Org Admin (Org_Id: CB, User_Id: cb)"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 220
    }
}
removeOrgAuditor
Original method name: removeOrgAuditor
This POST method removes a user as a Org Auditor of the chaincode. This method can be called only by a Token Admin or Org Admin of the specified organization.
Payload:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "sameOrgEndorser": true
}
Parameters:
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
  • sameOrgEndorser: boolean – A Boolean value that indicates whether transaction endorsements must be from the same organization as the requester.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "c3bc720461004a53b37c68d4bb264858b88d980bc093a0a3ebb62a32974fb306",
        "payload": {
            "msg": "Successfully removed Org Auditor (Org_Id: CB, User_Id: cb)"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 221
    }
}
removeRole
Original method name: removeRole
This method removes af role from a specified user and token. This method can be called only by a Token Admin of the chaincode or by an Org Admin of the specified organization.
Payload:
{
    "tokenId": "{{bc-token-id}}",
    "role": "role value (for example minter / burner / notary)",
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "endorsers": {{endorsers}}
}
Parameters:
  • tokenId: string – The ID of the token.
  • role: string – The name of the role to remove from the specified user. The mintable and burnable behaviors correspond to the minter_role_name and burner_role_name properties of the specification file. Similarly, the notary role corresponds to the notary_role_name property of the specification file.
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Returns:
  • On success, a message with account details.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "274f0d0a2c4c3929817fb85b2e857519695c3c238ccf9903b084b87e9be7ee12",
        "payload": {
            "msg": "Successfully removed role 'notary' from Account Id: oaccount~2eb5f8a9bc561f8f41a4ea3be9511958cc6684ef14f2337ca396efc301b627d8 (Org-Id: CB, User-Id: manager_user_cb)"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 200
    }
}
removeTokenAdmin
Original method name: removeTokenAdmin
This POST method removes a user as a Token Admin of the chaincode. This method can be called only by a Token Admin of the chaincode. An admin cannot remove themselves.
Payload:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "sameOrgEndorser": true
}
Parameters:
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
  • sameOrgEndorser: boolean – A Boolean value that indicates whether transaction endorsements must be from the same organization as the requester.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "6a3b9b568d04b5beb29830f91efe4e8c6310b6cf36940cecfb4ab690fbfde739",
        "payload": {
            "msg": "Successfully removed Token Admin (Org_Id: CB, User_Id: cb)"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 218
    }
}
removeTokenAuditor
Original method name: removeTokenAuditor
This POST method removes a user as a Token Auditor of the chaincode. This method can be called only by a Token Admin of the chaincode.
Payload:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "sameOrgEndorser": true
}
Parameters:
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
  • sameOrgEndorser: boolean – A Boolean value that indicates whether transaction endorsements must be from the same organization as the requester.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "a886a6040fbc76374a3c78c89ab0ffc9f7b8391cc5239b169bf3b878cf40c67b",
        "payload": {
            "msg": "Successfully removed Token Auditor (Org_Id: CB, User_Id: cb)"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 219
    }
}
requestBurn
Original method name: requestBurn
This method can be called by a burner to send a request to the notary to destroy a specified amount of tokens.
Payload:
{
    "tokenId": "{{bc-token-id}}",
    "operationId": "operation_id value",
    "notaryOrgId": "notary_org_id value",
    "notaryUserId": "notary_user_id value",
    "quantity": 1,
    "timeToExpiration": "time_to_expiration value",
    "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}",
    "sameOrgEndorser": true
}
Parameters:
  • tokenId: string – The ID of the token to burn.
  • operationId: string – The unique operation ID that represents the burn request.
  • notaryOrgId: string – The membership service provider (MSP) ID of the burner notary who will process the request.
  • notaryUserId: string – The user name or email ID of the burner notary who will process the request.
  • quantity: number – The amount of tokens to burn.
  • timeToExpiration – The time after which the burning request expires and is no longer valid.
  • infoDetails: JSON – An object specifying the category (category) and description (description) of the request, as shown in the following example.
    {
         "category" : "category input",
         "description" : "description input"
    }
  • sameOrgEndorser: boolean – A Boolean value that indicates whether transaction endorsements must be from the same organization as the requester.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "0adb57ca9776c8760468c40465e0f0d37472f0b4b32fd02561ef28b3f7b28cf1",
        "payload": {
            "msg": "AccountId oaccount~0d7b3f73aea28065017ce8b79c0bb19256dc0cb475a0b2a85192bd110f69535c (Org-Id: CB , User-Id: retirer_user_cb) has successfully submitted request to burn 10 tokens"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 206
    }
}
requestMint
Original method name: requestMint
This method can be called by a minter to send a request to the minter notary to create a specified amount of tokens.
Payload:
{
    "tokenId": "{{bc-token-id}}",
    "operationId": "operation_id value",
    "notaryOrgId": "notary_org_id value",
    "notaryUserId": "notary_user_id value",
    "quantity": 1,
    "timeToExpiration": "time_to_expiration value",
    "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}",
    "sameOrgEndorser": true
}
Parameters:
  • tokenId: string – The ID of the token to mint.
  • operationId: string – The unique operation ID that represents the mint request.
  • notaryOrgId: string – The membership service provider (MSP) ID of the minter notary who will process the request.
  • notaryUserId: string – The user name or email ID of the minter notary who will process the request.
  • quantity: number – The amount of tokens to mint.
  • timeToExpiration – The time after which the minting request expires and is no longer valid.
  • infoDetails: JSON – An object specifying the category (category) and description (description) of the request, as shown in the following example.
    {
         "category" : "category input",
         "description" : "description input"
    }
  • sameOrgEndorser: boolean – A Boolean value that indicates whether transaction endorsements must be from the same organization as the requester.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "06b35071415d74aa1a7c18449149c937d886cae76a832c44cf8d98e84586e76e",
        "payload": {
            "msg": "AccountId oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0 (Org-Id: CB , User-Id: creator_user_cb) has successfully submitted request to mint 10 tokens"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 202
    }
}
setMaxDailyAmount
Original method name: setMaxDailyAmount
This POST method is used to set the maxDailyAmount parameter in the account details for the specified amount. This method can be called only by a Token Admin of the chaincode or by an Org Admin of the specified organization.
Payload:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "tokenId": "{{bc-token-id}}",
    "maxDailyAmount": 1,
    "endorsers": {{endorsers}}
}
Parameters:
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
  • tokenId: string – The ID of the token.
  • maxDailyAmount: number – The maximum daily amount value for the specified account, which defines the maximum amount that can be transacted daily.
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "28682e0564e4721b6c1a8ec106f8c5c98319e9439959dbb9f83d8e6f111d9975",
        "payload": {
            "bapAccountVersion": 0,
            "assetType": "oaccount",
            "account_id": "oaccount~cdc6fa5e64bc29f700f99da69f980d8cbb768c7e1a11dd17274e75651f6afafe",
            "user_id": "admin_user_cb",
            "org_id": "CB",
            "token_type": "fungible",
            "token_id": "USD",
            "token_name": "Stablecoin",
            "balance": 0,
            "onhold_balance": 0,
            "max_daily_amount": 10000,
            "daily_amount": 0,
            "max_daily_transactions": 1000,
            "daily_transactions": 0,
            "current_date": "2024-11-20T00:00:00.000Z"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 222
    }
}
setMaxDailyTransactionCount
Original method name: setMaxDailyTransactionCount
This POST method is used to set the maxDailyTransactions parameter in the account details for the specified amount. This method can be called only by a Token Admin of the chaincode or by an Org Admin of the specified organization.
Payload:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "tokenId": "{{bc-token-id}}",
    "maxDailyTransactions": 1,
    "endorsers": {{endorsers}}
}
Parameters:
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
  • tokenId: string – The ID of the token.
  • maxDailyTransactions: number – The maximum daily amount value for the specified account, which defines the maximum number of transactions allowed per day.
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "8b6fb01de697562ee098110054f05d4a314933bd11ef471991cb43e25b68bad9",
        "payload": {
            "bapAccountVersion": 0,
            "assetType": "oaccount",
            "account_id": "oaccount~cdc6fa5e64bc29f700f99da69f980d8cbb768c7e1a11dd17274e75651f6afafe",
            "user_id": "admin_user_cb",
            "org_id": "CB",
            "token_type": "fungible",
            "token_id": "USD",
            "token_name": "Stablecoin",
            "balance": 0,
            "onhold_balance": 0,
            "max_daily_amount": 10000,
            "daily_amount": 0,
            "max_daily_transactions": 1000,
            "daily_transactions": 0,
            "current_date": "2024-11-20T00:00:00.000Z"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 223
    }
}
suspendStablecoinAccount
Original method name: suspendAccount
This method suspends a fungible token account. It throws an error if an accountStatus value is not found in ledger. This method can be called only by a Token Admin of the chaincode or by an Org Admin of the specified organization.
Payload:
{
    "tokenId": "{{bc-token-id}}",
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "endorsers": {{endorsers}}
}
Parameters:
  • tokenId: string – The ID of the token.
  • orgId: string – The membership service provider (MSP) ID of the user in the current organization.
  • userId: string – The user name or email ID of the user.
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "e21d91d98091df77f90105d84074c0b802b01fc97a6b1304247774397fed1294",
        "payload": {
            "assetType": "oaccountStatus",
            "status_id": "oaccountStatus~d5814d96d8517ac31727d60aace0519c58a425892ab0d378fcfb0a35771f65ae",
            "account_id": "oaccount~802bf8da5579c6103b2dddaa6c4385df8e722d639a18029e0e93d7a5d6f826d6",
            "status": "suspended"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 195
    }
}
transferStablecoinTokens
Original method name: transferTokens
This method transfers tokens from the caller to a specified account. The caller of the method must have an account. The quantity must be within the decimal values specified by the decimal parameter of the divisible behavior in the specification file.
Payload:
{
    "tokenId": "{{bc-token-id}}",
    "toOrgId": "to_org_id value",
    "toUserId": "to_user_id value",
    "quantity": 1,
    "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}",
    "endorsers": {{endorsers}}
}
Parameters:
  • tokenId: string – The ID of the token.
  • toOrgId: string – The membership service provider (MSP) ID of the receiver (payee) in the current organization.
  • toUserId: string – The user name or email ID of the receiver.
  • quantity: number – The number of tokens to transfer.
  • infoDetails: JSON – An object specifying the category (category) and description (description) of the request, as shown in the following example.
    {
         "category" : "category input",
         "description" : "description input"
    }
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "d613b2494b965811b2fa2106152b7085f2d6d7d43e949b10b8668722d3636fe7",
        "payload": {
            "msg": "Successfully transferred 10 tokens from account id: oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0 (Org-Id: CB, User-Id: creator_user_cb) to account id: oaccount~51e676d7182a02ea7418ef58a6d54ecfe3858ef40b4ffb3d859b320da3921594 (Org-Id: CB, User-Id: issuer_user_cb). Only 999 number of transactions and 1990 amount transfer left for today: 12/11/2024"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 224
    }
    }
updateAccountPolicyCheck
Original method name: updateAccountPolicyCheck
This method updates the policy for a specified account. This method can be called only by a Token Admin or Org Admin of the specified organization.
Payload:
{
    "asset": "{\"accountPolicyId\":\"accountPolicyId value\",\"orgId\":\"{{bc-org-id}}\",\"userId\":\"{{bc-user-id}}\",\"kycCompliance\":\"kycCompliance value\",\"amlCompliance\":\"amlCompliance value\",\"riskScore\":999,\"restrictionFlag\":\"restrictionFlag value\"}",
    "endorsers": {{endorsers}}
}
Parameters:
  • asset: AccountPolicyCheck object – An object that defines account policy parameters, which includes the following fields:
    • accountPolicyId – The unique account policy ID.
    • orgId – The membership service provider (MSP) ID of the user to create the policy for.
    • userId – The user name or email ID of the user to create the policy for.
    • kycCompliance – A Boolean value that indicates whether the account satisfies KYC (Know Your Customer) requirements.
    • amlCompliance – A Boolean value that indicates whether the account satisfies AML (Anti-Money Laundering) requirements.
    • riskScore – The risk score associated with the account, which is used for compliance evaluation.
    • restrictionFlag – A Boolean value that indicates whether the account is subject to restricted transfers. If set to true, only transfers within the lowest approval-policy threshold are allowed.
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "02875ca9c6a7408da3f81156214228b91b09c4bb2b8026d7a5733b53598c6635",
        "payload": {
            "assetType": "AccountPolicyCheck",
            "accountPolicyId": "APID~CentralBank~cb__creator_demo",
            "orgId": "CentralBank",
            "userId": "cb__creator_demo",
            "kycCompliance": "true",
            "amlCompliance": "true",
            "riskScore": 1000,
            "restrictionFlag": "true"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 272
    }
}
updateApprovalPolicyCheck
Original method name: updateApprovalPolicyCheck
This method updates the approval policy. This method can be called only by a Token Admin.
Payload:
{
    "asset": "{\"approvalPolicyId\":\"approvalPolicyId value\",\"transactionLowerLimit\":\"transactionLowerLimit value\",\"transactionUpperLimit\":\"transactionUpperLimit value\",\"numberOfApprovalsRequired\":999,\"approverDetails\":[{\"approverOrgId\":\"approverOrgId value\",\"approverUserId\":\"approverUserId value\",\"approvalSequence\":999}]}",
    "endorsers": {{endorsers}}
}
Parameters:
  • asset: ApprovalPolicyCheck class – A class that defines approval rules for a transaction, which includes the following fields:
    • approvalPolicyId – The unique approval policy ID.
    • transactionLowerLimit – The minimum transaction amount the approval policy applies to.
    • transactionUpperLimit – The maximum transaction amount the approval policy applies to.
    • numberOfApprovalsRequired – The total number of approvals needed before the transaction can be completed.
    • approverDetails – A list of approvers along with their assigned approval sequence, which defines the mandatory order for approvals.
  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "ed1e1950fe02dbab74fa3aa7630b8dc6096e30aae5c81bab0dd22d5232c44fc9",
        "payload": {
            "status": "active",
            "assetType": "ApprovalPolicyCheck",
            "approvalPolicyId": "GPID~500~1000",
            "transactionLowerLimit": "500",
            "transactionUpperLimit": "1000",
            "numberOfApprovalsRequired": 1,
            "approverDetails": [
                {
                    "approverOrgId": "CentralBank",
                    "approverUserId": "manager",
                    "approvalSequence": 1
                }
            ]
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 285
    }
}
updateStablecoinToken
Original method name: updateStablecoinToken
This method updates a stablecoin token. This method can be called only by a Token Admin.
Payload:
{
    "tokenAsset": "{\"token_id\":\"{{bc-token-id}}\",\"token_desc\":\"token_desc value\",\"currencyName\":\"currencyName value\",\"conversionRate\":999}",
    "endorsers": {{endorsers}}
}
Parameters:
  • asset <Token Class> – The token asset is passed as the parameter to this method. The properties of the token asset can vary, and are described in the token specification file. Do not include parameters that are marked as read-only in the specification file.

    You specify the asset parameter in a different format if you are using Visual Studio Code versus the CLI or a Postman collection.

    Visual Studio Code: Use the GUI to pass individual parameters that correspond to the token class fields.

    CLI / Postman: Pass a serialized JSON string that includes the token specification fields, as shown in the following example.

    "{\"token_id\":\"USD\",\"token_desc\":\"token_desc value\",\"Currency_Name\":\"Currency_Name value\"}"

  • endorsers: string[] – An array of the peers (for example, peer1, peer2) that must endorse the transaction.
Return Value Example:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "aa7a4f4cc214e1a041a5a6fb7ca7530f08256559e538c9f9582e6fd12c9e65c8",
        "payload": {
            "assetType": "otoken",
            "events": false,
            "token_id": "t1",
            "token_name": "Stablecoin",
            "token_desc": "token_desc value",
            "token_standard": "ttf+",
            "token_type": "fungible",
            "token_unit": "fractional",
            "behaviors": [
                "divisible",
                "mintable",
                "transferable",
                "burnable",
                "holdable",
                "roles"
            ],
            "roles": {
                "minter_role_name": "minter",
                "burner_role_name": "burner",
                "notary_role_name": "notary",
                "mint_approver_role_name": "notary",
                "burn_approver_role_name": "notary"
            },
            "mintable": {
                "max_mint_quantity": 1000,
                "mint_approval_required": true
            },
            "burnable": {
                "burn_approval_required": true
            },
            "divisible": {
                "decimal": 2
            },
            "currency_name": "currency_name value",
            "token_to_currency_ratio": 999
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 267
    }
}
createStablecoinAccount
Original method name: createStablecoinAccount
This custom wrapper API combines chaincode APIs and Oracle Blockchain Platform console APIs into one endpoint. This method completes the following steps in sequence.
  1. Creates an enrollment ID for a user in the REST proxy of the instance. If an enrollment already exists for the user ID, the enrollment is not created again. The enrollment ID is the same as the user ID. The enrollment ID can contain only alphanumeric characters, hyphens (-), and underscores (_). If the user ID contains any other special characters, they are replaced with underscores (_).
  2. Creates an account in the ledger.
  3. Associates the new account with the specified token.
  4. Assigns the specified role to the user.
If any of the steps fail, the enrollment is automatically deleted.
Payload:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "tokenId": "{{bc-token-id}}",
    "role": "role value (for example minter / burner / notary / tokenAdmin / tokenAuditor / orgAdmin / orgAuditor)",
    "dailyLimits": "{\"max_daily_amount\":1000, \"max_daily_transactions\":100}"
}
Parameters:
  • orgId – The membership service provider (MSP) ID of the user to create the account for. The ID must begin with an alphanumeric character and can include letters, numbers, and special characters such as underscores (_), periods (.), at signs (@), and hyphens (-).
  • userId – The user name or email ID of the user. The ID must begin with an alphanumeric character and can include letters, numbers, and special characters such as underscores (_), periods (.), at signs (@), and hyphens (-).
  • tokenId: string – The token ID, which must begin with an alphanumeric character and can include letters, numbers, and the special characters underscore (_) and hyphen (-). It cannot exceed 16 characters in length.
  • role: string – The name of the role to add to the specified user, which must be one of the following values: minter, burner, notary, tokenAdmin, tokenAuditor, orgAdmin, or orgAuditor.
  • dailyLimits: JSON object – A JSON object of the following type.
    {
         "max_daily_amount": 100000
         "max_daily_transactions": 10000
     }
    In the example, the max_daily_amount value is the maximum amount of tokens that can be transacted daily and max_daily_transactions value is the maximum number of transactions that can be completed daily.
Returns:
  • On success, a JSON object of the account that was created.
Return Value Example:
"payload": {
 "msg": "Account created successfully and 'minter' role added to Account Id: oaccount~4a86f2843c2b0105c97a77202bd9aba519c81dcef27eccc1d89125ae32770700 (Org-Id: CB, User-Id: creator_user_cb)"
 "accountDetails": 
      {            
            "bapAccountVersion": 0,
            "assetType": "oaccount",
            "account_id": "oaccount~ce5c56d2068ce31b82136c8eea110a80b9251595d361db70924c4e989032a1be",
            "user_id": "creator_user_cb",
            "org_id": "CB",
            "token_type": "fungible",
            "token_id": "USD",
            "token_name": "",
            "balance": 0,
            "onhold_balance": 0,
            "max_daily_amount": 1000,
            "daily_amount": 0,
            "max_daily_transactions": 100,
            "daily_transactions": 0,
            "current_date": "2024-10-06T00:00:00.000Z"
     }
 }
createIDCSUser
Original method name: createIDCSUser
This POST method creates an Identity Cloud Service user in the tenancy specified by the URL in the terraform.tfvars file and assigns the user to the specified user group.
Payload:
{
 "userName": "userName value",
 "firstName": "firstName value",
 "lastName": "lastName value",
 "email": "email value",
 "groupName": "groupName value"
}
Parameters:
  • userName: string – The ID of the user.
  • firstName: string – The first name of the user.
  • lastName: string – The last name of the user.
  • email: string – The email address of the user.
  • groupName: string – The name of the Identity Cloud Service group to assign to the user.
Return Value Example:
{
 "status": "Success",
 "msg": "User user1 is created and assigned to the group BOND_ADMIN"
}