Create renewal order
This endpoint allows you to create a renewal order, which extends the service period of your proxies using the same parameters you used to calculate its cost.
Be careful when creating a renewal order, as it will deduct funds from your balance. Before proceeding, it's wise to first calculate the cost using the same parameters through the calculate renewal endpoint. This step ensures you're fully informed about the expense before confirming your renewal.
Headers
Name | Value |
|---|---|
Content-Type |
|
Accept |
|
Path parameters
Name | Type | Description |
|---|---|---|
| string | API key to authorize requests |
| string | Available values : ipv4, ipv6, mobile, isp, resident |
Body parameters
Name | Type | Description |
|---|---|---|
| array of integers | IDs of the proxies you want to renew. Ensure that the proxy type of the provided IDs matches the "type" path parameter. |
| string | How long you want to renew your proxies for, as identified in the reference list (e.g., "30d" for 30 days). |
Request examples
curl -X 'POST' \
'https://geonix.com/personal/api/v1/YOUR_API_KEY_HERE/prolong/make/mobile' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"ids": [
105487,
458746,
354841,
845123,
103547
],
"periodId": "30d",
"coupon": "OZGCNK_1"
}'<?php
$apiKey = "YOUR_API_KEY_HERE";
$url = "https://geonix.com/personal/api/v1/$apiKey/prolong/make/mobile";
$data = array(
"ids" => [105487, 458746, 354841, 845123, 103547],
"periodId" => "30d",
"coupon" => "OZGCNK_1"
);
$data_string = json_encode($data);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Accept: application/json',
'Content-Type: application/json'
));
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ProlongMakeExample {
public static void main(String[] args) {
String apiKey = "YOUR_API_KEY_HERE";
String url = "https://geonix.com/personal/api/v1/" + apiKey + "/prolong/make/mobile";
String data = "{\"ids\": [105487, 458746, 354841, 845123, 103547], \"periodId\": \"30d\", \"coupon\": \"OZGCNK_1\"}";
try {
URL obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
wr.writeBytes(data);
wr.flush();
wr.close();
int responseCode = con.getResponseCode();
System.out.println("Response Code: " + responseCode);
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println("Response Body: " + response.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}
Response examples
{
"status": "success",
"data": {
"orderId": 1000000,
"total": 35.1,
"balance": 10.19
},
"errors": []
}{
"status": "error",
"data": null,
"errors": [
{
"message": "Insufficient funds. Total $2. Not enough $33.10",
"code": 0,
"customData": null
}
]
}