Referral

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

GET

Referral summary

New/referral/summary
Replaces older v2 methods

This API v3 method replaces these API v2 methods (they still work):

Referral summary

Totals of the referral programme: visits, sign-ups, earnings and what is ready to withdraw.

This method requires authorization!
You can use your own API key, which can be obtained at control panel.
This method - requires permissions -referral.read
When creating an API token in your control panel, you can choose certain permissions (for example: prevent the token from placing orders).
You can also find a list of permissions in our documentation.

Query method

GEThttps://api.stableproxy.com/v3/referral/summary

Code examples

1const baseUrl = "https://api.stableproxy.com/v3";
2const response = await fetch(baseUrl + "/referral/summary", {
3 method: "GET",
4 headers: {
5 "Authorization": "Bearer [YOUR TOKEN]",
6 "Content-Type": "application/json"
7 }
8});
9const data = await response.json();
GET

List referral links

New/referral/links

Referral links

The user's referral links with their codes and counters.

This method requires authorization!
You can use your own API key, which can be obtained at control panel.
This method - requires permissions -referral.read
When creating an API token in your control panel, you can choose certain permissions (for example: prevent the token from placing orders).
You can also find a list of permissions in our documentation.

Query method

GEThttps://api.stableproxy.com/v3/referral/links

Query parameters

IdentifierRegulationsExample
searchNot necessarilynullablestring26
per-pageNot necessarilynullableinteger23
pageNot necessarilynullableinteger73
sort-byNot necessarilynullablestringapp\_validators\_ex_in_rule""
sort-orderNot necessarilynullablestringin:asc, desc"asc"

Code examples

1const baseUrl = "https://api.stableproxy.com/v3";
2const response = await fetch(baseUrl + "/referral/links", {
3 method: "GET",
4 headers: {
5 "Authorization": "Bearer [YOUR TOKEN]",
6 "Content-Type": "application/json"
7 }
8});
9const data = await response.json();
POST

Create a referral link

New/referral/links

Create a referral link

Adds a referral link. name labels it; token (4–12 characters) picks the code, otherwise one is generated.

This method requires authorization!
You can use your own API key, which can be obtained at control panel.
This method - requires permissions -referral.create
When creating an API token in your control panel, you can choose certain permissions (for example: prevent the token from placing orders).
You can also find a list of permissions in our documentation.

Query method

POSThttps://api.stableproxy.com/v3/referral/links

Query parameters

IdentifierRegulationsExample
nameNot necessarilynullablestring24
tokenNot necessarilynullablestring8

Code examples

1const baseUrl = "https://api.stableproxy.com/v3";
2const response = await fetch(baseUrl + "/referral/links", {
3 method: "POST",
4 headers: {
5 "Authorization": "Bearer [YOUR TOKEN]",
6 "Content-Type": "application/json"
7 },
8 body: JSON.stringify({
9 "name": 24,
10 "token": 8
11 })
12});
13const data = await response.json();
PUT

Rename a referral link

New/referral/links/{id}

Change a referral link

Changes the name or the code of a referral link.

This method requires authorization!
You can use your own API key, which can be obtained at control panel.
This method - requires permissions -referral.update
When creating an API token in your control panel, you can choose certain permissions (for example: prevent the token from placing orders).
You can also find a list of permissions in our documentation.

Query method

PUThttps://api.stableproxy.com/v3/referral/links/{id}

Query parameters

IdentifierRegulationsExample
nameNot necessarilynullablestring45
tokenNot necessarilynullablestring4
id1requiredinteger1

Code examples

1const baseUrl = "https://api.stableproxy.com/v3";
2const response = await fetch(baseUrl + "/referral/links/{id}", {
3 method: "PUT",
4 headers: {
5 "Authorization": "Bearer [YOUR TOKEN]",
6 "Content-Type": "application/json"
7 },
8 body: JSON.stringify({
9 "name": 45,
10 "token": 4
11 })
12});
13const data = await response.json();
DELETE

Delete a referral link

New/referral/links/{id}

Delete a referral link

Removes a referral link; people who already signed up through it stay referred.

Notes

  • Ask the user before calling it.
This method requires authorization!
You can use your own API key, which can be obtained at control panel.
This method - requires permissions -referral.delete
When creating an API token in your control panel, you can choose certain permissions (for example: prevent the token from placing orders).
You can also find a list of permissions in our documentation.

Query method

DELETEhttps://api.stableproxy.com/v3/referral/links/{id}

Query parameters

IdentifierRegulationsExample
id1requiredinteger1

Code examples

1const baseUrl = "https://api.stableproxy.com/v3";
2const response = await fetch(baseUrl + "/referral/links/{id}", {
3 method: "DELETE",
4 headers: {
5 "Authorization": "Bearer [YOUR TOKEN]",
6 "Content-Type": "application/json"
7 }
8});
9const data = await response.json();
GET

List people who joined by a link

New/referral/links/{id}/referrals

Referred users

Users who signed up through one referral link, paginated.

This method requires authorization!
You can use your own API key, which can be obtained at control panel.
This method - requires permissions -referral.read
When creating an API token in your control panel, you can choose certain permissions (for example: prevent the token from placing orders).
You can also find a list of permissions in our documentation.

Query method

GEThttps://api.stableproxy.com/v3/referral/links/{id}/referrals

Query parameters

IdentifierRegulationsExample
per-pageNot necessarilynullableinteger2
pageNot necessarilynullableinteger70
sort-byNot necessarilynullablestringapp\_validators\_ex_in_rule""
sort-orderNot necessarilynullablestringin:asc, desc"asc"
id1requiredinteger1

Code examples

1const baseUrl = "https://api.stableproxy.com/v3";
2const response = await fetch(baseUrl + "/referral/links/{id}/referrals", {
3 method: "GET",
4 headers: {
5 "Authorization": "Bearer [YOUR TOKEN]",
6 "Content-Type": "application/json"
7 }
8});
9const data = await response.json();
GET

List earnings of a referral link

New/referral/links/{id}/earnings

Referral earnings

Rewards earned through one referral link, paginated.

This method requires authorization!
You can use your own API key, which can be obtained at control panel.
This method - requires permissions -referral.read
When creating an API token in your control panel, you can choose certain permissions (for example: prevent the token from placing orders).
You can also find a list of permissions in our documentation.

Query method

GEThttps://api.stableproxy.com/v3/referral/links/{id}/earnings

Query parameters

IdentifierRegulationsExample
per-pageNot necessarilynullableinteger39
pageNot necessarilynullableinteger46
sort-byNot necessarilynullablestringapp\_validators\_ex_in_rule""
sort-orderNot necessarilynullablestringin:asc, desc"asc"
id1requiredinteger1

Code examples

1const baseUrl = "https://api.stableproxy.com/v3";
2const response = await fetch(baseUrl + "/referral/links/{id}/earnings", {
3 method: "GET",
4 headers: {
5 "Authorization": "Bearer [YOUR TOKEN]",
6 "Content-Type": "application/json"
7 }
8});
9const data = await response.json();