Referral

A list of all publicly available methods for interacting with the API.

GET

List referral tokens Referral -/user/referral

Query method

GEThttp://apilocal.stableproxy.com/v2/user/referral

Query parameters

IdentifierRegulationsExample
searchNot necessarilynullablestring6
per-pageNot necessarilynullableinteger5
pageNot necessarilynullableinteger60
sort-byNot necessarilynullablestringapp\_validators\_ex_in_rule""
sort-orderNot necessarilynullablestringin:asc, desc"asc"

Code examples

async function getUserReferral() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/referral?' + Object.entries({
         "search": 6,
         "per-page": 5,
         "page": 60,
         "sort-by": "",
         "sort-order": "asc"
      }).map(([key, value]) => key + "=" + value).join('&'), {
         method: 'GET',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Examples of answers

POST

Create referral token Referral -/user/referral

Query method

POSThttp://apilocal.stableproxy.com/v2/user/referral

Query parameters

IdentifierRegulationsExample
nameNot necessarilynullablestring33
tokenNot necessarilynullablestring9

Code examples

async function postUserReferral() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/referral', {
         method: 'POST',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         },
         body: JSON.stringify({
            "name": 33,
            "token": 9
         }),
      }
   );
   
   const res = await req.json();
}

Examples of answers

DELETE

Delete referral token Referral -/user/referral/{id}

Query method

DELETEhttp://apilocal.stableproxy.com/v2/user/referral/{id}

Query parameters

IdentifierRegulationsExample
id1required39

Code examples

async function deleteUserReferral() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/referral/{id}'
      .replace("{id}", 39), {
         method: 'DELETE',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Examples of answers

PUT

Update referral token Referral -/user/referral/{id}

Query method

PUThttp://apilocal.stableproxy.com/v2/user/referral/{id}

Query parameters

IdentifierRegulationsExample
nameNot necessarilynullablestring39
tokenNot necessarilynullablestring12
id1required39

Code examples

async function putUserReferral() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/referral/{id}'
      .replace("{id}", 39), {
         method: 'PUT',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         },
         body: JSON.stringify({
            "name": 39,
            "token": 12
         }),
      }
   );
   
   const res = await req.json();
}

Examples of answers

GET

View referral token Referral -/user/referral/{id}

Query method

GEThttp://apilocal.stableproxy.com/v2/user/referral/{id}

Query parameters

IdentifierRegulationsExample
id1required39

Code examples

async function getUserReferral() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/referral/{id}'
      .replace("{id}", 39), {
         method: 'GET',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Examples of answers

GET

List registered users Referral -/user/referral/{id}/referrals

Query method

GEThttp://apilocal.stableproxy.com/v2/user/referral/{id}/referrals

Query parameters

IdentifierRegulationsExample
per-pageNot necessarilynullableinteger15
pageNot necessarilynullableinteger93
sort-byNot necessarilynullablestringapp\_validators\_ex_in_rule""
sort-orderNot necessarilynullablestringin:asc, desc"asc"
id1required3

Code examples

async function getUserReferralReferrals() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/referral/{id}/referrals'
      .replace("{id}", 3) + '?' + Object.entries({
         "per-page": 15,
         "page": 93,
         "sort-by": "",
         "sort-order": "asc"
      }).map(([key, value]) => key + "=" + value).join('&'), {
         method: 'GET',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Examples of answers

GET

List received transactions Referral -/user/referral/{id}/transactions

Query method

GEThttp://apilocal.stableproxy.com/v2/user/referral/{id}/transactions

Query parameters

IdentifierRegulationsExample
per-pageNot necessarilynullableinteger9
pageNot necessarilynullableinteger47
sort-byNot necessarilynullablestringapp\_validators\_ex_in_rule""
sort-orderNot necessarilynullablestringin:asc, desc"asc"
id1required25

Code examples

async function getUserReferralTransactions() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/referral/{id}/transactions'
      .replace("{id}", 25) + '?' + Object.entries({
         "per-page": 9,
         "page": 47,
         "sort-by": "",
         "sort-order": "asc"
      }).map(([key, value]) => key + "=" + value).join('&'), {
         method: 'GET',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Examples of answers

GET

List visits by token Referral -/user/referral/{id}/visits

Query method

GEThttp://apilocal.stableproxy.com/v2/user/referral/{id}/visits

Query parameters

IdentifierRegulationsExample
per-pageNot necessarilynullableinteger22
pageNot necessarilynullableinteger58
sort-byNot necessarilynullablestringapp\_validators\_ex_in_rule""
sort-orderNot necessarilynullablestringin:asc, desc"asc"
id1required60

Code examples

async function getUserReferralVisits() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/referral/{id}/visits'
      .replace("{id}", 60) + '?' + Object.entries({
         "per-page": 22,
         "page": 58,
         "sort-by": "",
         "sort-order": "asc"
      }).map(([key, value]) => key + "=" + value).join('&'), {
         method: 'GET',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Examples of answers

GET

Get user referred by Referral -/user/referred-by

Query method

GEThttp://apilocal.stableproxy.com/v2/user/referred-by

Code examples

async function getUserReferredBy() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/referred-by', {
         method: 'GET',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Examples of answers

GET

Summary statistics Referral -/user/referral-summary

Query method

GEThttp://apilocal.stableproxy.com/v2/user/referral-summary

Code examples

async function getUserReferralSummary() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/referral-summary', {
         method: 'GET',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Examples of answers