Skip to content

Update redemption

Request

Update existing redemption. Business can only update their own redemptions.

Security
authJWT
Path
idstringrequired
Bodyapplication/jsonrequired
ownerBusinessIdstring or null

Optional owner business ID. If set, this redemption belongs to a specific business. If null/omitted, the redemption is tenant-owned (system-level).

isActiveboolean

Whether the redemption is active immediately on creation. Defaults to false.

Default:false
creditTokenAmountnumber

The amount of credit tokens needed to redeem the redemption tokens

descriptionstring or null

Description of the redemption

namestring

Name of the redemption

imageUrlstring or null

Image url of the redemption

logoUrlstring or null

Logo URL for the redemption (smaller icon/avatar)

termsstring or null

Terms and conditions for the redemption. Plain text or HTML. Multi-language handling at app level.

startDatestring or null, (date-time)

Redemption start date

endDatestring or null, (date-time)

Redemption end date

redemptionTypeIdnumber or null

Redemption type id

minUserStatusTypeIdnumber or null

min user status type id to redeem the redemption

maxTotalSupplynumber or null

The maximum total supply of the redemption

ordernumber or null

The order of the redemption

maxPerUsernumber or null

The maximum redemption per user

countryCodeRestrictionsArray of strings or null

Country code restrictions as an array of strings (e.g., ["NOT_ES", "FR"])

Example:
[ "NOT_ES", "FR" ]
tagsArray of strings

Tags for categorization and filtering

Example:
[ "rewards", "partner", "premium" ]
contextobject

ERC721 only - Admin-defined dynamic context for AI prompts and trigger-based validity. Always applied to tokens minted from this redemption. Special keys: validityDate, validityEndDate, validityDuration for token expiry.

Example:
{ "eventName": "Summer Sale", "validityDuration": 30 }
specificRequiredUserFieldsArray of strings

Required user fields specific to this redemption (beyond type defaults). Can include built-in field keys (email, firstName) or custom field UUIDs.

Example:
[ "email", "firstName", "countryOfResidence" ]
bookingRequirementstring or null

Booking requirement for this redemption. If set, defines what type of booking user needs. Omit or null = no booking required.

Enum:"active""future""past""active_future""any"
priceTokenUnitsArray of objects(PriceTokenUnitSpec)

Optional token units the user must transfer/burn as payment (ERC20, ERC1155, or ERC721). Use resolveByBusiness=true for stamp-token redemptions where the tokenId is resolved per business at redeem time.

Example:
[ { "tokenEntityId": "uuid", "tokenMetadataIncrementalId": 1, "amount": 9 } ]
curl -i -X PUT \
  'https://docs.pers.ninja/_mock/swagger/redemptions/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "ownerBusinessId": "string",
    "isActive": false,
    "creditTokenAmount": 0,
    "description": "string",
    "name": "string",
    "imageUrl": "string",
    "logoUrl": "string",
    "terms": "string",
    "startDate": "2019-08-24T14:15:22Z",
    "endDate": "2019-08-24T14:15:22Z",
    "redemptionTypeId": 0,
    "minUserStatusTypeId": 0,
    "maxTotalSupply": 0,
    "order": 0,
    "maxPerUser": 0,
    "countryCodeRestrictions": [
      "NOT_ES",
      "FR"
    ],
    "tags": [
      "rewards",
      "partner",
      "premium"
    ],
    "context": {
      "eventName": "Summer Sale",
      "validityDuration": 30
    },
    "specificRequiredUserFields": [
      "email",
      "firstName",
      "countryOfResidence"
    ],
    "bookingRequirement": "active",
    "priceTokenUnits": [
      {
        "tokenEntityId": "uuid",
        "tokenMetadataIncrementalId": 1,
        "amount": 9
      }
    ]
  }'

Responses

Redemption updated successfully

Bodyapplication/json
idstringrequired

Redemption id

ownerBusinessIdstring or nullrequired

Optional owner business ID. If set, this redemption belongs to a specific business. If null, the redemption is tenant-owned (system-level).

descriptionstring or nullrequired

Description of the redemption

namestring or nullrequired

Name of the redemption

imageUrlstring or nullrequired

Image url of the redemption

logoUrlstring or nullrequired

Logo URL for the redemption

termsstring or nullrequired

Terms and conditions for the redemption. Plain text or HTML. Multi-language handling at app level.

