import SnagSolutions from '@snagsolutions/sdk';
const client = new SnagSolutions({
apiKey: 'My API Key',
});
const users = await client.referral.users.list({ walletAddress: 'string' });
console.log(users.data);
{
"data": [
{
"referralCode": {
"referralCode": "<string>",
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"userId": "<string>",
"tier1Amount": 123,
"tier2Amount": 123,
"amount": 123
},
"user": {
"id": "<string>",
"walletAddress": "<string>"
},
"id": "<string>"
}
],
"hasNextPage": true
}
This endpoint allows you to get referrals
import SnagSolutions from '@snagsolutions/sdk';
const client = new SnagSolutions({
apiKey: 'My API Key',
});
const users = await client.referral.users.list({ walletAddress: 'string' });
console.log(users.data);
{
"data": [
{
"referralCode": {
"referralCode": "<string>",
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"userId": "<string>",
"tier1Amount": 123,
"tier2Amount": 123,
"amount": 123
},
"user": {
"id": "<string>",
"walletAddress": "<string>"
},
"id": "<string>"
}
],
"hasNextPage": true
}
1 <= x <= 1000
200
The response is of type object
.
Was this page helpful?