Skip to content

PERS-api Documentation (2.2.2)

PERS API Documentation

This RESTful API enables seamless integration of Web3 loyalty, token management, and engagement features into your applications.

Usage Guidelines:

  • RESTful Design: Resources are accessed via standard HTTP methods (GET, POST, PUT, DELETE) with predictable, resource-oriented URLs.
  • Authentication: Secure access is enforced via Bearer Tokens (JWT) and Project Keys (defining the Tenant context).
  • Data Format: All requests and responses utilize standard JSON formatting.

Explore the modules below for detailed endpoint specifications, schemas, and testing capabilities.

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

Campaign Activation System

Campaign trigger system managing activation rules and eligibility conditions. Defines when and how campaigns activate including complex condition management for sophisticated campaign logic.
Trigger Features:

•
Trigger Catalog:
Public browsing of available campaign activation triggers

•
Condition Management:
Create complex trigger conditions with multiple criteria

•
Campaign Assignment:
Link triggers to campaigns for automated activation

•
Eligibility Rules:
Define sophisticated user participation requirements

•
Event-Based Activation:
Trigger campaigns based on user actions and external events

Request

Get all available triggers for campaign configuration. Public access for catalog browsing. Use pagination parameters (page & limit) for optimal performance. Legacy support: returns array without params (deprecated - will be removed in future). Replaces GET /campaign/trigger/all

Security
projectKey
Query
pagenumber

Page number for pagination (1-based)

limitnumber

Items per page for pagination

curl -i -X GET \
  'https://docs.pers.ninja/_mock/swagger/campaign-triggers?page=0&limit=0' \
  -H 'x-project-key: YOUR_API_KEY_HERE'

Responses

All available triggers retrieved

Bodyapplication/jsonArray [
namestring

Campaign trigger name

descriptionstring

Campaign trigger description

maxPerDaynumber or null

DEPRECATED - use maxPerDayPerUser: Campaign trigger max per day

maxPerDayPerUsernumber or null

Campaign trigger max per day per user

maxPerUsernumber or null

Campaign trigger max per user

minCooldownSecondsnumber or null

Campaign trigger min cooldown seconds

maxGeoDistanceInMetersnumber or null

Campaign trigger max geo distance to Business in meters

requiredUserInfostring or null

Campaign trigger required user info

triggerTypestring

Campaign trigger type

Enum"CLAIM_BY_USER""CLAIM_BY_SYSTEM""CLAIM_BY_BUSINESS"
maxMultipliernumber or null

Campaign trigger max multiplier

completionThresholdnumber or null

Campaign trigger completion threshold. This indicates the number of completions required before the reward is granted

maxTotalnumber or null

Campaign trigger max total completions across all users

maxPerDayTotalnumber or null

Campaign trigger max total completions per day across all users

maxPerSourcenumber or null

Maximum claims per trigger source for this campaign. Limits how many times each individual trigger source can be used.

conditionsArray of objects(CampaignTriggerConditionDTO)

Campaign trigger conditions

sourceLogicstring

Source logic type defining how multiple trigger sources combine to activate the flow

Default "any"
Value"any"
idstringrequired

Campaign trigger id

]
Response
application/json
[ { "name": "string", "description": "string", "maxPerDay": 0, "maxPerDayPerUser": 0, "maxPerUser": 0, "minCooldownSeconds": 0, "maxGeoDistanceInMeters": 0, "requiredUserInfo": "string", "triggerType": "CLAIM_BY_USER", "maxMultiplier": 0, "completionThreshold": 0, "maxTotal": 0, "maxPerDayTotal": 0, "maxPerSource": 0, "conditions": [ … ], "sourceLogic": "any", "id": "string" } ]

Request

Create a new campaign trigger for use in campaigns. Admin-only operation. Replaces POST /campaign/admin/trigger

Security
authJWT
Bodyapplication/jsonrequired
namestring

Campaign trigger name

descriptionstring

Campaign trigger description

maxPerDaynumber or null

DEPRECATED - use maxPerDayPerUser: Campaign trigger max per day

maxPerDayPerUsernumber or null

Campaign trigger max per day per user

maxPerUsernumber or null

Campaign trigger max per user

minCooldownSecondsnumber or null

Campaign trigger min cooldown seconds

