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
Identifier | Regulations | Example |
---|---|---|
id | 1required | 79 |
Code examples
JavaScript
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}
Examples of answers
Success response
PUT
Change order -/package/order/{id}
Query method
PUThttp://apilocal.stableproxy.com/v2/package/order/{id}
Query parameters
Identifier | Regulations | Example |
---|---|---|
traffic-unitNot necessarily | nullablestringin:gb | "gb" |
period-unitNot necessarily | nullablestringin:weeks, weeks, months, years | "weeks" |
traffic-amount | requiredintegerin:25, 100, 400, 800, 5000 | "25" |
period-amount | requiredintegerin | "1" |
countNot necessarily | nullableinteger | 30 |
countriesNot necessarily | nullablearray | {"UA": 10, "PL": 20} |
additionalNot necessarily | nullableex-boolean | false |
type | requiredstringin:shared, private, residential_gb, datacenter_gb, residential_city_gb, residential_static_gb, mobile_gb, mobile_static, mobile_static_gb | "shared" |
currencyNot necessarily | nullablestringcurrency_code | "USD" |
has-unlimited-auth-ipsNot necessarily | nullableex-boolean | false |
serviceNot necessarily | nullablestringilluminate\_validation\_rules\_in | 55 |
ip-scoreNot necessarily | nullablenumeric | 41 |
id | 1required | 79 |
Code examples
JavaScript
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}
Examples of answers
Success response
PUT
Replace ips -/package/order/{id}/ips
Query method
PUThttp://apilocal.stableproxy.com/v2/package/order/{id}/ips
Query parameters
Identifier | Regulations | Example |
---|---|---|
remove-idsNot necessarily | nullablearray | [] |
add-countriesNot necessarily | nullablearraycountries_count:0, 5000 | {"UA": 10, "PL": 20} |
remove-ids.* | requiredinteger | 0 |
id | 1required | 75 |
Code examples
JavaScript
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}
Examples of answers
Success response
PUT
Renew -/package/order/{id}/renew
Query method
PUThttp://apilocal.stableproxy.com/v2/package/order/{id}/renew
Query parameters
Identifier | Regulations | Example |
---|---|---|
id | 1required | 90 |
Code examples
JavaScript
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}
Examples of answers
Success response
PUT
Add/Set traffic -/package/order/{id}/traffic
Query method
PUThttp://apilocal.stableproxy.com/v2/package/order/{id}/traffic
Query parameters
Identifier | Regulations | Example |
---|---|---|
traffic-unitNot necessarily | nullablestringin:gb | "gb" |
traffic-amount | requiredintegerin:25, 100, 400, 800, 5000 | "25" |
is-permanent | requiredex-boolean | false |
id | 1required | 56 |
Code examples
JavaScript
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}