v1

latestOpenAPI 3.0.12026-07-24210349345.4 KB
Missions

Calculated-Reward Missions for a Player

Returns active calculated-reward objectives the player is eligible for based on target-group membership. Calculated-reward missions issue a dynamic reward amount per qualifying event using a formula (ebfrFormula) rather than counting completions toward a fixed goal.

These objectives are excluded from the regular Player missions endpoint and have no mission progress record (rewards are issued per qualifying event, not accumulated toward a goal). Use this endpoint to display available calculated-reward missions in the widget.

Only objectives with status = "active" are returned. Target-group filtering happens server-side.

get/missions/brand/{brandId}/player/{playerId}/calculated-rewards

Path parameters

brandIdstring uuid required
Example:aebb6a6a-bdef-480f-8096-e13f9c3d4969

Brand UUID returned by GET /brands/default/{tenantId}.

playerIdstring required
Example:player-123

Your internal player/customer identifier.

Response

Array of calculated-reward objectives.

idstring uuid

UUID of the objective. Use as objectiveId in unlock/claim calls.

namestring

Title shown to the player.

descriptionstring nullable

Optional longer description.

type'task' | 'mission'

task (standalone) or mission (part of a mission group).

goalinteger

Target value the player must reach (e.g. 5 purchases).

iconstring nullable

URL to the mission icon. Validate it is an https URL from a trusted host before using in src/href.

status'active' | 'draft' | 'archived' | 'deleted'

Lifecycle of the objective definition. Only render active.

isRepeatableboolean

Whether the mission can be completed more than once.

repeatLimitinteger nullable

Maximum number of times the mission can be repeated. null = unlimited.

cooldownPeriodSecondsinteger nullable

Seconds the player must wait between repeats. null = no cooldown.

unlockCurrencyIdstring uuid nullable

UUID of the currency required to unlock. null if no unlock cost.

unlockAmountinteger nullable

Amount of that currency required to unlock. null if no unlock cost.

operatorstring

Comparison operator applied to the triggering event value (e.g. greaterThanInclusive). Used together with goal to determine whether the event qualifies for the calculated reward.

ebfrFormulastring

Formula evaluated against the triggering event to compute the reward amount (e.g. event.amount * 2). Always present and non-empty on this endpoint.

targetGroupIdsstring[] nullable

Target group UUIDs that gate access to this objective. null means no target-group restriction. The server filters this list to only return objectives the player is eligible for, so widget code does not need to re-check.

Example response

[
  {
    "operator": "greaterThanInclusive",
    "ebfrFormula": "event.amount * 2"
  }
]