Referrals

Referral system and earnings

Get referral statistics

get
/referrals/stats

Retrieve user's referral statistics and settings

Authorizations
AuthorizationstringRequired

JWT token obtained from login or register endpoint

Responses
200

Referral stats retrieved successfully

application/json
get
/referrals/stats
GET /api/v3/referrals/stats HTTP/1.1
Host: localhost:8009
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Referral stats retrieved successfully

{
  "success": true,
  "data": {
    "referral_code": "text",
    "referral_link": "text",
    "stats": {
      "total_referrals": 1,
      "pending_referrals": 1,
      "completed_referrals": 1,
      "flagged_referrals": 1,
      "total_earned": 1,
      "total_redeemed": 1,
      "total_withdrawn": 1,
      "available_balance": 1
    },
    "settings": {}
  }
}

Get referral earnings

get
/referrals/earnings

Retrieve list of referrals and earnings

Authorizations
AuthorizationstringRequired

JWT token obtained from login or register endpoint

Query parameters
pageintegerOptionalDefault: 1
limitintegerOptionalDefault: 20
Responses
200

Referral earnings retrieved successfully

No content

get
/referrals/earnings
GET /api/v3/referrals/earnings HTTP/1.1
Host: localhost:8009
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Referral earnings retrieved successfully

No content

Redeem referral balance

post
/referrals/redeem

Redeem referral balance to main balance

Authorizations
AuthorizationstringRequired

JWT token obtained from login or register endpoint

Body
amountnumberRequiredExample: 50
Responses
200

Referral balance redeemed successfully

No content

post
/referrals/redeem
POST /api/v3/referrals/redeem HTTP/1.1
Host: localhost:8009
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 13

{
  "amount": 50
}
200

Referral balance redeemed successfully

No content

Request withdrawal

post
/referrals/withdraw

Request withdrawal of referral balance

Authorizations
AuthorizationstringRequired

JWT token obtained from login or register endpoint

Body
amountnumberRequiredExample: 500
payment_methodstringRequiredExample: bkash
payment_detailsstringRequiredExample: 01712345678
Responses
post
/referrals/withdraw
POST /api/v3/referrals/withdraw HTTP/1.1
Host: localhost:8009
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "amount": 500,
  "payment_method": "bkash",
  "payment_details": "01712345678"
}
201

Withdrawal request submitted successfully

No content

Get referral transaction history

get
/referrals/transactions

Retrieve referral transaction history

Authorizations
AuthorizationstringRequired

JWT token obtained from login or register endpoint

Query parameters
pageintegerOptionalDefault: 1
limitintegerOptionalDefault: 20
Responses
200

Transaction history retrieved successfully

No content

get
/referrals/transactions
GET /api/v3/referrals/transactions HTTP/1.1
Host: localhost:8009
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Transaction history retrieved successfully

No content

Last updated