# Update redemption token unit (Admin) Update an existing token unit within a redemption. Replaces PUT /redemption/admin/{id}/token-units/{tokenUnitId} Endpoint: PUT /redemptions/{id}/token-units/{tokenUnitId} Version: 2.0.2 Security: tenantAdminJWT ## Path parameters: - `id` (string, required) - `tokenUnitId` (string, required) ## Request fields (application/json): - `tokenId` (string, required) Token id - `tokenMetadataIncrementalId` (number) token metadata incremental id for the token unit, this is used to identify the specific token metadata that should be minted - `amount` (number, required) Token unit amount is the amount of tokens that the user will receive when aquiring the token unit - `maxAmount` (number) Token unit max amount, this is the maximum amount of tokens that the user can receive when aquiring the token unit. This is relevant e.g. in campaigns where a user may receive token units per revenue spent etc ## Response 200 fields (application/json): - `id` (string, required) Redemption id - `description` (string,null, required) Description of the redemption - `name` (string,null, required) Name of the redemption - `imageUrl` (string,null, required) Image url of the redemption - `isActive` (boolean, required) Redemptio is active - `creditTokenAmount` (number, required) The amount of credit tokens needed to redeem the redemption tokens - `type` (object,null, required) The redemption type - `type.name` (string, required) Redemption type name - `type.description` (string) Redemption type description - `type.imageUrl` (string) Redemption type image url - `type.id` (number, required) Redemption type id - `tokenUnits` (array, required) The redemption tokens to be redeemed - `tokenUnits.id` (string, required) Token unit id - `tokenUnits.token` (object, required) TokenDTO object - `tokenUnits.token.id` (string, required) Id of the token - `tokenUnits.token.contractAddress` (string, required) Address of the token - `tokenUnits.token.metadata` (array) Metadata of the token, this is optional and can be null in case of Point token - `tokenUnits.token.metadata.imageUrl` (string) This is the URL to the image of the item. Can be just about any type of image (including SVGs, which will be cached into PNGs by OpenSea), IPFS or Arweave URLs or paths. We recommend using a minimum 3000 x 3000 image. - `tokenUnits.token.metadata.externalUrl` (string) This is the URL that will appear below the asset's image - `tokenUnits.token.metadata.description` (string) A human-readable description of the item. Markdown is supported. - `tokenUnits.token.metadata.name` (string) Name of the item. - `tokenUnits.token.metadata.expiryDate` (string) expiry date in case of an utility reward - `tokenUnits.token.metadata.animationUrl` (string) A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported. - `tokenUnits.token.metadata.youtubeUrl` (string) A URL to a YouTube video (only used if animation_url is not provide - `tokenUnits.token.metadata.creatorAccountAddress` (string) Creator Address - `tokenUnits.token.metadata.previewUrl` (string) Preview Url - `tokenUnits.token.metadata.id` (string, required) Token Metadata id - `tokenUnits.token.metadata.animationWeb3StorageUrl` (string) web3 storage url for the animation file - `tokenUnits.token.metadata.imageWeb3StorageUrl` (string) web3 storage url for the image - `tokenUnits.token.metadata.web3StorageUrl` (string) Storage Url - `tokenUnits.token.metadata.tokenMetadataIncrementalId` (number, required) Token Metadata Incremental Id - `tokenUnits.token.metadata.isActive` (boolean, required) Is active - `tokenUnits.token.abi` (object, required) this is the abi of the contract, this is the interface of the contract to interact with it - `tokenUnits.token.chainId` (number, required) this is the chain id of the chain where the token is deployed - `tokenUnits.token.abiUrl` (object, required) this is the url of the abi of the contract, to be used to fetch the abi of the contract - `tokenUnits.token.name` (string) this is the name of the token contract - `tokenUnits.token.symbol` (string) this is the symbol of the token contract, this is optional and can be null - `tokenUnits.token.decimals` (number) this is the decimals of the token. This is optional and only used for ERC20 tokens (Points) - `tokenUnits.token.isActive` (boolean, required) This can be used to enable or disable the token - `tokenUnits.token.isGallery` (boolean, required) This can be used to enable or disable the token for gallery - `tokenUnits.token.type` (string, required) This is the underlying web3 native type of the token contract Enum: "ERC20", "ERC1155", "ERC721" - `tokenUnits.tokenMetadataIncrementalId` (number,null) token metadata incremental id for the token unit, this is used to identify the specific token metadata that should be minted - `tokenUnits.amount` (number, required) Token unit amount is the amount of tokens that the user will receive when aquiring the token unit - `tokenUnits.maxAmount` (number,null) Token unit max amount, this is the maximum amount of tokens that the user can receive when aquiring the token unit. This is relevant e.g. in campaigns where a user may receive token units per revenue spent etc - `maxTotalSupply` (number,null, required) The maximum total supply of the redemption - `order` (number,null, required) The order of the redemption - `availableSupply` (number,null) The available supply of the redemption - `maxPerUser` (object, required) The maximum redemption per user - `minUserStatusType` (object,null, required) The minimum user status type to redeem the redemption - `minUserStatusType.name` (string, required) User Status Type name - `minUserStatusType.description` (string) User Status Type description - `minUserStatusType.minTokenBalance` (number, required) User Status Type eligible Token Addresses - `minUserStatusType.discountPercentage` (number, required) User Status Type discount Rate in percentage - `minUserStatusType.imageUrl` (string) User Status Type image Url - `minUserStatusType.id` (number, required) User Status Type id - `minUserStatusType.eligibleTokenAddresses` (array, required) User Status Type eligible Token Addresses - `countryCodeRestrictions` (object) Country code restrictions as an array of strings (e.g., ["NOT_ES", "FR"]) Example: ["NOT_ES","FR"] - `tags` (array, required) Redemption tags