Zamówienie

Lista wszystkich publicznie dostępnych metod interakcji z API.

POST

Zamówienie koszyka -/cart/order

Metoda zapytania

POSThttp://apilocal.stableproxy.com/v2/cart/order

Parametry zapytania

IdentyfikatorRegulaminPrzykład
traffic-unitNie koniecznienullablestringin:gb"gb"
period-unitNie koniecznienullablestringin:weeks, weeks, months, years"weeks"
traffic-amountrequiredintegerin:25, 100, 400, 800, 5000"25"
period-amountrequiredintegerin"1"
countNie koniecznienullableinteger30
countriesNie koniecznienullablearray{"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"
currencyNie koniecznienullablestringcurrency_code"USD"
has-unlimited-auth-ipsNie koniecznienullableex-booleanfalse
serviceNie koniecznienullablestringilluminate\_validation\_rules\_in97
ip-scoreNie koniecznienullablenumeric29

Przykłady kodu

1async function postCartOrder() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/cart/order', {
4         method: 'POST',
5         headers: {
6            'Content-Type': 'application/json'
7         },
8         body: JSON.stringify({
9            "traffic-unit": "gb",
10            "period-unit": "weeks",
11            "traffic-amount": "25",
12            "period-amount": "1",
13            "count": 30,
14            "countries": {"UA": 10, "PL": 20},
15            "type": "shared",
16            "currency": "USD",
17            "has-unlimited-auth-ips": false,
18            "service": 97,
19            "ip-score": 29
20         }),
21      }
22   );
23   
24   const res = await req.json();
25}

Przykłady odpowiedzi