Referral Code API

Retrieve the unique referral code for the authenticated user to share with others

Promotions

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

QUERY/graphql

Retrieve the unique referral code assigned to the authenticated user. This code can be shared with others to earn referral rewards.

Authentication:Bearer Token
Required scopes:user

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

200Referral Code Retrieved Successfully
{
  "data": {
    "getReferralCode": {
      "code": "REF-ABC123XYZ",
      "usageCount": 5,
      "totalRewards": 25.00,
      "createdAt": "2024-01-01T00:00:00Z"
    }
  }
}
401Unauthorized
{
  "errors": [
    {
      "message": "Authentication required",
      "path": ["getReferralCode"],
      "extensions": {
        "code": "UNAUTHORIZED"
      }
    }
  ],
  "data": null
}

Response Fields

codeString!

The unique referral code assigned to this user.

usageCountInt

Number of times this referral code has been used.

totalRewardsFloat

Total rewards earned from successful referrals.

createdAtDateTime

When 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



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.

Use Coupon Code