---
updatedAt: 2026-06-10T09:22:30.000Z
agentTools:
  projectIndex: https://developer.optimove.com/llms.txt
---

# 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](/reference/getplayermissions) 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.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Optimove Loyalty System API",
    "version": "1.0.0",
    "description": "Public API for building custom Loyalty widget frontends on top of Optimove's Loyalty System.\n\nUse these endpoints to fetch brand configuration, player progress, missions, rewards, badges, and leaderboards, and to drive player actions like claiming mission rewards and enrolling in tournaments.\n\n> 📘 Authentication\n>\n> Authentication is not yet enforced on widget endpoints. No token is required at this time. Token-based auth will be added in a future release. When it ships, request headers and the widget initialization flow will change, and this reference will be updated.\n\n> 🚧 CORS\n>\n> Requests from certain origins are permitted by default. If your widget runs on a domain outside that set, contact the Optimove team to have it added before starting development.",
    "contact": {
      "name": "Optimove Support",
      "url": "https://www.optimove.com/support"
    }
  },
  "servers": [
    {
      "url": "https://opti-ls-api-us.optimove.net/api",
      "description": "Production (US)"
    },
    {
      "url": "https://opti-ls-api-eu.optimove.net/api",
      "description": "Production (EU)"
    }
  ],
  "tags": [
    {
      "name": "Missions",
      "description": "Active and completed missions for the player, plus unlock and claim actions."
    }
  ],
  "paths": {
    "/missions/brand/{brandId}/player/{playerId}/calculated-rewards": {
      "get": {
        "tags": [
          "Missions"
        ],
        "operationId": "getPlayerCalculatedRewards",
        "summary": "Calculated-Reward Missions for a Player",
        "description": "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.\n\nThese objectives are excluded from the regular [Player missions](/reference/getplayermissions) 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.\n\nOnly objectives with `status = \"active\"` are returned. Target-group filtering happens server-side.",
        "parameters": [
          {
            "$ref": "#/components/parameters/BrandId"
          },
          {
            "$ref": "#/components/parameters/PlayerId"
          }
        ],
        "responses": {
          "200": {
            "description": "Array of calculated-reward objectives.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CalculatedRewardObjective"
                  }
                },
                "example": [
                  {
                    "id": "obj-99999999-9999-9999-9999-999999999999",
                    "name": "Bet bonus",
                    "description": "Earn coins per dollar wagered",
                    "type": "task",
                    "goal": 100,
                    "operator": "greaterThanInclusive",
                    "icon": "https://cdn.example.com/missions/bet.png",
                    "status": "active",
                    "ebfrFormula": "event.amount * 2",
                    "isRepeatable": true,
                    "repeatLimit": null,
                    "cooldownPeriodSeconds": null,
                    "unlockCurrencyId": null,
                    "unlockAmount": null,
                    "targetGroupIds": null
                  }
                ]
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "BrandId": {
        "name": "brandId",
        "in": "path",
        "required": true,
        "description": "Brand UUID returned by `GET /brands/default/{tenantId}`.",
        "schema": {
          "type": "string",
          "format": "uuid",
          "example": "aebb6a6a-bdef-480f-8096-e13f9c3d4969"
        }
      },
      "PlayerId": {
        "name": "playerId",
        "in": "path",
        "required": true,
        "description": "Your internal player/customer identifier.",
        "schema": {
          "type": "string",
          "example": "player-123"
        }
      }
    },
    "responses": {
      "NotFound": {
        "description": "Resource not found (brand, player, mission, leaderboard, etc.).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "statusCode": 404,
              "message": "Not found",
              "error": "Not Found"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "description": "Standard NestJS error response.",
        "properties": {
          "statusCode": {
            "type": "integer",
            "example": 404
          },
          "message": {
            "type": "string",
            "example": "Not found"
          },
          "error": {
            "type": "string",
            "example": "Not Found"
          }
        }
      },
      "Objective": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the objective. Use as `objectiveId` in unlock/claim calls."
          },
          "name": {
            "type": "string",
            "description": "Title shown to the player."
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Optional longer description."
          },
          "type": {
            "type": "string",
            "enum": [
              "task",
              "mission"
            ],
            "description": "`task` (standalone) or `mission` (part of a mission group)."
          },
          "goal": {
            "type": "integer",
            "description": "Target value the player must reach (e.g. 5 purchases)."
          },
          "icon": {
            "type": "string",
            "nullable": true,
            "description": "URL to the mission icon. Validate it is an `https` URL from a trusted host before using in `src`/`href`."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "draft",
              "archived",
              "deleted"
            ],
            "description": "Lifecycle of the objective definition. Only render `active`."
          },
          "isRepeatable": {
            "type": "boolean",
            "description": "Whether the mission can be completed more than once."
          },
          "repeatLimit": {
            "type": "integer",
            "nullable": true,
            "description": "Maximum number of times the mission can be repeated. `null` = unlimited."
          },
          "cooldownPeriodSeconds": {
            "type": "integer",
            "nullable": true,
            "description": "Seconds the player must wait between repeats. `null` = no cooldown."
          },
          "unlockCurrencyId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "UUID of the currency required to unlock. `null` if no unlock cost."
          },
          "unlockAmount": {
            "type": "integer",
            "nullable": true,
            "description": "Amount of that currency required to unlock. `null` if no unlock cost."
          }
        }
      },
      "CalculatedRewardObjective": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Objective"
          },
          {
            "type": "object",
            "properties": {
              "operator": {
                "type": "string",
                "description": "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.",
                "example": "greaterThanInclusive"
              },
              "ebfrFormula": {
                "type": "string",
                "description": "Formula evaluated against the triggering event to compute the reward amount (e.g. `event.amount * 2`). Always present and non-empty on this endpoint.",
                "example": "event.amount * 2"
              },
              "targetGroupIds": {
                "type": "array",
                "items": {
                  "type": "integer"
                },
                "nullable": true,
                "description": "Target group IDs 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."
              }
            }
          }
        ]
      }
    }
  }
}
```