Zamówienie

Lista wszystkich publicznie dostępnych metod interakcji z API.

GET

Pobierz zamówienie -/package/order/{id}

Metoda zapytania

GEThttp://apilocal.stableproxy.com/v2/package/order/{id}

Parametry zapytania

IdentyfikatorRegulaminPrzykład
id1required79

Przykłady kodu

1async function getPackageOrder() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/package/order/{id}'
4      .replace("{id}", 79), {
5         method: 'GET',
6         headers: {
7            'Authorization': 'API-Token [YOUR TOKEN]',
8            'Content-Type': 'application/json'
9         }
10      }
11   );
12   
13   const res = await req.json();
14}

Przykłady odpowiedzi

PUT

Zamówienie -/package/order/{id}

Metoda zapytania

PUThttp://apilocal.stableproxy.com/v2/package/order/{id}

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}
additionalNie koniecznienullableex-booleanfalse
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\_in55
ip-scoreNie koniecznienullablenumeric41
id1required79

Przykłady kodu

1async function putPackageOrder() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/package/order/{id}'
4      .replace("{id}", 79), {
5         method: 'PUT',
6         headers: {
7            'Authorization': 'API-Token [YOUR TOKEN]',
8            'Content-Type': 'application/json'
9         },
10         body: JSON.stringify({
11            "traffic-unit": "gb",
12            "period-unit": "weeks",
13            "traffic-amount": "25",
14            "period-amount": "1",
15            "count": 30,
16            "countries": {"UA": 10, "PL": 20},
17            "additional": false,
18            "type": "shared",
19            "currency": "USD",
20            "has-unlimited-auth-ips": false,
21            "service": 55,
22            "ip-score": 41
23         }),
24      }
25   );
26   
27   const res = await req.json();
28}

Przykłady odpowiedzi

PUT

Zastąp ips -/package/order/{id}/ips

Metoda zapytania

PUThttp://apilocal.stableproxy.com/v2/package/order/{id}/ips

Parametry zapytania

IdentyfikatorRegulaminPrzykład
remove-idsNie koniecznienullablearray[]
add-countriesNie koniecznienullablearraycountries_count:0, 5000{"UA": 10, "PL": 20}
remove-ids.*requiredinteger0
id1required75

Przykłady kodu

1async function putPackageOrderIps() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/package/order/{id}/ips'
4      .replace("{id}", 75), {
5         method: 'PUT',
6         headers: {
7            'Authorization': 'API-Token [YOUR TOKEN]',
8            'Content-Type': 'application/json'
9         },
10         body: JSON.stringify({
11            "remove-ids": [],
12            "add-countries": {"UA": 10, "PL": 20},
13            "remove-ids.*": 0
14         }),
15      }
16   );
17   
18   const res = await req.json();
19}

Przykłady odpowiedzi

PUT

Pakiet -/package/order/{id}/renew

Metoda zapytania

PUThttp://apilocal.stableproxy.com/v2/package/order/{id}/renew

Parametry zapytania

IdentyfikatorRegulaminPrzykład
id1required90

Przykłady kodu

1async function putPackageOrderRenew() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/package/order/{id}/renew'
4      .replace("{id}", 90), {
5         method: 'PUT',
6         headers: {
7            'Authorization': 'API-Token [YOUR TOKEN]',
8            'Content-Type': 'application/json'
9         }
10      }
11   );
12   
13   const res = await req.json();
14}

Przykłady odpowiedzi

PUT

Dodaj/ustaw ruch -/package/order/{id}/traffic

Metoda zapytania

PUThttp://apilocal.stableproxy.com/v2/package/order/{id}/traffic

Parametry zapytania

IdentyfikatorRegulaminPrzykład
traffic-unitNie koniecznienullablestringin:gb"gb"
traffic-amountrequiredintegerin:25, 100, 400, 800, 5000"25"
is-permanentrequiredex-booleanfalse
id1required56

Przykłady kodu

1async function putPackageOrderTraffic() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/package/order/{id}/traffic'
4      .replace("{id}", 56), {
5         method: 'PUT',
6         headers: {
7            'Authorization': 'API-Token [YOUR TOKEN]',
8            'Content-Type': 'application/json'
9         },
10         body: JSON.stringify({
11            "traffic-unit": "gb",
12            "traffic-amount": "25",
13            "is-permanent": false
14         }),
15      }
16   );
17   
18   const res = await req.json();
19}

Przykłady odpowiedzi