PERS icon

PERS

Interact with the PERS Loyalty API

Actions14

Redemption → Create

AI-generated

Summary

Creates a new redemption in the PERS Loyalty API by POSTing to /redemptions. All fields are optional and set through a single Additional Fields collection.

Inputs

  • additionalFields — Collection of optional fields, sent in the request body. Only fields you add are sent. Fields: name, description, terms (plain text or HTML), imageUrl, logoUrl, startDate, endDate, isActive (default true), creditTokenAmount (credit tokens needed to redeem), maxPerUser, maxTotalSupply, minUserStatusType ID (minUserStatusTypeId), redemptionTypeId, order (display order), ownerBusinessId (leave empty for tenant-owned), context (JSON for AI prompts and token validity; special keys validityDate, validityEndDate, validityDuration), tags and countryCodeRestrictions.

Output shape

A single item containing the JSON response from the PERS API for the created redemption, paired to the input item.

The exact response fields are defined by the PERS API and not shown in the source. Tags and Country Code Restrictions are entered as comma-separated strings and sent as arrays (split on commas and newlines, trimmed, empties dropped); for example "NOT_ES, FR" excludes Spain and allows France. With Continue On Fail enabled, errors are returned as {error: message}. Because there are no required fields, an empty configuration sends no body. Tokens are attached afterwards with the Add Token operation.

Examples

Example 1: Create a premium reward redeemable for 100 credit tokens, limited to 500 units and 1 per user

Additional Fields: Name="Free Coffee", Credit Token Amount=100, Max Total Supply=500, Max Per User=1, Tags="rewards, partner"

Example 2: Create a time-limited redemption restricted by country, owned by a specific business

Additional Fields: Name, Start Date, End Date, Country Code Restrictions="NOT_ES, FR", Owner Business ID=, Is Active=true

Links

Discussion