PERS icon

PERS

Interact with the PERS Loyalty API

Actions14

Token → Update Metadata

AI-generated

Summary

Updates an existing PERS token metadata record by sending a PUT to /tokens/metadata/{metadataId} with whichever Additional Fields you set. Returns the API's JSON response.

Inputs

  • Metadata ID (required) — UUID of the token metadata record to update. It goes into the URL path. For ERC1155 the change applies to ALL existing minted tokens, because they share a base URI. For ERC721 it only affects future mints.
  • Additional Fields — Collection of optional body fields. Only the ones you add are sent. Basic fields: name, description, imageUrl, animationUrl, youtubeUrl, externalUrl, previewUrl, creatorAccountAddress, ownerBusinessId, isActive, tags. Expiry fields: expiryDate, validityType, validityDuration. ERC721-only fields: aiPromptConfigs (JSON), defaultPromptContext (JSON), allowExternalContextOverwrite, validityType, validityDuration. businessIds restricts where the token can be redeemed. Name and description support {{placeholder}} templating.
  • Tags / Business IDs (format) — Enter these as comma-separated strings. The node splits them into trimmed arrays before sending. Business IDs may also be split on newlines. An empty value is not sent.

Output shape

A single JSON object per input item: the PERS API response to the metadata update, with pairedItem linking back to the input item.

The response schema is not defined in the node. Any field left unset in Additional Fields is omitted from the request. Fields you do add are sent as-is, including false or 0 values. With Continue On Fail enabled, a failed item returns {error: message}. Authentication uses the persApi credential.

Examples

Example 1: Rename a token template and change its image

Metadata ID = ; Additional Fields: Name = 'Summer Pass', Image URL = 'https://…/pass.png'.

Example 2: Deactivate a metadata record and restrict redemption to certain businesses

Metadata ID = ; Additional Fields: Is Active = false, Business IDs = 'bizId1, bizId2'.

Example 3: Set a fixed expiry for ERC721 tokens

Metadata ID = ; Additional Fields: Validity Type = Fixed Date, Expiry Date = 2026-12-31.

Links

Discussion