Referral Endpoints
Description of endpoints used to get referral data
Please make sure you've read Data: API so you are familiar with the following types referenced in this documentation:
Get Referral Info For User
POST
/api/v0/get-referral-info-for-user
Gets all data about all referral codes for this owner, including users referred by this code.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Get Referral Info For User - Use GetReferralInfoForUser to fetch the current state of all referral links for a user upon login
Request Body
Name | Type | Description |
---|---|---|
PublicKeyBase58Check* | String | user public key |
JWT* | String | JSON web token authenticating user |
Get Referral Info For Referral Hash
POST
/api/v0/get-referral-info-for-referral-hash
Gets a summary of the current state of a single referral code. This is useful when a user arrives at your site with a referral code. It allows you to tell if the referral code is still valid and how much the user would receive if they signed up.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Get Referral Info For Referral Hash - Use GetReferralInfoForReferralHash to show a new user the amount of money they would receive as a sign-up bonus with this referral code
Request Body
Name | Type | Description |
---|---|---|
ReferralHash* | String | referral code |
Last updated