startDatestring or null, (date-time)required

Redemption start date

endDatestring or null, (date-time)required

Redemption end date

isActivebooleanrequired

Redemption is active

approvalobject(ApprovalDTO)required

Approval metadata for this redemption.

creditTokenAmountnumberrequired

The amount of credit tokens needed to redeem the redemption tokens

typeobject or null(RedemptionTypeDTO)required

The redemption type

priceTokenUnitsArray of objects(PriceTokenUnitSpec)required

Optional token units the user must transfer/burn as payment (ERC20, ERC1155, or ERC721). When set, these are transferred from user → business in addition to (or instead of) creditTokenAmount.

Default:[]
mechanismstring(RedemptionMechanism)required

Computed payment mechanism. Use this for rendering decisions (FREE = no payment, CREDIT = platform credit tokens, TOKEN_PAY = ERC20 transfer, TOKEN_BURN = ERC1155/ERC721 stamp/NFT, MIXED = credit + token). Never stored — derived from creditTokenAmount and priceTokenUnits.

Enum:"FREE""CREDIT""TOKEN_PAY""TOKEN_BURN""MIXED"
tokenUnitsArray of objects(TokenUnitDTO)required

The redemption tokens to be redeemed

ordernumber or nullrequired

The order of the redemption

supplyobject or null(ItemSupply)

The available supply of the redemption

maxPerUsernumberrequired

The maximum redemption per user

minUserStatusTypeobject or null(UserStatusTypeDTO)required

The minimum user status type to redeem the redemption

countryCodeRestrictionsobject

Country code restrictions as an array of strings (e.g., ["NOT_ES", "FR"])

Example:
[ "NOT_ES", "FR" ]
tagsArray of stringsrequired

Redemption tags

Default:[]
contextobject

ERC721 only - Admin-defined dynamic context for AI prompts and trigger-based validity. Always applied to tokens minted from this redemption. Special keys: validityDate, validityEndDate, validityDuration for token expiry.

Example:
{ "eventName": "Summer Sale", "validityDuration": 30 }
specificRequiredUserFieldsArray of stringsrequired

Required user fields specific to this redemption (beyond type defaults). Can include built-in field keys (email, firstName) or custom field UUIDs.

Default:[]
requiredUserFieldsArray of stringsrequired

All required fields for this redemption (type baseline + extras, deduplicated). Use this for validation.

Default:[]
specificBookingRequirementobject or null(BookingRequirementConfigDTO)

Redemption-specific booking requirement override. Set to override type default. Omit or null = use type default.

bookingRequirementobject or null(BookingRequirementConfigDTO)

Effective booking requirement (specific override ?? type default). Use this for validation. Null = no booking required.

includedobject or null

Optional data requested via include parameter. All include-based data lives here for consistency.

Response
{ "id": "string", "ownerBusinessId": "string", "description": "string", "name": "string", "imageUrl": "string", "logoUrl": "string", "terms": "string", "startDate": "2019-08-24T14:15:22Z", "endDate": "2019-08-24T14:15:22Z", "isActive": true, "approval": { "status": "pending_approval", "approvedAt": "2019-08-24T14:15:22Z", "approvedBy": "string", "rejectionReason": "string" }, "creditTokenAmount": 0, "type": { "name": "string", "description": "string", "imageUrl": "string", "baseRequiredUserFields": [], "bookingRequirement": {}, "id": 0 }, "priceTokenUnits": [], "mechanism": "FREE", "tokenUnits": [ {} ], "order": 0, "supply": { "available": 0, "total": 0 }, "maxPerUser": 0, "minUserStatusType": { "name": "string", "description": "string", "minTokenBalance": "string", "discountPercentage": 0, "imageUrl": "string", "eligibleTokenAddresses": [], "tags": [], "order": 100, "id": 0 }, "countryCodeRestrictions": [ "NOT_ES", "FR" ], "tags": [], "context": { "eventName": "Summer Sale", "validityDuration": 30 }, "specificRequiredUserFields": [], "requiredUserFields": [], "specificBookingRequirement": { "type": "active", "eligibleBusinessIds": [], "eligibleBusinessTypeIds": [] }, "bookingRequirement": { "type": "active", "eligibleBusinessIds": [], "eligibleBusinessTypeIds": [] }, "included": { "redeemCount": 0, "ownerBusiness": {}, "requiredUserInfo": {}, "booking": {} } }