import SnagSolutions from '@snagsolutions/sdk';
const client = new SnagSolutions({
apiKey: process.env['X_API_KEY'], // This is the default and can be omitted
});
const users = await client.referral.users.list();
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>",
"eligible": true
}
],
"hasNextPage": true
}This endpoint allows you to get referrals
import SnagSolutions from '@snagsolutions/sdk';
const client = new SnagSolutions({
apiKey: process.env['X_API_KEY'], // This is the default and can be omitted
});
const users = await client.referral.users.list();
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>",
"eligible": true
}
],
"hasNextPage": true
}1 <= x <= 1000200
Show child attributes
Show child attributes
This will only return data for earnings after 2025-04-24
This will only return data for earnings after 2025-04-24
This will only return data for earnings after 2025-04-24
Was this page helpful?