Рассчитать

Список всех доступных методов для взаимодействия с API.

GET

Получить корзину рассчитать -/cart/calculate

Способ запроса

GEThttp://apilocal.stableproxy.com/v2/cart/calculate

Параметры запроса

ИдентификаторПравилаПример
traffic-unitНе обязательноnullablestringin:gb"gb"
period-unitНе обязательноnullablestringin:weeks, weeks, months, years"weeks"
traffic-amountrequiredintegerin:25, 100, 400, 800, 5000"25"
period-amountrequiredintegerin"1"
countНе обязательноnullableinteger30
countriesНе обязательноnullablearray{"UA": 10, "PL": 20}
typerequiredstringin:shared, private, residential_gb, datacenter_gb, residential_city_gb, residential_static_gb, mobile_gb, mobile_static, mobile_static_gb"shared"
currencyНе обязательноnullablestringcurrency_code"USD"
has-unlimited-auth-ipsНе обязательноnullableex-booleanfalse
serviceНе обязательноnullablestringilluminate\_validation\_rules\_in75
ip-scoreНе обязательноnullablenumeric76

Примеры кода

1async function getCartCalculate() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/cart/calculate?' + Object.entries({
4         "traffic-unit": "gb",
5         "period-unit": "weeks",
6         "traffic-amount": "25",
7         "period-amount": "1",
8         "count": 30,
9         "countries[UA]": 10,
10         "countries[PL]": 20,
11         "type": "shared",
12         "currency": "USD",
13         "has-unlimited-auth-ips": false,
14         "service": 75,
15         "ip-score": 76
16      }).map(([key, value]) => key + "=" + value).join('&'), {
17         method: 'GET',
18         headers: {
19            'Content-Type': 'application/json'
20         }
21      }
22   );
23   
24   const res = await req.json();
25}

Примеры ответов