maxGeoDistanceInMetersnumber or null

Campaign trigger max geo distance to Business in meters

requiredUserInfostring or null

Campaign trigger required user info

triggerTypestring

Campaign trigger type

Enum"CLAIM_BY_USER""CLAIM_BY_SYSTEM""CLAIM_BY_BUSINESS"
maxMultipliernumber or null

Campaign trigger max multiplier

completionThresholdnumber or null

Campaign trigger completion threshold. This indicates the number of completions required before the reward is granted

maxTotalnumber or null

Campaign trigger max total completions across all users

maxPerDayTotalnumber or null

Campaign trigger max total completions per day across all users

maxPerSourcenumber or null

Maximum claims per trigger source for this campaign. Limits how many times each individual trigger source can be used.

conditionsArray of objects(CampaignTriggerConditionDTO)

Campaign trigger conditions

sourceLogicstring

Source logic type defining how multiple trigger sources combine to activate the flow

Default "any"
Value"any"
curl -i -X POST \
  https://docs.pers.ninja/_mock/swagger/campaign-triggers \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "description": "string",
    "maxPerDay": 0,
    "maxPerDayPerUser": 0,
    "maxPerUser": 0,
    "minCooldownSeconds": 0,
    "maxGeoDistanceInMeters": 0,
    "requiredUserInfo": "string",
    "triggerType": "CLAIM_BY_USER",
    "maxMultiplier": 0,
    "completionThreshold": 0,
    "maxTotal": 0,
    "maxPerDayTotal": 0,
    "maxPerSource": 0,
    "conditions": [
      {
        "conditionType": "EQUALS",
        "value": {},
        "key": "string"
      }
    ],
    "sourceLogic": "any"
  }'

Responses

Campaign trigger created successfully

Bodyapplication/json
namestring

Campaign trigger name

descriptionstring

Campaign trigger description

maxPerDaynumber or null

DEPRECATED - use maxPerDayPerUser: Campaign trigger max per day

maxPerDayPerUsernumber or null

Campaign trigger max per day per user

maxPerUsernumber or null

Campaign trigger max per user

minCooldownSecondsnumber or null

Campaign trigger min cooldown seconds

maxGeoDistanceInMetersnumber or null

Campaign trigger max geo distance to Business in meters

requiredUserInfostring or null

Campaign trigger required user info

triggerTypestring

Campaign trigger type

Enum"CLAIM_BY_USER""CLAIM_BY_SYSTEM""CLAIM_BY_BUSINESS"
maxMultipliernumber or null

Campaign trigger max multiplier

completionThresholdnumber or null

Campaign trigger completion threshold. This indicates the number of completions required before the reward is granted

maxTotalnumber or null

Campaign trigger max total completions across all users

maxPerDayTotalnumber or null

Campaign trigger max total completions per day across all users

maxPerSourcenumber or null

Maximum claims per trigger source for this campaign. Limits how many times each individual trigger source can be used.

conditionsArray of objects(CampaignTriggerConditionDTO)

Campaign trigger conditions

sourceLogicstring

Source logic type defining how multiple trigger sources combine to activate the flow

Default "any"
Value"any"
idstringrequired

Campaign trigger id

Response
application/json
{ "name": "string", "description": "string", "maxPerDay": 0, "maxPerDayPerUser": 0, "maxPerUser": 0, "minCooldownSeconds": 0, "maxGeoDistanceInMeters": 0, "requiredUserInfo": "string", "triggerType": "CLAIM_BY_USER", "maxMultiplier": 0, "completionThreshold": 0, "maxTotal": 0, "maxPerDayTotal": 0, "maxPerSource": 0, "conditions": [ { … } ], "sourceLogic": "any", "id": "string" }

Request

Get a specific campaign trigger by ID. Useful for dashboard selection and preview.

Security
projectKey
Path
triggerIdstringrequired
curl -i -X GET \
  'https://docs.pers.ninja/_mock/swagger/campaign-triggers/{triggerId}' \
  -H 'x-project-key: YOUR_API_KEY_HERE'

Responses

Trigger retrieved successfully

Bodyapplication/json
namestring

Campaign trigger name

descriptionstring

Campaign trigger description

maxPerDaynumber or null

DEPRECATED - use maxPerDayPerUser: Campaign trigger max per day

