Skip to content
Download OpenAPI description
Overview
Languages
Servers
Mock server

https://docs.pers.ninja/_mock/swagger/

https://api.pers.ninja/v2/

Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations

Token Exchange System

Token exchange system facilitating conversion between different token types and redemption for rewards. Provides flexible reward experiences through diverse redemption options.
**Redemption Features:**

• **Token Exchange:** Convert between different token types with exchange rates

• **Reward Catalog:** Browse available rewards for token redemption

• **Exchange Rules:** Configure conversion rates and redemption requirements

• **Partner Ecosystem:** Redemption options across business partner networks

• **Flexible Rewards:** Support for products, services, and digital rewards ![Redemption Module](https://s3.eu-west-1.amazonaws.com/pers.assets.prod/tenant/a0df6ebf-51cc-4c18-afcd-0de355c250dc_DemoApp_eXplorins/Documentation/Redemption_image.png)

Request

Get all available redemption types for client reference. Requires valid project API key.

Security
projectKey
curl -i -X GET \
  https://docs.pers.ninja/_mock/swagger/redemptions/types \
  -H 'x-project-key: YOUR_API_KEY_HERE'

Responses

Redemption types retrieved

Bodyapplication/jsonArray [
namestringrequired

Redemption type name

descriptionstring

Redemption type description

imageUrlstring

Redemption type image url

idnumberrequired

Redemption type id

]
Response
application/json
[ { "name": "string", "description": "string", "imageUrl": "string", "id": 0 } ]

Request

Create a new redemption type for system configuration. Replaces POST /redemption/admin/type

Security
tenantAdminJWT
Bodyapplication/jsonrequired
namestringrequired

Redemption type name

descriptionstring

Redemption type description

imageUrlstring

Redemption type image url

curl -i -X POST \
  https://docs.pers.ninja/_mock/swagger/redemptions/types \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "description": "string",
    "imageUrl": "string"
  }'

Responses

Redemption type created successfully

Bodyapplication/json
namestringrequired

Redemption type name

descriptionstring

Redemption type description

imageUrlstring

Redemption type image url

idnumberrequired

Redemption type id

Response
application/json
{ "name": "string", "description": "string", "imageUrl": "string", "id": 0 }

Request

Get specific redemption details by ID. Requires valid project API key.

Security
projectKey
Path
idstringrequired
curl -i -X GET \
  'https://docs.pers.ninja/_mock/swagger/redemptions/{id}' \
  -H 'x-project-key: YOUR_API_KEY_HERE'

Responses

Redemption details retrieved

Bodyapplication/json
idstringrequired

Redemption id

descriptionstring or nullrequired

Description of the redemption

namestring or nullrequired

Name of the redemption

imageUrlstring or nullrequired

Image url of the redemption

isActivebooleanrequired

Redemptio is active

creditTokenAmountnumberrequired

The amount of credit tokens needed to redeem the redemption tokens

typeobject or nullrequired
type.​namestringrequired

Redemption type name

type.​descriptionstring

Redemption type description

type.​imageUrlstring

Redemption type image url

type.​idnumberrequired

Redemption type id

tokenUnitsArray of objects(TokenUnitDTO)required

The redemption tokens to be redeemed

tokenUnits[].​idstringrequired

Token unit id

tokenUnits[].​tokenobjectrequired
tokenUnits[].​token.​idstringrequired

Id of the token

tokenUnits[].​token.​contractAddressstringrequired

Address of the token

tokenUnits[].​token.​metadataArray of objects(TokenMetadataDTO)

Metadata of the token, this is optional and can be null in case of Point token

tokenUnits[].​token.​abiobjectrequired

this is the abi of the contract, this is the interface of the contract to interact with it

tokenUnits[].​token.​chainIdnumberrequired

this is the chain id of the chain where the token is deployed

tokenUnits[].​token.​abiUrlobjectrequired

this is the url of the abi of the contract, to be used to fetch the abi of the contract

tokenUnits[].​token.​namestring

this is the name of the token contract

tokenUnits[].​token.​symbolstring

this is the symbol of the token contract, this is optional and can be null

tokenUnits[].​token.​decimalsnumber

this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)

tokenUnits[].​token.​isActivebooleanrequired

This can be used to enable or disable the token

tokenUnits[].​token.​isGallerybooleanrequired

This can be used to enable or disable the token for gallery

tokenUnits[].​token.​typestringrequired

This is the underlying web3 native type of the token contract

Enum"ERC20""ERC1155""ERC721"
tokenUnits[].​tokenMetadataIncrementalIdnumber or null

token metadata incremental id for the token unit, this is used to identify the specific token metadata that should be minted

tokenUnits[].​amountnumberrequired

Token unit amount is the amount of tokens that the user will receive when aquiring the token unit

tokenUnits[].​maxAmountnumber or 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

maxTotalSupplynumber or nullrequired

The maximum total supply of the redemption

ordernumber or nullrequired

The order of the redemption

availableSupplynumber or null

The available supply of the redemption

maxPerUserobjectrequired

The maximum redemption per user

minUserStatusTypeobject or nullrequired
minUserStatusType.​namestringrequired

User Status Type name

minUserStatusType.​descriptionstring

User Status Type description

minUserStatusType.​minTokenBalancenumberrequired

User Status Type eligible Token Addresses

