Skip to main content

API Specifications

Common Base URL (Host)

  • Preview (Test): https://app-api-reward.unifi.me
  • Production (Live): https://api-reward.unifi.me

Check User Mapping Status

Checks if a specific user is currently connected to a Unifi account.

GET /v1/mission-users

SectionNameTypeReqDescription
HeaderX-Partner-IdStringYIssued Partner ID
HeaderX-Api-KeyStringYIssued API Key
QuerypartnerUidStringYUnique user ID inside your service
ResponseresultBooleanYMapping Status (true: connected, false: unconnected)

Auth URL for Unifi Login (Auth)

A frontend-only API that redirects the user to the Unifi login screen and triggers the issuance of a one-time mapping token. (Since it is a direct browser navigation, it does not include header authentication keys).

GET /v1/mission-users/auth

SectionNameTypeReqDescription
QuerypartnerIdStringYYour issued Partner ID
QueryredirectUrlStringYService Mini App URL to return to after login (*URL Encoding Required)
QuerybrowserTypeStringNSpecify connection environment (MINI: LINE MINI, LIFF: LINE LIFF, WEB: other. Acts as WEB if empty)
Response302 Found--Immediately redirects browser to the constructed LINE LIFF login URL

Register User Mapping (Connect)

Finalizes the connection between the Unifi account and your service account using the one-time mapping token.

POST /v1/mission-users/connect

SectionNameTypeReqDescription
HeaderX-Partner-IdStringYIssued Partner ID
HeaderX-Api-KeyStringYIssued API Key
Body (JSON)tokenStringYOne-time mapping token received via URL parameter
Body (JSON)partnerUidStringYUnique user ID inside your service
Body (JSON)regionStringYUser's Country Code (e.g., KR, JP, TW, etc.)
Response200 OK--Empty body, mapping success

Achieve Mission

Upserts the user's mission progress and final completion status to the Unifi server in real-time. (Security & IP Restriction: Can only be called from your service server's Outbound IP (Whitelist) agreed upon in advance).

When this API is called, Unifi looks up the mission using the missionKey sent in the request, verifies that the completion is valid, and then pays out the reward.

POST /v1/achieve

SectionNameTypeReqDescription
HeaderX-Partner-IdStringYIssued Partner ID
HeaderX-Api-KeyStringYIssued API Key
Body (JSON)partnerUidStringYUnique user ID inside your service
Body (JSON)missionKeyStringYMission Key delivered by Unifi
Body (JSON)completedBooleanYMission completion status (cannot be reversed once true is saved)
Body (JSON)metadata.targetIntNMax target value of the mission (for progress gauge UI)
Body (JSON)metadata.currentIntNCurrent progress value of the mission
Response200 OK--Empty body, saved successfully

Data Transmission Example (JSON Payload)

{
  "partnerUid": "user_77799",
  "missionKey": "SAMPLE_MISSION_KEY_001",
  "completed": false,
  "metadata": {
    "target": 30,
    "current": 5
  }
}

Error Codes

CodeNameCategory
901ADMIN_PERMISSION_DENIEDAdmin
1101NOT_FOUND_MISSION_GROUPMissionGroup
1201NOT_FOUND_MISSIONMission
1401NOT_FOUND_REWARD_ASSETRewardAsset
1402NOT_SET_REWARD_ASSET_DECIMALSRewardAsset
1902NOT_FOUND_REWARD_BUDGETBudget
2101NOT_FOUND_PROMOTIONPromotion
2102IMMUTABLE_PROMOTION_FIELDPromotion

Enum Definitions

Enum NameValuesDescription
PromotionTypeCOMPOSITE, DAILY_CHECKPromotion Type
PromotionStatusACTIVE, INACTIVEPromotion Active/Inactive Status
RecurrenceTypeONE_TIME, DAILY, WEEKLY, MONTHLYRecurrence Cycle
RewardTypeFIXED, LUCKY_DRAWFixed Reward / Lucky Draw
BudgetTypeFIXED, LUCKY_DRAWBudget Type
AssetTypeFTAsset Type
ClaimStatusRESERVED, REQUESTED, REJECTED, SUCCEEDED, FAILEDReward Claim Status
TicketFilterNOT_RECEIVED, RECEIVED, DRAWNTicket Filter