maxPerDayPerUsernumber or null

Campaign trigger max per day per user

maxPerUsernumber or null

Campaign trigger max per user

minCooldownSecondsnumber or null

Campaign trigger min cooldown seconds

maxGeoDistanceInMetersnumber or null

Campaign trigger max geo distance to Business in meters

requiredUserInfostring or null

Campaign trigger required user info

triggerTypestring

Campaign trigger type

Enum"CLAIM_BY_USER""CLAIM_BY_SYSTEM""CLAIM_BY_BUSINESS"
maxMultipliernumber or null

Campaign trigger max multiplier

completionThresholdnumber or null

Campaign trigger completion threshold. This indicates the number of completions required before the reward is granted

maxTotalnumber or null

Campaign trigger max total completions across all users

maxPerDayTotalnumber or null

Campaign trigger max total completions per day across all users

maxPerSourcenumber or null

Maximum claims per trigger source for this campaign. Limits how many times each individual trigger source can be used.

conditionsArray of objects(CampaignTriggerConditionDTO)

Campaign trigger conditions

sourceLogicstring

Source logic type defining how multiple trigger sources combine to activate the flow

Default "any"
Value"any"
idstringrequired

Campaign trigger id

Response
application/json
{ "name": "string", "description": "string", "maxPerDay": 0, "maxPerDayPerUser": 0, "maxPerUser": 0, "minCooldownSeconds": 0, "maxGeoDistanceInMeters": 0, "requiredUserInfo": "string", "triggerType": "CLAIM_BY_USER", "maxMultiplier": 0, "completionThreshold": 0, "maxTotal": 0, "maxPerDayTotal": 0, "maxPerSource": 0, "conditions": [ { … } ], "sourceLogic": "any", "id": "string" }

Request

Update an existing campaign trigger. Admin-only operation. Replaces PUT /campaign/admin/trigger/{id}

Security
authJWT
Path
triggerIdstringrequired
Bodyapplication/jsonrequired
namestring

Campaign trigger name

descriptionstring

Campaign trigger description

maxPerDaynumber or null

DEPRECATED - use maxPerDayPerUser: Campaign trigger max per day

maxPerDayPerUsernumber or null

Campaign trigger max per day per user

maxPerUsernumber or null

Campaign trigger max per user

minCooldownSecondsnumber or null

Campaign trigger min cooldown seconds

maxGeoDistanceInMetersnumber or null

Campaign trigger max geo distance to Business in meters

requiredUserInfostring or null

Campaign trigger required user info

triggerTypestring

Campaign trigger type

Enum"CLAIM_BY_USER""CLAIM_BY_SYSTEM""CLAIM_BY_BUSINESS"
maxMultipliernumber or null

Campaign trigger max multiplier

completionThresholdnumber or null

Campaign trigger completion threshold. This indicates the number of completions required before the reward is granted

maxTotalnumber or null

Campaign trigger max total completions across all users

maxPerDayTotalnumber or null

Campaign trigger max total completions per day across all users

maxPerSourcenumber or null

Maximum claims per trigger source for this campaign. Limits how many times each individual trigger source can be used.

conditionsArray of objects(CampaignTriggerConditionDTO)

Campaign trigger conditions

sourceLogicstring

Source logic type defining how multiple trigger sources combine to activate the flow

Default "any"
Value"any"
curl -i -X PUT \
  'https://docs.pers.ninja/_mock/swagger/campaign-triggers/{triggerId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "description": "string",
    "maxPerDay": 0,
    "maxPerDayPerUser": 0,
    "maxPerUser": 0,
    "minCooldownSeconds": 0,
    "maxGeoDistanceInMeters": 0,
    "requiredUserInfo": "string",
    "triggerType": "CLAIM_BY_USER",
    "maxMultiplier": 0,
    "completionThreshold": 0,
    "maxTotal": 0,
    "maxPerDayTotal": 0,
    "maxPerSource": 0,
    "conditions": [
      {
        "conditionType": "EQUALS",
        "value": {},
        "key": "string"
      }
    ],
    "sourceLogic": "any"
  }'

Responses

Campaign trigger updated successfully

Bodyapplication/json
namestring

Campaign trigger name

descriptionstring

Campaign trigger description

