Order

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

GET

Get order -/package/order/{id}

Query method

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

Query parameters

IdentifierRegulationsExample
id1required79

Code examples

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();
}

Examples of answers

PUT

Change order Order Package -/package/order/{id}

Query method

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

Query parameters

IdentifierRegulationsExample
traffic-unitNot necessarilynullablestringin:gb"gb"
period-unitNot necessarilynullablestringin:weeks, weeks, months, years"weeks"
traffic-amountrequiredintegerin:25, 100, 400, 800, 5000"25"
period-amountrequiredintegerin"1"
countNot necessarilynullableinteger30
countriesNot necessarilynullablearray{"UA": 10, "PL": 20}
additionalNot necessarilynullableex-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"
currencyNot necessarilynullablestringcurrency_code"USD"
has-unlimited-auth-ipsNot necessarilynullableex-booleanfalse
serviceNot necessarilynullablestringilluminate\_validation\_rules\_in55
ip-scoreNot necessarilynullablenumeric41
id1required79

Code examples

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();
}

Examples of answers

PUT

Replace ips ### How to? Replace ips in package, if you want to add new ips, you need to add them to the `add_countries` array, if you want to remove ips, you need to add them to the `remove_ids` array. You need __money__ to replace ips, if you have __free replacements__ you can use them. -/package/order/{id}/ips

Query method

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

Query parameters

IdentifierRegulationsExample
remove-idsNot necessarilynullablearray[]
add-countriesNot necessarilynullablearraycountries_count:0, 5000{"UA": 10, "PL": 20}
remove-ids.*requiredinteger0
id1required75

Code examples

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();
}

Examples of answers

PUT

Renew Order Package -/package/order/{id}/renew

Query method

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

Query parameters

IdentifierRegulationsExample
id1required90

Code examples

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();
}

Examples of answers

PUT

Add/Set traffic Change or add traffic to order. You need __money__ to change traffic. -/package/order/{id}/traffic

Query method

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

Query parameters

IdentifierRegulationsExample
traffic-unitNot necessarilynullablestringin:gb"gb"
traffic-amountrequiredintegerin:25, 100, 400, 800, 5000"25"
is-permanentrequiredex-booleanfalse
id1required56

Code examples

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();
}

Examples of answers