Manage Digital Passport Transferability
For more information on keys, refer to Keys Management.
Let's start π
URL
To add token access to a digital product passport, use /productManagement/product/:productId/addTokenAccess
.
POST - https://{{url}}/productManagement/product/:productId/addTokenAccess
Body
Field | Type | Mandatory | Description |
---|---|---|---|
address | String | β | The address is the token access. Wallet address generated through the passphrase.The Arianee SDK provides a convenient way to generate a tokenAccess .Before generating a tokenAccess , you need to have a passphrase. This passphrase is required to instantiate a wallet, which in turn serves as the source for creating the private key associated with the tokenAccess . |
activate | Boolean | β | - true : Enable token access.- false : Disable token access. |
tokenType | Number | β | Type of key: - viewKey : 0 - requestKey : 1 - proofKey : 2 |
{
"address": "0x3157d69b9584Ef31dD89eD8389e485Cb3Cc01Dd8",
"activate": true,
"tokenType": 1
}
Return Payload
Status Code | Success | Description |
---|---|---|
200 | true | The token type is applied to the target digital passport. |
{
"success": true
}
Errors
Status Code | Success | Code | Description |
---|---|---|---|
404 | false | nmp.productManagement.PRODUCT_ID_NOT_EXISTS | The passport ID may be wrong. |
{
"message": "productID n does not exists",
"code": "nmp.productManagement.PRODUCT_ID_NOT_EXISTS"
}
Updated 3 months ago