maxPerDaynumber or null

DEPRECATED - use maxPerDayPerUser: Campaign trigger max per day

maxPerDayPerUsernumber or null

Campaign trigger max per day per user

maxPerUsernumber or null

Campaign trigger max per user

minCooldownSecondsnumber or null

Campaign trigger min cooldown seconds

maxGeoDistanceInMetersnumber or null

Campaign trigger max geo distance to Business in meters

requiredUserInfostring or null

Campaign trigger required user info

triggerTypestring

Campaign trigger type

Enum"CLAIM_BY_USER""CLAIM_BY_SYSTEM""CLAIM_BY_BUSINESS"
maxMultipliernumber or null

Campaign trigger max multiplier

completionThresholdnumber or null

Campaign trigger completion threshold. This indicates the number of completions required before the reward is granted

maxTotalnumber or null

Campaign trigger max total completions across all users

maxPerDayTotalnumber or null

Campaign trigger max total completions per day across all users

maxPerSourcenumber or null

Maximum claims per trigger source for this campaign. Limits how many times each individual trigger source can be used.

conditionsArray of objects(CampaignTriggerConditionDTO)

Campaign trigger conditions

sourceLogicstring

Source logic type defining how multiple trigger sources combine to activate the flow

Default "any"
Value"any"
idstringrequired

Campaign trigger id

Response
application/json
{ "name": "string", "description": "string", "maxPerDay": 0, "maxPerDayPerUser": 0, "maxPerUser": 0, "minCooldownSeconds": 0, "maxGeoDistanceInMeters": 0, "requiredUserInfo": "string", "triggerType": "CLAIM_BY_USER", "maxMultiplier": 0, "completionThreshold": 0, "maxTotal": 0, "maxPerDayTotal": 0, "maxPerSource": 0, "conditions": [ { … } ], "sourceLogic": "any", "id": "string" }

Request

Delete an existing campaign trigger. Admin-only operation. Replaces DELETE /campaign/admin/trigger/{id}

Security
authJWT
Path
triggerIdstringrequired
curl -i -X DELETE \
  'https://docs.pers.ninja/_mock/swagger/campaign-triggers/{triggerId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Campaign trigger deleted successfully

Bodyapplication/json
boolean
Response
application/json
true

Assign trigger to campaign (Admin)

Request

Assign a trigger to a specific campaign for activation conditions. Admin-only operation. Replaces PUT /campaign/admin/{id}/trigger/{triggerId}

Security
authJWT
Path
triggerIdstringrequired
campaignIdstringrequired
curl -i -X PUT \
  'https://docs.pers.ninja/_mock/swagger/campaign-triggers/{triggerId}/assign/{campaignId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Trigger assigned to campaign successfully

Bodyapplication/json
idstringrequired

Campaign id

namestring or nullrequired

Campaign name

descriptionstring or nullrequired

Campaign description

beneficiaryAccountAddressstring or nullrequired

Campaign beneficiary account address

startDatestring or null(date-time)required

Campaign start date, default is the current date

endDatestring or null(date-time)required

Campaign end date

imageUrlstring or nullrequired

img url

externalUrlstring or nullrequired

Campaign url

isActivebooleanrequired

Campaign isActive

Default false
isTestnetboolean

Campaign isTestnet, this means that the campaign is running on testnet, not mainnet

Default false
createdAtstring(date-time)required

create date

Default "2026-03-12T10:57:54.230Z"
updatedAtstring or null(date-time)required

update date

Default null
ordernumberrequired

Campaign order

Default 1
tagsArray of stringsrequired

Campaign tags

Default []
countryCodeRestrictionsobject

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

Example: ["NOT_ES","FR"]
triggerobject or nullrequired

Campaign trigger: what triggers the campaign, and what are the conditions for the trigger to be activated

trigger.​namestring

Campaign trigger name

trigger.​descriptionstring

Campaign trigger description

trigger.​maxPerDaynumber or null

DEPRECATED - use maxPerDayPerUser: Campaign trigger max per day

trigger.​maxPerDayPerUsernumber or null

Campaign trigger max per day per user

trigger.​maxPerUsernumber or null

Campaign trigger max per user

trigger.​minCooldownSecondsnumber or null

Campaign trigger min cooldown seconds

