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
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
Success response
PUT
Change order Order Package -/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, mobile_rotating_gb, 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
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
Success response
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
| 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
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
Success response
PUT
Renew Order Package -/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
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
Success response
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
| 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
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();
}