Referral Code API
Retrieve the unique referral code for the authenticated user to share with others
Referral Code API
Get the unique referral code for the authenticated user. Share this code to earn rewards when referred users sign up and subscribe.
Unique Code
Personal referral code.
Earn Rewards
Get bonuses for referrals.
Grow Network
Invite friends and family.
Endpoint Overview
/graphqlRetrieve the unique referral code assigned to the authenticated user. This code can be shared with others to earn referral rewards.
GraphQL Query
query getReferralCode {
getReferralCode {
code
usageCount
totalRewards
createdAt
}
}HTTP Request:
curl -X POST https://api.orbnet.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"query": "query getReferralCode { getReferralCode { code usageCount totalRewards } }"
}'Response
{
"data": {
"getReferralCode": {
"code": "REF-ABC123XYZ",
"usageCount": 5,
"totalRewards": 25.00,
"createdAt": "2024-01-01T00:00:00Z"
}
}
}{
"errors": [
{
"message": "Authentication required",
"path": ["getReferralCode"],
"extensions": {
"code": "UNAUTHORIZED"
}
}
],
"data": null
}Response Fields
codeString!The unique referral code assigned to this user.
usageCountIntNumber of times this referral code has been used.
totalRewardsFloatTotal rewards earned from successful referrals.
createdAtDateTimeWhen the referral code was generated.
Referral Program Benefits
Earn Credits
Get account credits for each referral.
Friend Discounts
Referred users get signup bonuses.
No Limits
Unlimited referral potential.
Track Progress
Monitor your referral success.
How It Works
Get Your Code
Share with Friends
They Sign Up
Earn Rewards
Related Endpoints
Referral Rewards
Referral rewards are typically credited to your account after the referred user completes their first subscription payment. Reward amounts may vary based on active promotions.
Apply a Coupon Code
Have a referral or promo code? Apply it to your account for discounts.