trigger.​maxGeoDistanceInMetersnumber or null

Campaign trigger max geo distance to Business in meters

trigger.​requiredUserInfostring or null

Campaign trigger required user info

trigger.​triggerTypestring

Campaign trigger type

Enum"CLAIM_BY_USER""CLAIM_BY_SYSTEM""CLAIM_BY_BUSINESS"
trigger.​maxMultipliernumber or null

Campaign trigger max multiplier

trigger.​completionThresholdnumber or null

Campaign trigger completion threshold. This indicates the number of completions required before the reward is granted

trigger.​maxTotalnumber or null

Campaign trigger max total completions across all users

trigger.​maxPerDayTotalnumber or null

Campaign trigger max total completions per day across all users

trigger.​maxPerSourcenumber or null

Maximum claims per trigger source for this campaign. Limits how many times each individual trigger source can be used.

trigger.​conditionsArray of objects(CampaignTriggerConditionDTO)

Campaign trigger conditions

trigger.​sourceLogicstring

Source logic type defining how multiple trigger sources combine to activate the flow

Default "any"
Value"any"
trigger.​idstringrequired

Campaign trigger id

tokenUnitsArray of objects(TokenUnitDTO)required
Array [
tokenUnits[][].​idstringrequired

Token unit id

tokenUnits[][].​tokenobjectrequired

TokenDTO object

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

]
businessEngagementsArray of objects(CampaignBusinessEngagementDTO)required
Array [
businessEngagements[][].​idstringrequired

id

businessEngagements[][].​shortDescriptionnumber or nullrequired

A short description of the business engagement with indications what to do etc

businessEngagements[][].​businessIdsArray of stringsrequired

Business IDs associated with this engagement. Use CampaignDTO.included.businesses for full entities.

businessEngagements[][].​campaignIdstringrequired

Campaign id

businessEngagements[][].​maxPerBusinessnumber or nullrequired

max per business, the maximum number of times a user can engage with the buisness in the campaign

businessEngagements[][].​maxPerDaynumber or nullrequired

max per day, the maximum number of times a user can engage with the buisness in the campaign per day

businessEngagements[][].​externalUrlstring or nullrequired

The external URL for the business engagement, e.g. a link to a website or app

businessEngagements[][].​businessesArray of arraysDeprecatedrequired

Businesses (DEPRECATED: use businessIds + CampaignDTO.included.businesses instead. Will be removed in Q2 2026)

Example: [{"id":"business-uuid-1"},{"id":"business-uuid-2"}]
]
triggerSourceIdsArray of arraysrequired

Trigger source IDs. Use to batch fetch or request via ?include=triggerSources

Example: ["trigger-uuid-1","trigger-uuid-2"]
includedobject or null

Included related entities. Only populated when include parameter is specified.

Response
application/json
{ "id": "string", "name": "string", "description": "string", "beneficiaryAccountAddress": "string", "startDate": "2019-08-24T14:15:22Z", "endDate": "2019-08-24T14:15:22Z", "imageUrl": "string", "externalUrl": "string", "isActive": false, "isTestnet": false, "createdAt": "2026-03-12T10:57:54.230Z", "updatedAt": null, "order": 1, "tags": [], "countryCodeRestrictions": [ "NOT_ES", "FR" ], "trigger": { "name": "string", "description": "string", "maxPerDay": 0, "maxPerDayPerUser": 0, "maxPerUser": 0, "minCooldownSeconds": 0, "maxGeoDistanceInMeters": 0, "requiredUserInfo": "string", "triggerType": "CLAIM_BY_USER", "maxMultiplier": 0, "completionThreshold": 0, "maxTotal": 0, "maxPerDayTotal": 0, "maxPerSource": 0, "conditions": [ … ], "sourceLogic": "any", "id": "string" }, "tokenUnits": [ [ … ] ], "businessEngagements": [ [ … ] ], "triggerSourceIds": [ "trigger-uuid-1", "trigger-uuid-2" ], "included": { "triggerSources": [ … ], "businesses": [ … ] } }

Remove trigger from campaign (Admin)

Request

Remove a trigger assignment from a specific campaign. Admin-only operation.

Security
authJWT
Path
triggerIdstringrequired
campaignIdstringrequired
curl -i -X DELETE \
  'https://docs.pers.ninja/_mock/swagger/campaign-triggers/{triggerId}/assign/{campaignId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Trigger removed from campaign successfully

Bodyapplication/json
idstringrequired

Campaign id

namestring or nullrequired

Campaign name

descriptionstring or nullrequired

Campaign description

beneficiaryAccountAddressstring or nullrequired

Campaign beneficiary account address

startDatestring or null(date-time)required

Campaign start date, default is the current date

endDatestring or null(date-time)required

Campaign end date

imageUrlstring or nullrequired

img url

externalUrlstring or nullrequired

Campaign url

isActivebooleanrequired

Campaign isActive

Default false
isTestnetboolean

Campaign isTestnet, this means that the campaign is running on testnet, not mainnet

Default false
createdAtstring(date-time)required

create date

Default "2026-03-12T10:57:54.230Z"
updatedAtstring or null(date-time)required

update date

Default null
ordernumberrequired

Campaign order

Default 1
tagsArray of stringsrequired

Campaign tags

Default []
countryCodeRestrictionsobject

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

Example: ["NOT_ES","FR"]
triggerobject or nullrequired

Campaign trigger: what triggers the campaign, and what are the conditions for the trigger to be activated

trigger.​namestring

Campaign trigger name

trigger.​descriptionstring

Campaign trigger description

trigger.​maxPerDaynumber or null

DEPRECATED - use maxPerDayPerUser: Campaign trigger max per day

trigger.​maxPerDayPerUsernumber or null

Campaign trigger max per day per user

trigger.​maxPerUsernumber or null

Campaign trigger max per user

trigger.​minCooldownSecondsnumber or null

Campaign trigger min cooldown seconds

trigger.​maxGeoDistanceInMetersnumber or null

Campaign trigger max geo distance to Business in meters

trigger.​requiredUserInfostring or null

Campaign trigger required user info

trigger.​triggerTypestring

Campaign trigger type

Enum"CLAIM_BY_USER""CLAIM_BY_SYSTEM""CLAIM_BY_BUSINESS"
trigger.​maxMultipliernumber or null

Campaign trigger max multiplier

trigger.​completionThresholdnumber or null

Campaign trigger completion threshold. This indicates the number of completions required before the reward is granted

trigger.​maxTotalnumber or null

Campaign trigger max total completions across all users

trigger.​maxPerDayTotalnumber or null

Campaign trigger max total completions per day across all users

trigger.​maxPerSourcenumber or null

Maximum claims per trigger source for this campaign. Limits how many times each individual trigger source can be used.

trigger.​conditionsArray of objects(CampaignTriggerConditionDTO)

Campaign trigger conditions

trigger.​sourceLogicstring

Source logic type defining how multiple trigger sources combine to activate the flow

Default "any"
Value"any"
trigger.​idstringrequired

Campaign trigger id

tokenUnitsArray of objects(TokenUnitDTO)required
Array [
tokenUnits[][].​idstringrequired

Token unit id

tokenUnits[][].​tokenobjectrequired

TokenDTO object

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

]
businessEngagementsArray of objects(CampaignBusinessEngagementDTO)required
Array [
businessEngagements[][].​idstringrequired

id

businessEngagements[][].​shortDescriptionnumber or nullrequired

A short description of the business engagement with indications what to do etc

businessEngagements[][].​businessIdsArray of stringsrequired

Business IDs associated with this engagement. Use CampaignDTO.included.businesses for full entities.

businessEngagements[][].​campaignIdstringrequired

Campaign id

businessEngagements[][].​maxPerBusinessnumber or nullrequired

max per business, the maximum number of times a user can engage with the buisness in the campaign

businessEngagements[][].​maxPerDaynumber or nullrequired

max per day, the maximum number of times a user can engage with the buisness in the campaign per day

businessEngagements[][].​externalUrlstring or nullrequired

The external URL for the business engagement, e.g. a link to a website or app

businessEngagements[][].​businessesArray of arraysDeprecatedrequired

Businesses (DEPRECATED: use businessIds + CampaignDTO.included.businesses instead. Will be removed in Q2 2026)

Example: [{"id":"business-uuid-1"},{"id":"business-uuid-2"}]
]
triggerSourceIdsArray of arraysrequired

Trigger source IDs. Use to batch fetch or request via ?include=triggerSources

Example: ["trigger-uuid-1","trigger-uuid-2"]
includedobject or null

Included related entities. Only populated when include parameter is specified.

Response
application/json
{ "id": "string", "name": "string", "description": "string", "beneficiaryAccountAddress": "string", "startDate": "2019-08-24T14:15:22Z", "endDate": "2019-08-24T14:15:22Z", "imageUrl": "string", "externalUrl": "string", "isActive": false, "isTestnet": false, "createdAt": "2026-03-12T10:57:54.230Z", "updatedAt": null, "order": 1, "tags": [], "countryCodeRestrictions": [ "NOT_ES", "FR" ], "trigger": { "name": "string", "description": "string", "maxPerDay": 0, "maxPerDayPerUser": 0, "maxPerUser": 0, "minCooldownSeconds": 0, "maxGeoDistanceInMeters": 0, "requiredUserInfo": "string", "triggerType": "CLAIM_BY_USER", "maxMultiplier": 0, "completionThreshold": 0, "maxTotal": 0, "maxPerDayTotal": 0, "maxPerSource": 0, "conditions": [ … ], "sourceLogic": "any", "id": "string" }, "tokenUnits": [ [ … ] ], "businessEngagements": [ [ … ] ], "triggerSourceIds": [ "trigger-uuid-1", "trigger-uuid-2" ], "included": { "triggerSources": [ … ], "businesses": [ … ] } }

Toggle condition in trigger (Admin)

Request

Add or remove a condition from a trigger (toggle relationship). Admin-only operation. Replaces PUT /campaign/admin/trigger/{triggerId}/condition/{conditionId}

Security
authJWT
Path
triggerIdstringrequired
Bodyapplication/jsonrequired
conditionTypestringrequired

Trigger condition type

Enum"EQUALS""NOT_EQUALS""GREATER_THAN""LESS_THAN""CONTAINS""IS_PART_OF"
valueobjectrequired

Trigger condition value

keystringrequired

Trigger condition key

curl -i -X PUT \
  'https://docs.pers.ninja/_mock/swagger/campaign-triggers/{triggerId}/conditions' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "conditionType": "EQUALS",
    "value": {},
    "key": "string"
  }'

Responses

Trigger condition relationship updated successfully

Bodyapplication/json
namestring

Campaign trigger name

descriptionstring

Campaign trigger description

maxPerDaynumber or null

DEPRECATED - use maxPerDayPerUser: Campaign trigger max per day

maxPerDayPerUsernumber or null

Campaign trigger max per day per user

maxPerUsernumber or null

Campaign trigger max per user

minCooldownSecondsnumber or null

Campaign trigger min cooldown seconds

maxGeoDistanceInMetersnumber or null

Campaign trigger max geo distance to Business in meters

requiredUserInfostring or null

Campaign trigger required user info

triggerTypestring

Campaign trigger type

Enum"CLAIM_BY_USER""CLAIM_BY_SYSTEM""CLAIM_BY_BUSINESS"
maxMultipliernumber or null

Campaign trigger max multiplier

completionThresholdnumber or null

Campaign trigger completion threshold. This indicates the number of completions required before the reward is granted

maxTotalnumber or null

Campaign trigger max total completions across all users

maxPerDayTotalnumber or null

Campaign trigger max total completions per day across all users

maxPerSourcenumber or null

Maximum claims per trigger source for this campaign. Limits how many times each individual trigger source can be used.

conditionsArray of objects(CampaignTriggerConditionDTO)

Campaign trigger conditions

sourceLogicstring

Source logic type defining how multiple trigger sources combine to activate the flow

Default "any"
Value"any"
idstringrequired

Campaign trigger id

Response
application/json
{ "name": "string", "description": "string", "maxPerDay": 0, "maxPerDayPerUser": 0, "maxPerUser": 0, "minCooldownSeconds": 0, "maxGeoDistanceInMeters": 0, "requiredUserInfo": "string", "triggerType": "CLAIM_BY_USER", "maxMultiplier": 0, "completionThreshold": 0, "maxTotal": 0, "maxPerDayTotal": 0, "maxPerSource": 0, "conditions": [ { … } ], "sourceLogic": "any", "id": "string" }
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations