Claim Onchain Mission (External)
Claim On-Chain Mission via user_reference
This guide explains how to claim on-chain missions using a wallet address provided by your own platform's wallet connection flow, instead of relying on the platform's internal wallet linking system.
Use Case
Platforms that manage their wallet connection (e.g., using WalletConnect, MetaMask, or embedded wallet systems) can pass the wallet address directly using the user_reference parameter during mission claim.
Authentication
This flow uses API key–based authentication, typically via a header like:
x-api-key: YOUR_API_KEY
API Endpoint:
POST https://loyalty-api-sandbox.mojito.xyz/{tenant}/user/mission-claim
Path Params:
Name | Type | Description | Required |
---|---|---|---|
tenant | string | Tenant slug (e.g., sample-loyalty) | Yes |
Request Body
{
"mission_id": "<MISSION_ID>",
"user_reference": "user_<user-reference>"
}
Name | Type | Required | Description | Required |
---|---|---|---|---|
mission_id | uuid | yes | Unique ID of the mission to be claimed | Yes |
user_reference | string | no | Unique user reference (e.g., user_<user-reference> or wallet address) | No |
Response (Success)
{
"mission_id": "67a7faa3-804e-4266-be8c-fd67a4c83b31",
"claim_id": "057fbed8-10b5-4573-a8b0-e1f16c272bdc",
"status": "INITIATED",
"points_earned": 400,
"tx_hash": null,
"status_message": null
}
Response (Failure)
{
"code": 409,
"message": "This wallet has already claimed this mission. Please use another wallet to proceed"
}
Updated 4 days ago