minUserStatusType.​discountPercentagenumberrequired

User Status Type discount Rate in percentage

minUserStatusType.​imageUrlstring

User Status Type image Url

minUserStatusType.​idnumberrequired

User Status Type id

minUserStatusType.​eligibleTokenAddressesArray of stringsrequired

User Status Type eligible Token Addresses

countryCodeRestrictionsobject

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

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

Redemption tags

Default []
Response
application/json
{ "id": "string", "description": "string", "name": "string", "imageUrl": "string", "isActive": true, "creditTokenAmount": 0, "type": { "name": "string", "description": "string", "imageUrl": "string", "id": 0 }, "tokenUnits": [ { … } ], "maxTotalSupply": 0, "order": 0, "availableSupply": 0, "maxPerUser": {}, "minUserStatusType": { "name": "string", "description": "string", "minTokenBalance": 0, "discountPercentage": 0, "imageUrl": "string", "id": 0, "eligibleTokenAddresses": [ … ] }, "countryCodeRestrictions": [ "NOT_ES", "FR" ], "tags": [] }

Request

Update existing redemption information. Replaces PUT /redemption/admin/{id}

Security
tenantAdminJWT
Path
idstringrequired
Bodyapplication/jsonrequired
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

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"]
curl -i -X PUT \
  'https://docs.pers.ninja/_mock/swagger/redemptions/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "creditTokenAmount": 0,
    "description": "string",
    "name": "string",
    "imageUrl": "string",
    "redemptionTypeId": 0,
    "minUserStatusTypeId": 0,
    "maxTotalSupply": 0,
    "order": 0,
    "maxPerUser": 0,
    "countryCodeRestrictions": [
      "NOT_ES",
      "FR"
    ]
  }'

Responses

Redemption updated successfully

Bodyapplication/json
idstringrequired

Redemption id

descriptionstring or nullrequired

Description of the redemption

namestring or nullrequired

Name of the redemption

imageUrlstring or nullrequired

Image url of the redemption

isActivebooleanrequired

Redemptio is active

creditTokenAmountnumberrequired

The amount of credit tokens needed to redeem the redemption tokens

typeobject or nullrequired
type.​namestringrequired

Redemption type name

type.​descriptionstring

Redemption type description

type.​imageUrlstring

Redemption type image url

type.​idnumberrequired

Redemption type id

tokenUnitsArray of objects(TokenUnitDTO)required

The redemption tokens to be redeemed

tokenUnits[].​idstringrequired

Token unit id

tokenUnits[].​tokenobjectrequired
tokenUnits[].​token.​idstringrequired

Id of the token

tokenUnits[].​token.​contractAddressstringrequired

Address of the token

tokenUnits[].​token.​metadataArray of objects(TokenMetadataDTO)

Metadata of the token, this is optional and can be null in case of Point token

tokenUnits[].​token.​abiobjectrequired

this is the abi of the contract, this is the interface of the contract to interact with it

tokenUnits[].​token.​chainIdnumberrequired

this is the chain id of the chain where the token is deployed

tokenUnits[].​token.​abiUrlobjectrequired

this is the url of the abi of the contract, to be used to fetch the abi of the contract

tokenUnits[].​token.​namestring

this is the name of the token contract

tokenUnits[].​token.​symbolstring

this is the symbol of the token contract, this is optional and can be null

tokenUnits[].​token.​decimalsnumber

this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)

tokenUnits[].​token.​isActivebooleanrequired

This can be used to enable or disable the token

tokenUnits[].​token.​isGallerybooleanrequired

This can be used to enable or disable the token for gallery

tokenUnits[].​token.​typestringrequired

This is the underlying web3 native type of the token contract

Enum"ERC20""ERC1155""ERC721"
tokenUnits[].​tokenMetadataIncrementalIdnumber or null

token metadata incremental id for the token unit, this is used to identify the specific token metadata that should be minted

tokenUnits[].​amountnumberrequired

Token unit amount is the amount of tokens that the user will receive when aquiring the token unit

tokenUnits[].​maxAmountnumber or 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

maxTotalSupplynumber or nullrequired

The maximum total supply of the redemption

ordernumber or nullrequired

The order of the redemption

availableSupplynumber or null

The available supply of the redemption

maxPerUserobjectrequired

The maximum redemption per user

minUserStatusTypeobject or nullrequired
minUserStatusType.​namestringrequired

User Status Type name

minUserStatusType.​descriptionstring

User Status Type description

minUserStatusType.​minTokenBalancenumberrequired

User Status Type eligible Token Addresses

minUserStatusType.​discountPercentagenumberrequired

User Status Type discount Rate in percentage

minUserStatusType.​imageUrlstring

User Status Type image Url

minUserStatusType.​idnumberrequired

User Status Type id

minUserStatusType.​eligibleTokenAddressesArray of stringsrequired

User Status Type eligible Token Addresses

countryCodeRestrictionsobject

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

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

Redemption tags

Default []
Response
application/json
{ "id": "string", "description": "string", "name": "string", "imageUrl": "string", "isActive": true, "creditTokenAmount": 0, "type": { "name": "string", "description": "string", "imageUrl": "string", "id": 0 }, "tokenUnits": [ { … } ], "maxTotalSupply": 0, "order": 0, "availableSupply": 0, "maxPerUser": {}, "minUserStatusType": { "name": "string", "description": "string", "minTokenBalance": 0, "discountPercentage": 0, "imageUrl": "string", "id": 0, "eligibleTokenAddresses": [ … ] }, "countryCodeRestrictions": [ "NOT_ES", "FR" ], "tags": [] }

