Promo

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

GET

List active promo codes

New/promo/active

Active promo codes

Promo codes the user has activated and that still apply.

This method requires authorization!
You can use your own API key, which can be obtained at control panel.
This method - requires permissions -promo.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/promo/active

Code examples

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

List promo codes you can activate

New/promo/available
Replaces older v2 methods

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

Available promo codes

Public promo codes the user can still activate.

This method requires authorization!
You can use your own API key, which can be obtained at control panel.
This method - requires permissions -promo.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/promo/available

Code examples

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

Activate a promo code

New/promo/activate

Activate a promo code

Applies a promo code to the account. A code that does not exist, expired or was used answers 422.

This method requires authorization!
You can use your own API key, which can be obtained at control panel.
This method - requires permissions -promo.activate
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/promo/activate

Query parameters

IdentifierRegulationsExample
codestringrequiredapp\_rules\_promocode_validation_rule190

Code examples

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

List top-up rewards

New/promo/topup-rewards

Top-up rewards

Bonuses the user earned by topping up, and whether each one is taken.

This method requires authorization!
You can use your own API key, which can be obtained at control panel.
This method - requires permissions -promo.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/promo/topup-rewards

Code examples

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

Claim a top-up reward

New/promo/topup-rewards/{id}

Claim a top-up reward

Takes one earned top-up bonus onto the account.

This method requires authorization!
You can use your own API key, which can be obtained at control panel.
This method - requires permissions -promo.activate
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/promo/topup-rewards/{id}

Query parameters

IdentifierRegulationsExample
id1requiredinteger1

Code examples

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