Uzyskaj informacje o zamówieniu / cenach według pakietu.

Lista wszystkich publicznie dostępnych metod interakcji z API.

GET

Zamów pakiet -/package/order/{id}

Metoda zapytania

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

Parametry zapytania

IdentyfikatorRegulaminPrzykład
id1required79

Przykłady kodu

async function getPackageOrder() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/package/order/{id}'
      .replace("{id}", 79), {
         method: 'GET',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Przykłady odpowiedzi

PUT

Zmiana zamówienia Pakiet zamówień -/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, mobile_rotating_gb, 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

async function putPackageOrder() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/package/order/{id}'
      .replace("{id}", 79), {
         method: 'PUT',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         },
         body: JSON.stringify({
            "traffic-unit": "gb",
            "period-unit": "weeks",
            "traffic-amount": "25",
            "period-amount": "1",
            "count": 30,
            "countries": {"UA": 10, "PL": 20},
            "additional": false,
            "type": "shared",
            "currency": "USD",
            "has-unlimited-auth-ips": false,
            "service": 55,
            "ip-score": 41
         }),
      }
   );
   
   const res = await req.json();
}

Przykłady odpowiedzi

PUT

Zamów pakiet -/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

async function putPackageOrderIps() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/package/order/{id}/ips'
      .replace("{id}", 75), {
         method: 'PUT',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         },
         body: JSON.stringify({
            "remove-ids": [],
            "add-countries": {"UA": 10, "PL": 20},
            "remove-ids.*": 0
         }),
      }
   );
   
   const res = await req.json();
}

Przykłady odpowiedzi

PUT

Odnów pakiet zamówień -/package/order/{id}/renew

Metoda zapytania

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

Parametry zapytania

IdentyfikatorRegulaminPrzykład
id1required90

Przykłady kodu

async function putPackageOrderRenew() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/package/order/{id}/renew'
      .replace("{id}", 90), {
         method: 'PUT',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Przykłady odpowiedzi

PUT

Zamów pakiet -/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

async function putPackageOrderTraffic() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/package/order/{id}/traffic'
      .replace("{id}", 56), {
         method: 'PUT',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         },
         body: JSON.stringify({
            "traffic-unit": "gb",
            "traffic-amount": "25",
            "is-permanent": false
         }),
      }
   );
   
   const res = await req.json();
}

Przykłady odpowiedzi