> For the complete documentation index, see [llms.txt](https://docs.enable3.io/enable3/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enable3.io/enable3/tech/integration/public-api-for-data-access.md).

# Public API for data access

## POST /api/v2/integration/user/{userId}/rewards/redeem

> Reward from widget balance

```json
{"openapi":"3.0.3","info":{"title":"Integration API","version":"1"},"servers":[{"url":"https://integration.enable3.io","description":"Generated server url"}],"paths":{"/api/v2/integration/user/{userId}/rewards/redeem":{"post":{"tags":["integration-controller"],"description":"Reward from widget balance","operationId":"requestReward","parameters":[{"name":"operatorId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"userId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RewardRequestDto"}}},"required":true},"responses":{"204":{"description":"No Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimRewardResponseDto"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}}}}}},"components":{"schemas":{"RewardRequestDto":{"type":"object","properties":{"rewardId":{"type":"string"},"type":{"type":"string","enum":["EVENT","MODERATION","PROMO"]}}},"ClaimRewardResponseDto":{"type":"object","properties":{"reply":{"type":"string"}}},"CustomMessage":{"type":"object","properties":{"message":{"type":"string"},"property":{"type":"string"}}}}}}
```

## POST /api/v2/integration/user/{userId}/missions/{missionId}/claim

> Claim accumulated reward points for given mission

```json
{"openapi":"3.0.3","info":{"title":"Integration API","version":"1"},"servers":[{"url":"https://integration.enable3.io","description":"Generated server url"}],"paths":{"/api/v2/integration/user/{userId}/missions/{missionId}/claim":{"post":{"tags":["integration-controller"],"description":"Claim accumulated reward points for given mission","operationId":"claimMissionRewards","parameters":[{"name":"missionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"operatorId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}}}}}},"components":{"schemas":{"CustomMessage":{"type":"object","properties":{"message":{"type":"string"},"property":{"type":"string"}}}}}}
```

## Get player rewards for a custom rewards shop

> Get shop-ready rewards available to the requested player. Existing operator, active status, segment, tier, and reward-limit eligibility rules are applied.

```json
{"openapi":"3.0.3","info":{"title":"Integration API","version":"1"},"servers":[{"url":"https://integration.enable3.io","description":"Generated server url"}],"paths":{"/api/v2/integration/user/{userId}/rewards":{"get":{"tags":["integration-controller"],"description":"Get shop-ready rewards available to the requested player. Existing operator, active status, segment, tier, and reward-limit eligibility rules are applied.","operationId":"getAvailableRewards","parameters":[{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0,"minimum":0}},{"name":"lang","in":"query","required":true,"description":"Language used for localized reward name and description.","schema":{"type":"string"}},{"name":"operatorId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"userId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Paginated shop-ready rewards available to the requested player.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultsWrapperDtoShopRewardDto"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}}},"summary":"Get player rewards for a custom rewards shop"}}},"components":{"schemas":{"ResultsWrapperDtoShopRewardDto":{"type":"object","required":["results","total","hasNext"],"properties":{"results":{"type":"array","description":"Shop-ready rewards for the requested page.","items":{"$ref":"#/components/schemas/ShopRewardDto"}},"total":{"type":"integer","format":"int64","description":"Total number of eligible rewards before pagination."},"hasNext":{"type":"boolean","description":"Indicates whether more eligible rewards exist after this page."}}},"ShopRewardDto":{"type":"object","description":"Reward data ready for rendering in a custom rewards shop UI.","required":["id","name","description","cardImageUrl","pageImageUrl","tokenCost","tokenRewardAmount","amount","purchaseProductId","availableForUser","remainingPerUser"],"properties":{"id":{"type":"string","format":"uuid","description":"Reward identifier."},"name":{"type":"string","description":"Localized reward name resolved using the lang query parameter."},"description":{"type":"string","description":"Localized reward description resolved using the lang query parameter."},"cardImageUrl":{"type":"string","description":"Reward card image URL mapped from images.mini."},"pageImageUrl":{"type":"string","description":"Reward detail page image URL mapped from images.original."},"tokenCost":{"type":"number","minimum":0,"description":"Configured reward cost or current redeem amount."},"tokenRewardAmount":{"type":"number","minimum":0,"description":"Token reward amount mapped from operatorRewardAmount."},"amount":{"type":"number","description":"Configured reward amount. No additional currency handling is applied."},"purchaseProductId":{"type":"string","description":"Configured purchase product identifier."},"availableForUser":{"type":"boolean","description":"Indicates whether the reward is currently available to the requested player."},"remainingPerUser":{"description":"Remaining per-user redemption count, calculated as availablePerUser minus perUserUsed. Null when the reward is unlimited.","type":"number","minimum":0,"nullable":true}}},"CustomMessage":{"type":"object","properties":{"message":{"type":"string"},"property":{"type":"string"}}}}}}
```

## GET /api/v2/integration/user/{userId}/missions

> Get all active missions by user

```json
{"openapi":"3.0.3","info":{"title":"Integration API","version":"1"},"servers":[{"url":"https://integration.enable3.io","description":"Generated server url"}],"paths":{"/api/v2/integration/user/{userId}/missions":{"get":{"tags":["integration-controller"],"description":"Get all active missions by user","operationId":"getActiveMissions","parameters":[{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0,"minimum":0}},{"name":"lang","in":"query","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"operatorId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultsWrapperDtoUserMissionDto"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}}}}}},"components":{"schemas":{"ResultsWrapperDtoUserMissionDto":{"type":"object","properties":{"results":{"type":"array","description":"results for the requested page","items":{"$ref":"#/components/schemas/UserMissionDto"}},"total":{"type":"integer","format":"int64","description":"total number of results (non paginated)"},"hasNext":{"type":"boolean","description":"indicates if there are any results left beyond the current page"}}},"UserMissionDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"rewardAmount":{"type":"number"},"pendingRewardsAmountToClaim":{"type":"number"},"canClaim":{"type":"boolean"},"currentProgress":{"type":"number","description":"presents only for mission type IN_APP_EVENT"},"targetProgress":{"type":"number","description":"presents only for mission type IN_APP_EVENT"},"dueDate":{"type":"string","format":"string","pattern":"yyyy-MM-dd HH:mm"},"progressPercent":{"type":"number","description":"presents only for mission type IN_APP_EVENT, QUEST"}}},"CustomMessage":{"type":"object","properties":{"message":{"type":"string"},"property":{"type":"string"}}}}}}
```

## GET /api/v2/integration/user/{userId}/balance

> Get user's current balance

```json
{"openapi":"3.0.3","info":{"title":"Integration API","version":"1"},"servers":[{"url":"https://integration.enable3.io","description":"Generated server url"}],"paths":{"/api/v2/integration/user/{userId}/balance":{"get":{"tags":["integration-controller"],"description":"Get user's current balance","operationId":"getUserBalance","parameters":[{"name":"operatorId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"userId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserBalanceDto"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomMessage"}}}}}}}},"components":{"schemas":{"UserBalanceDto":{"type":"object","properties":{"amount":{"type":"number"}}},"CustomMessage":{"type":"object","properties":{"message":{"type":"string"},"property":{"type":"string"}}}}}}
```
