Last updated 3 months ago
This endpoint retrieves CustomReward associated with the given entity.
Successful response
const response = await fetch('https://api.questprotocol.xyz/api/entities/{entityId}/users/{userId}/custom-reward', { method: 'GET', headers: {}, }); const data = await response.json();
{ "success": true, "data": { "userId": "text", "rewardId": "text", "entityId": "text", "createdAt": "2024-04-30T19:23:30.893Z" } }
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: {}, }); const data = await response.json();