Skip to content

Update campaign trigger (Admin / Business)

Request

Update an existing campaign trigger. Businesses may only update trigger rules they own. Replaces PUT /campaign/admin/trigger/{id}

Security
authJWT
Path
triggerIdstringrequired
Bodyapplication/jsonrequired
namenumber

Campaign trigger name

descriptionstring

Campaign trigger description

termsstring or null

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

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

WHO can initiate a claim for this campaign.

Values:

  • CLAIM_BY_USER: End users initiate claims (scan QR, tap NFC, enter geofence)
  • CLAIM_BY_BUSINESS: Business claims on behalf of users (POS, kiosk, staff-assisted)
  • CLAIM_BY_SYSTEM: Server/webhook automated claims (webhooks, scheduled jobs)

Important: This defines WHO can claim. NOT to be confused with TriggerSource.type which defines HOW to claim (QR_CODE, NFC_TAG, GPS_GEOFENCE, etc.).

App Logic:

  • If CLAIM_BY_USER: App shows claim UI based on triggerSources[].type
  • If CLAIM_BY_BUSINESS: Requires business auth + userIdentifier in request
  • If CLAIM_BY_SYSTEM: Server-to-server only, requires tenant API key
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": 0,
    "description": "string",
    "terms": "string",
    "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
namenumber

Campaign trigger name

descriptionstring

Campaign trigger description

termsstring or null

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

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

WHO can initiate a claim for this campaign.

Values:

  • CLAIM_BY_USER: End users initiate claims (scan QR, tap NFC, enter geofence)
  • CLAIM_BY_BUSINESS: Business claims on behalf of users (POS, kiosk, staff-assisted)
  • CLAIM_BY_SYSTEM: Server/webhook automated claims (webhooks, scheduled jobs)

Important: This defines WHO can claim. NOT to be confused with TriggerSource.type which defines HOW to claim (QR_CODE, NFC_TAG, GPS_GEOFENCE, etc.).

App Logic:

  • If CLAIM_BY_USER: App shows claim UI based on triggerSources[].type
  • If CLAIM_BY_BUSINESS: Requires business auth + userIdentifier in request
  • If CLAIM_BY_SYSTEM: Server-to-server only, requires tenant API key
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
{ "name": 0, "description": "string", "terms": "string", "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" }