Request

Permanently delete a redemption. Replaces DELETE /redemption/admin/{id}

Security
tenantAdminJWT
Path
idstringrequired
curl -i -X DELETE \
  'https://docs.pers.ninja/_mock/swagger/redemptions/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Redemption deleted successfully

Bodyapplication/json
boolean
Response
application/json
true

Request

Get the available supply count for a specific redemption. Used for inventory display.

Security
projectKey
Path
idstringrequired
curl -i -X GET \
  'https://docs.pers.ninja/_mock/swagger/redemptions/{id}/available-supply' \
  -H 'x-project-key: YOUR_API_KEY_HERE'

Responses

Available supply count

Bodyapplication/json
number
Response
application/json
0

Request

Execute a redemption for the authenticated user. This is a business-critical operation with IP tracking for fraud prevention. Replaces POST /redemption/auth/redeem

Security
projectKey or authUserJWT
Path
idstringrequired
Bodyapplication/jsonrequired
redemptionIdstring(uuid)required

The ID of the redemption to redeem (must match path parameter)

curl -i -X POST \
  'https://docs.pers.ninja/_mock/swagger/redemptions/{id}/redeem' \
  -H 'Content-Type: application/json' \
  -H 'x-project-key: YOUR_API_KEY_HERE' \
  -d '{
    "redemptionId": "7fe21afe-a95f-43e9-9df9-d4967b99c691"
  }'

Responses

Redemption executed successfully

Bodyapplication/json
idstringrequired

The id of the redemption user redeem

userIdstringrequired

The user id that is claiming the redemption

redemptionIdstringrequired

The redemption that the user is redeeming

transactionIdsArray of stringsrequired

The transaction ids that resulted from the user redeeming the redemption

userCountryCodestring or nullrequired

The country code of the user redeeming the redemption

transactionsArray of objects(TransactionDTO)required
Array [
transactions[][].​amountnumberrequired

Transaction amount

transactions[][].​idstringrequired

Transaction id

transactions[][].​tokenAddressstringrequired

Transaction token address

transactions[][].​contractTokenIdobject or nullrequired

Transaction token contract id, this is the blockchain contract id of the token

transactions[][].​tokenTypestringrequired

Transaction token type

transactions[][].​senderAddressstringrequired

Sender address

transactions[][].​recipientAddressobjectrequired

Recipient address

transactions[][].​transactionHashobjectrequired

Transaction hash

transactions[][].​typestringrequired

Transaction type

Enum"MINT""TRANSFER""BURN"
transactions[][].​triggerProcessTypestringrequired

Trigger process type

Enum"PURCHASE""SPEND""TRANSFER""EARN""CAMPAIGN_USER_CLAIM""CAMPAIGN_SYSTEM_CLAIM""CAMPAIGN_BUSINESS_CLAIM""REDEMPTION_SPEND""REDEMPTION_RECEIVE""MIGRATION"
transactions[][].​triggerProcessIdobjectrequired

Trigger process id, this is the id of the entity that triggered the transaction if applicable (e.g. CampaignUserClaim id)

transactions[][].​statusstringrequired

Transaction status

Enum"created""processing""pending_signature""broadcasted""succeeded""failed"
transactions[][].​createdAtobjectrequired

create date

transactions[][].​updatedAtobjectrequired

update date

transactions[][].​tenantIdstringrequired

Tenant ID for multi-tenant isolation

transactions[][].​chainIdnumberrequired

Blockchain chain ID

transactions[][].​senderIdobject or nullrequired

Sender entity ID (polymorphic reference)

transactions[][].​senderOwnerTypestring or nullrequired

Sender entity type (user, business, system etc.)

Enum"user""business""tenant""system""external"
transactions[][].​recipientIdobject or nullrequired

Recipient entity ID (polymorphic reference)

transactions[][].​recipientOwnerTypestring or nullrequired

Recipient entity type (user, Business, system, etc.)

Enum"user""business""tenant""system""external"
]
Response
application/json
{ "id": "string", "userId": "string", "redemptionId": "string", "transactionIds": [ "string" ], "userCountryCode": "string", "transactions": [ [ … ] ] }

Request

Get all redemptions executed by the authenticated user. Replaces GET /redemption/auth/redeem

Security
projectKey or authUserJWT
curl -i -X GET \
  https://docs.pers.ninja/_mock/swagger/redemptions/me/history \
  -H 'x-project-key: YOUR_API_KEY_HERE'

Responses

User redemption history

Bodyapplication/jsonArray [
idstringrequired

The id of the redemption user redeem

userIdstringrequired

The user id that is claiming the redemption

redemptionIdstringrequired

The redemption that the user is redeeming

transactionIdsArray of stringsrequired

The transaction ids that resulted from the user redeeming the redemption

userCountryCodestring or nullrequired

The country code of the user redeeming the redemption

]
Response
application/json
[ { "id": "string", "userId": "string", "redemptionId": "string", "transactionIds": [ … ], "userCountryCode": "string" } ]

Get redemptions (Intelligent Access)

Request

Intelligent endpoint that adapts based on authentication: Public users get active redemptions only, Admin users get all redemptions with optional filtering. Consolidates GET /redemption and GET /redemption/admin

Security
projectKey
Query
activeboolean

Filter by active status (Admin only: true=active, false=inactive, omit=all). Ignored for public access.

curl -i -X GET \
  'https://docs.pers.ninja/_mock/swagger/redemptions?active=true' \
  -H 'x-project-key: YOUR_API_KEY_HERE'

Responses

Redemptions retrieved based on access level

Bodyapplication/jsonArray [
idstringrequired

Redemption id

descriptionstring or nullrequired

Description of the redemption

namestring or nullrequired

Name of the redemption

imageUrlstring or nullrequired

Image url of the redemption

isActivebooleanrequired

Redemptio is active

creditTokenAmountnumberrequired

The amount of credit tokens needed to redeem the redemption tokens

typeobject or nullrequired
type.​namestringrequired

Redemption type name

type.​descriptionstring

Redemption type description

type.​imageUrlstring

Redemption type image url

type.​idnumberrequired

Redemption type id

tokenUnitsArray of objects(TokenUnitDTO)required

The redemption tokens to be redeemed

tokenUnits[].​idstringrequired

Token unit id

tokenUnits[].​tokenobjectrequired
tokenUnits[].​token.​idstringrequired

Id of the token

tokenUnits[].​token.​contractAddressstringrequired

Address of the token

tokenUnits[].​token.​metadataArray of objects(TokenMetadataDTO)

Metadata of the token, this is optional and can be null in case of Point token

tokenUnits[].​token.​abiobjectrequired

this is the abi of the contract, this is the interface of the contract to interact with it

tokenUnits[].​token.​chainIdnumberrequired

this is the chain id of the chain where the token is deployed

tokenUnits[].​token.​abiUrlobjectrequired

this is the url of the abi of the contract, to be used to fetch the abi of the contract

tokenUnits[].​token.​namestring

this is the name of the token contract

tokenUnits[].​token.​symbolstring

this is the symbol of the token contract, this is optional and can be null

tokenUnits[].​token.​decimalsnumber

this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)

tokenUnits[].​token.​isActivebooleanrequired

This can be used to enable or disable the token

tokenUnits[].​token.​isGallerybooleanrequired

This can be used to enable or disable the token for gallery

tokenUnits[].​token.​typestringrequired

This is the underlying web3 native type of the token contract

Enum"ERC20""ERC1155""ERC721"
tokenUnits[].​tokenMetadataIncrementalIdnumber or null

token metadata incremental id for the token unit, this is used to identify the specific token metadata that should be minted

tokenUnits[].​amountnumberrequired

Token unit amount is the amount of tokens that the user will receive when aquiring the token unit

tokenUnits[].​maxAmountnumber or 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

maxTotalSupplynumber or nullrequired

The maximum total supply of the redemption

ordernumber or nullrequired

The order of the redemption

availableSupplynumber or null

The available supply of the redemption

maxPerUserobjectrequired

The maximum redemption per user

minUserStatusTypeobject or nullrequired
minUserStatusType.​namestringrequired

User Status Type name

minUserStatusType.​descriptionstring

User Status Type description

minUserStatusType.​minTokenBalancenumberrequired

User Status Type eligible Token Addresses

minUserStatusType.​discountPercentagenumberrequired

User Status Type discount Rate in percentage

minUserStatusType.​imageUrlstring

User Status Type image Url

minUserStatusType.​idnumberrequired

User Status Type id

minUserStatusType.​eligibleTokenAddressesArray of stringsrequired

User Status Type eligible Token Addresses

countryCodeRestrictionsobject

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

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

Redemption tags

Default []
]
Response
application/json
[ { "id": "string", "description": "string", "name": "string", "imageUrl": "string", "isActive": true, "creditTokenAmount": 0, "type": { … }, "tokenUnits": [ … ], "maxTotalSupply": 0, "order": 0, "availableSupply": 0, "maxPerUser": {}, "minUserStatusType": { … }, "countryCodeRestrictions": [ … ], "tags": [] } ]

Request

Create a new redemption with administrative privileges. Replaces POST /redemption/admin

Security
tenantAdminJWT
Bodyapplication/jsonrequired
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

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"]
curl -i -X POST \
  https://docs.pers.ninja/_mock/swagger/redemptions \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "creditTokenAmount": 0,
    "description": "string",
    "name": "string",
    "imageUrl": "string",
    "redemptionTypeId": 0,
    "minUserStatusTypeId": 0,
    "maxTotalSupply": 0,
    "order": 0,
    "maxPerUser": 0,
    "countryCodeRestrictions": [
      "NOT_ES",
      "FR"
    ]
  }'

Responses

Redemption created successfully

Bodyapplication/json
idstringrequired

Redemption id

descriptionstring or nullrequired

Description of the redemption

namestring or nullrequired

Name of the redemption

imageUrlstring or nullrequired

Image url of the redemption

isActivebooleanrequired

Redemptio is active

creditTokenAmountnumberrequired

The amount of credit tokens needed to redeem the redemption tokens

typeobject or nullrequired
type.​namestringrequired

Redemption type name

type.​descriptionstring

Redemption type description

type.​imageUrlstring

Redemption type image url

type.​idnumberrequired

Redemption type id

tokenUnitsArray of objects(TokenUnitDTO)required

The redemption tokens to be redeemed

tokenUnits[].​idstringrequired

Token unit id

tokenUnits[].​tokenobjectrequired
tokenUnits[].​token.​idstringrequired

Id of the token

tokenUnits[].​token.​contractAddressstringrequired

Address of the token

tokenUnits[].​token.​metadataArray of objects(TokenMetadataDTO)

Metadata of the token, this is optional and can be null in case of Point token

tokenUnits[].​token.​abiobjectrequired

this is the abi of the contract, this is the interface of the contract to interact with it

tokenUnits[].​token.​chainIdnumberrequired

this is the chain id of the chain where the token is deployed

tokenUnits[].​token.​abiUrlobjectrequired

this is the url of the abi of the contract, to be used to fetch the abi of the contract

tokenUnits[].​token.​namestring

this is the name of the token contract

tokenUnits[].​token.​symbolstring

this is the symbol of the token contract, this is optional and can be null

tokenUnits[].​token.​decimalsnumber

this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)

tokenUnits[].​token.​isActivebooleanrequired

This can be used to enable or disable the token

tokenUnits[].​token.​isGallerybooleanrequired

This can be used to enable or disable the token for gallery

tokenUnits[].​token.​typestringrequired

This is the underlying web3 native type of the token contract

Enum"ERC20""ERC1155""ERC721"
tokenUnits[].​tokenMetadataIncrementalIdnumber or null

token metadata incremental id for the token unit, this is used to identify the specific token metadata that should be minted

tokenUnits[].​amountnumberrequired

Token unit amount is the amount of tokens that the user will receive when aquiring the token unit

tokenUnits[].​maxAmountnumber or 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

maxTotalSupplynumber or nullrequired

The maximum total supply of the redemption

ordernumber or nullrequired

The order of the redemption

availableSupplynumber or null

The available supply of the redemption

maxPerUserobjectrequired

The maximum redemption per user

minUserStatusTypeobject or nullrequired
minUserStatusType.​namestringrequired

User Status Type name

minUserStatusType.​descriptionstring

User Status Type description

minUserStatusType.​minTokenBalancenumberrequired

User Status Type eligible Token Addresses

minUserStatusType.​discountPercentagenumberrequired

User Status Type discount Rate in percentage

minUserStatusType.​imageUrlstring

User Status Type image Url

minUserStatusType.​idnumberrequired

User Status Type id

minUserStatusType.​eligibleTokenAddressesArray of stringsrequired

User Status Type eligible Token Addresses

countryCodeRestrictionsobject

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

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

Redemption tags

Default []
Response
application/json
{ "id": "string", "description": "string", "name": "string", "imageUrl": "string", "isActive": true, "creditTokenAmount": 0, "type": { "name": "string", "description": "string", "imageUrl": "string", "id": 0 }, "tokenUnits": [ { … } ], "maxTotalSupply": 0, "order": 0, "availableSupply": 0, "maxPerUser": {}, "minUserStatusType": { "name": "string", "description": "string", "minTokenBalance": 0, "discountPercentage": 0, "imageUrl": "string", "id": 0, "eligibleTokenAddresses": [ … ] }, "countryCodeRestrictions": [ "NOT_ES", "FR" ], "tags": [] }

Request

Toggle redemption between active and inactive status. Follows standard /status pattern. Replaces PUT /redemption/admin/{id}/toggle-active

Security
tenantAdminJWT
Path
idstringrequired
curl -i -X PUT \
  'https://docs.pers.ninja/_mock/swagger/redemptions/{id}/status' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Redemption status toggled

Bodyapplication/json
idstringrequired

Redemption id

descriptionstring or nullrequired

Description of the redemption

namestring or nullrequired

Name of the redemption

imageUrlstring or nullrequired

Image url of the redemption

isActivebooleanrequired

Redemptio is active

creditTokenAmountnumberrequired

The amount of credit tokens needed to redeem the redemption tokens

typeobject or nullrequired
type.​namestringrequired

Redemption type name

type.​descriptionstring

Redemption type description

type.​imageUrlstring

Redemption type image url

type.​idnumberrequired

Redemption type id

tokenUnitsArray of objects(TokenUnitDTO)required

The redemption tokens to be redeemed

tokenUnits[].​idstringrequired

Token unit id

tokenUnits[].​tokenobjectrequired
tokenUnits[].​token.​idstringrequired

Id of the token

tokenUnits[].​token.​contractAddressstringrequired

Address of the token

tokenUnits[].​token.​metadataArray of objects(TokenMetadataDTO)

Metadata of the token, this is optional and can be null in case of Point token

tokenUnits[].​token.​abiobjectrequired

this is the abi of the contract, this is the interface of the contract to interact with it

tokenUnits[].​token.​chainIdnumberrequired

this is the chain id of the chain where the token is deployed

tokenUnits[].​token.​abiUrlobjectrequired

this is the url of the abi of the contract, to be used to fetch the abi of the contract

tokenUnits[].​token.​namestring

this is the name of the token contract

tokenUnits[].​token.​symbolstring

this is the symbol of the token contract, this is optional and can be null

tokenUnits[].​token.​decimalsnumber

this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)

tokenUnits[].​token.​isActivebooleanrequired

This can be used to enable or disable the token

tokenUnits[].​token.​isGallerybooleanrequired

This can be used to enable or disable the token for gallery

tokenUnits[].​token.​typestringrequired

This is the underlying web3 native type of the token contract

Enum"ERC20""ERC1155""ERC721"
tokenUnits[].​tokenMetadataIncrementalIdnumber or null

token metadata incremental id for the token unit, this is used to identify the specific token metadata that should be minted

tokenUnits[].​amountnumberrequired

Token unit amount is the amount of tokens that the user will receive when aquiring the token unit

tokenUnits[].​maxAmountnumber or 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

maxTotalSupplynumber or nullrequired

The maximum total supply of the redemption

ordernumber or nullrequired

The order of the redemption

availableSupplynumber or null

The available supply of the redemption

maxPerUserobjectrequired

The maximum redemption per user

minUserStatusTypeobject or nullrequired
minUserStatusType.​namestringrequired

User Status Type name

minUserStatusType.​descriptionstring

User Status Type description

minUserStatusType.​minTokenBalancenumberrequired

User Status Type eligible Token Addresses

minUserStatusType.​discountPercentagenumberrequired

User Status Type discount Rate in percentage

minUserStatusType.​imageUrlstring

User Status Type image Url

minUserStatusType.​idnumberrequired

User Status Type id

minUserStatusType.​eligibleTokenAddressesArray of stringsrequired

User Status Type eligible Token Addresses

countryCodeRestrictionsobject

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

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

Redemption tags

Default []
Response
application/json
{ "id": "string", "description": "string", "name": "string", "imageUrl": "string", "isActive": true, "creditTokenAmount": 0, "type": { "name": "string", "description": "string", "imageUrl": "string", "id": 0 }, "tokenUnits": [ { … } ], "maxTotalSupply": 0, "order": 0, "availableSupply": 0, "maxPerUser": {}, "minUserStatusType": { "name": "string", "description": "string", "minTokenBalance": 0, "discountPercentage": 0, "imageUrl": "string", "id": 0, "eligibleTokenAddresses": [ … ] }, "countryCodeRestrictions": [ "NOT_ES", "FR" ], "tags": [] }

Add token unit to redemption (Admin)

Request

Add a new token unit to an existing redemption. Replaces POST /redemption/admin/{id}/token-units

Security
tenantAdminJWT
Path
idstringrequired
Bodyapplication/jsonrequired
tokenIdstringrequired

Token id

tokenMetadataIncrementalIdnumber

token metadata incremental id for the token unit, this is used to identify the specific token metadata that should be minted

amountnumberrequired

Token unit amount is the amount of tokens that the user will receive when aquiring the token unit

maxAmountnumber

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

curl -i -X POST \
  'https://docs.pers.ninja/_mock/swagger/redemptions/{id}/token-units' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "tokenId": "string",
    "tokenMetadataIncrementalId": 0,
    "amount": 0,
    "maxAmount": 0
  }'

Responses

Token unit added to redemption

Bodyapplication/json
idstringrequired

Redemption id

descriptionstring or nullrequired

Description of the redemption

namestring or nullrequired

Name of the redemption

imageUrlstring or nullrequired

Image url of the redemption

isActivebooleanrequired

Redemptio is active

creditTokenAmountnumberrequired

The amount of credit tokens needed to redeem the redemption tokens

typeobject or nullrequired
type.​namestringrequired

Redemption type name

type.​descriptionstring

Redemption type description

type.​imageUrlstring

Redemption type image url

type.​idnumberrequired

Redemption type id

tokenUnitsArray of objects(TokenUnitDTO)required

The redemption tokens to be redeemed

tokenUnits[].​idstringrequired

Token unit id

tokenUnits[].​tokenobjectrequired
tokenUnits[].​token.​idstringrequired

Id of the token

tokenUnits[].​token.​contractAddressstringrequired

Address of the token

tokenUnits[].​token.​metadataArray of objects(TokenMetadataDTO)

Metadata of the token, this is optional and can be null in case of Point token

tokenUnits[].​token.​abiobjectrequired

this is the abi of the contract, this is the interface of the contract to interact with it

tokenUnits[].​token.​chainIdnumberrequired

this is the chain id of the chain where the token is deployed

tokenUnits[].​token.​abiUrlobjectrequired

this is the url of the abi of the contract, to be used to fetch the abi of the contract

tokenUnits[].​token.​namestring

this is the name of the token contract

tokenUnits[].​token.​symbolstring

this is the symbol of the token contract, this is optional and can be null

tokenUnits[].​token.​decimalsnumber

this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)

tokenUnits[].​token.​isActivebooleanrequired

This can be used to enable or disable the token

tokenUnits[].​token.​isGallerybooleanrequired

This can be used to enable or disable the token for gallery

tokenUnits[].​token.​typestringrequired

This is the underlying web3 native type of the token contract

Enum"ERC20""ERC1155""ERC721"
tokenUnits[].​tokenMetadataIncrementalIdnumber or null

token metadata incremental id for the token unit, this is used to identify the specific token metadata that should be minted

tokenUnits[].​amountnumberrequired

Token unit amount is the amount of tokens that the user will receive when aquiring the token unit

tokenUnits[].​maxAmountnumber or 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

maxTotalSupplynumber or nullrequired

The maximum total supply of the redemption

ordernumber or nullrequired

The order of the redemption

availableSupplynumber or null

The available supply of the redemption

maxPerUserobjectrequired

The maximum redemption per user

minUserStatusTypeobject or nullrequired
minUserStatusType.​namestringrequired

User Status Type name

minUserStatusType.​descriptionstring

User Status Type description

minUserStatusType.​minTokenBalancenumberrequired

User Status Type eligible Token Addresses

minUserStatusType.​discountPercentagenumberrequired

User Status Type discount Rate in percentage

minUserStatusType.​imageUrlstring

User Status Type image Url

minUserStatusType.​idnumberrequired

User Status Type id

minUserStatusType.​eligibleTokenAddressesArray of stringsrequired

User Status Type eligible Token Addresses

countryCodeRestrictionsobject

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

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

Redemption tags

Default []
Response
application/json
{ "id": "string", "description": "string", "name": "string", "imageUrl": "string", "isActive": true, "creditTokenAmount": 0, "type": { "name": "string", "description": "string", "imageUrl": "string", "id": 0 }, "tokenUnits": [ { … } ], "maxTotalSupply": 0, "order": 0, "availableSupply": 0, "maxPerUser": {}, "minUserStatusType": { "name": "string", "description": "string", "minTokenBalance": 0, "discountPercentage": 0, "imageUrl": "string", "id": 0, "eligibleTokenAddresses": [ … ] }, "countryCodeRestrictions": [ "NOT_ES", "FR" ], "tags": [] }

Update redemption token unit (Admin)

Request

Update an existing token unit within a redemption. Replaces PUT /redemption/admin/{id}/token-units/{tokenUnitId}

Security
tenantAdminJWT
Path
idstringrequired
tokenUnitIdstringrequired
Bodyapplication/jsonrequired
tokenIdstringrequired

Token id

tokenMetadataIncrementalIdnumber

token metadata incremental id for the token unit, this is used to identify the specific token metadata that should be minted

amountnumberrequired

Token unit amount is the amount of tokens that the user will receive when aquiring the token unit

maxAmountnumber

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

curl -i -X PUT \
  'https://docs.pers.ninja/_mock/swagger/redemptions/{id}/token-units/{tokenUnitId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "tokenId": "string",
    "tokenMetadataIncrementalId": 0,
    "amount": 0,
    "maxAmount": 0
  }'

Responses

Token unit updated successfully

Bodyapplication/json
idstringrequired

Redemption id

descriptionstring or nullrequired

Description of the redemption

namestring or nullrequired

Name of the redemption

imageUrlstring or nullrequired

Image url of the redemption

isActivebooleanrequired

Redemptio is active

creditTokenAmountnumberrequired

The amount of credit tokens needed to redeem the redemption tokens

typeobject or nullrequired
type.​namestringrequired

Redemption type name

type.​descriptionstring

Redemption type description

type.​imageUrlstring

Redemption type image url

type.​idnumberrequired

Redemption type id

tokenUnitsArray of objects(TokenUnitDTO)required

The redemption tokens to be redeemed

tokenUnits[].​idstringrequired

Token unit id

tokenUnits[].​tokenobjectrequired
tokenUnits[].​token.​idstringrequired

Id of the token

tokenUnits[].​token.​contractAddressstringrequired

Address of the token

tokenUnits[].​token.​metadataArray of objects(TokenMetadataDTO)

Metadata of the token, this is optional and can be null in case of Point token

tokenUnits[].​token.​abiobjectrequired

this is the abi of the contract, this is the interface of the contract to interact with it

tokenUnits[].​token.​chainIdnumberrequired

this is the chain id of the chain where the token is deployed

tokenUnits[].​token.​abiUrlobjectrequired

this is the url of the abi of the contract, to be used to fetch the abi of the contract

tokenUnits[].​token.​namestring

this is the name of the token contract

tokenUnits[].​token.​symbolstring

this is the symbol of the token contract, this is optional and can be null

tokenUnits[].​token.​decimalsnumber

this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)

tokenUnits[].​token.​isActivebooleanrequired

This can be used to enable or disable the token

tokenUnits[].​token.​isGallerybooleanrequired

This can be used to enable or disable the token for gallery

tokenUnits[].​token.​typestringrequired

This is the underlying web3 native type of the token contract

Enum"ERC20""ERC1155""ERC721"
tokenUnits[].​tokenMetadataIncrementalIdnumber or null

token metadata incremental id for the token unit, this is used to identify the specific token metadata that should be minted

tokenUnits[].​amountnumberrequired

Token unit amount is the amount of tokens that the user will receive when aquiring the token unit

tokenUnits[].​maxAmountnumber or 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

maxTotalSupplynumber or nullrequired

The maximum total supply of the redemption

ordernumber or nullrequired

The order of the redemption

availableSupplynumber or null

The available supply of the redemption

maxPerUserobjectrequired

The maximum redemption per user

minUserStatusTypeobject or nullrequired
minUserStatusType.​namestringrequired

User Status Type name

minUserStatusType.​descriptionstring

User Status Type description

minUserStatusType.​minTokenBalancenumberrequired

User Status Type eligible Token Addresses

minUserStatusType.​discountPercentagenumberrequired

User Status Type discount Rate in percentage

minUserStatusType.​imageUrlstring

User Status Type image Url

minUserStatusType.​idnumberrequired

User Status Type id

minUserStatusType.​eligibleTokenAddressesArray of stringsrequired

User Status Type eligible Token Addresses

countryCodeRestrictionsobject

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

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

Redemption tags

Default []
Response
application/json
{ "id": "string", "description": "string", "name": "string", "imageUrl": "string", "isActive": true, "creditTokenAmount": 0, "type": { "name": "string", "description": "string", "imageUrl": "string", "id": 0 }, "tokenUnits": [ { … } ], "maxTotalSupply": 0, "order": 0, "availableSupply": 0, "maxPerUser": {}, "minUserStatusType": { "name": "string", "description": "string", "minTokenBalance": 0, "discountPercentage": 0, "imageUrl": "string", "id": 0, "eligibleTokenAddresses": [ … ] }, "countryCodeRestrictions": [ "NOT_ES", "FR" ], "tags": [] }

Remove token unit from redemption (Admin)

Request

Remove an existing token unit from a redemption. Replaces DELETE /redemption/admin/{id}/token-units/{tokenUnitId}

Security
tenantAdminJWT
Path
idstringrequired
tokenUnitIdstringrequired
curl -i -X DELETE \
  'https://docs.pers.ninja/_mock/swagger/redemptions/{id}/token-units/{tokenUnitId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Token unit removed from redemption

Bodyapplication/json
idstringrequired

Redemption id

descriptionstring or nullrequired

Description of the redemption

namestring or nullrequired

Name of the redemption

imageUrlstring or nullrequired

Image url of the redemption

isActivebooleanrequired

Redemptio is active

creditTokenAmountnumberrequired

The amount of credit tokens needed to redeem the redemption tokens

typeobject or nullrequired
type.​namestringrequired

Redemption type name

type.​descriptionstring

Redemption type description

type.​imageUrlstring

Redemption type image url

type.​idnumberrequired

Redemption type id

tokenUnitsArray of objects(TokenUnitDTO)required

The redemption tokens to be redeemed

tokenUnits[].​idstringrequired

Token unit id

tokenUnits[].​tokenobjectrequired
tokenUnits[].​token.​idstringrequired

Id of the token

tokenUnits[].​token.​contractAddressstringrequired

Address of the token

tokenUnits[].​token.​metadataArray of objects(TokenMetadataDTO)

Metadata of the token, this is optional and can be null in case of Point token

tokenUnits[].​token.​abiobjectrequired

this is the abi of the contract, this is the interface of the contract to interact with it

tokenUnits[].​token.​chainIdnumberrequired

this is the chain id of the chain where the token is deployed

tokenUnits[].​token.​abiUrlobjectrequired

this is the url of the abi of the contract, to be used to fetch the abi of the contract

tokenUnits[].​token.​namestring

this is the name of the token contract

tokenUnits[].​token.​symbolstring

this is the symbol of the token contract, this is optional and can be null

tokenUnits[].​token.​decimalsnumber

this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)

tokenUnits[].​token.​isActivebooleanrequired

This can be used to enable or disable the token

tokenUnits[].​token.​isGallerybooleanrequired

This can be used to enable or disable the token for gallery

tokenUnits[].​token.​typestringrequired

This is the underlying web3 native type of the token contract

Enum"ERC20""ERC1155""ERC721"
tokenUnits[].​tokenMetadataIncrementalIdnumber or null

token metadata incremental id for the token unit, this is used to identify the specific token metadata that should be minted

tokenUnits[].​amountnumberrequired

Token unit amount is the amount of tokens that the user will receive when aquiring the token unit

tokenUnits[].​maxAmountnumber or 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

maxTotalSupplynumber or nullrequired

The maximum total supply of the redemption

ordernumber or nullrequired

The order of the redemption

availableSupplynumber or null

The available supply of the redemption

maxPerUserobjectrequired

The maximum redemption per user

minUserStatusTypeobject or nullrequired
minUserStatusType.​namestringrequired

User Status Type name

minUserStatusType.​descriptionstring

User Status Type description

minUserStatusType.​minTokenBalancenumberrequired

User Status Type eligible Token Addresses

minUserStatusType.​discountPercentagenumberrequired

User Status Type discount Rate in percentage

minUserStatusType.​imageUrlstring

User Status Type image Url

minUserStatusType.​idnumberrequired

User Status Type id

minUserStatusType.​eligibleTokenAddressesArray of stringsrequired

User Status Type eligible Token Addresses

countryCodeRestrictionsobject

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

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

Redemption tags

Default []
Response
application/json
{ "id": "string", "description": "string", "name": "string", "imageUrl": "string", "isActive": true, "creditTokenAmount": 0, "type": { "name": "string", "description": "string", "imageUrl": "string", "id": 0 }, "tokenUnits": [ { … } ], "maxTotalSupply": 0, "order": 0, "availableSupply": 0, "maxPerUser": {}, "minUserStatusType": { "name": "string", "description": "string", "minTokenBalance": 0, "discountPercentage": 0, "imageUrl": "string", "id": 0, "eligibleTokenAddresses": [ … ] }, "countryCodeRestrictions": [ "NOT_ES", "FR" ], "tags": [] }
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations