Last updated 10 months ago
This endpoint retrieves CustomReward associated with the given entity.
Successful response
true
const response = await fetch('https://api.questprotocol.xyz/api/entities/{entityId}/users/{userId}/custom-reward', { method: 'GET', headers: { "apikey": "test", "userid": "dummy-userid", "token": "dummy-token" }, }); const data = await response.json();
{ "success": true, "data": { "userId": "text", "rewardId": "text", "entityId": "text", "createdAt": "2024-11-21T07:09:48.047Z" } }
Add a custom reward to a user in a specific entity.
const response = await fetch('https://api.questprotocol.xyz/api/entities/{entityId}/users/{userId}/{rewardId}', { method: 'POST', headers: { "apikey": "test", "userid": "dummy-userid", "token": "dummy-token" }, }); const data = await response.json();