Proxy Sale
  • Introduction
  • Getting Started
  • API Reference
    • Balance
      • Get Balance
      • Add Balance
      • Pay Methods
    • Proxies
      • List Proxies
      • Download Proxies
      • Set Proxy Comments
    • Order
      • Reference List
      • Calculate Order
      • Create Order
    • Renewal
      • Calculate Renewal
      • Create Renewal Order
    • Residential Proxies
      • Package Info
      • Download Geo
      • Get IP Lists
      • Create IP List
      • Rename IP List
      • Delete IP List
      • API-TOOL
  • Users Links
    • FAQ
    • Blog
  • Support
    • support@proxy-sale.com
    • Telegram
Powered by GitBook
On this page
  1. API Reference
  2. Renewal

Create Renewal Order

PreviousCalculate RenewalNextResidential Proxies

Last updated 1 year ago

POST https://proxy-sale.com/personal/api/v1/{apiKey}/prolong/make/{type}

This endpoint allows you to create a renewal order, which extends the service period of your proxies using the same parameters you used to .

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 endpoint. This step ensures you're fully informed about the expense before confirming your renewal.

Headers

Name
Value

Content-Type

application/json

Accept

application/json

Path parameters

Name
Type
Description

apiKey*

string

API key to authorize requests

type*

string

Available values : ipv4, ipv6, mobile, isp, resident

Body parameters

Name
Type
Description

ids*

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.

periodId*

string

Request examples

curl -X 'POST' \
  'https://proxy-sale.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://proxy-sale.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://proxy-sale.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
    }
  ]
}

How long you want to renew your proxies for, as identified in the (e.g., "30d" for 30 days).

calculate its cost
calculate renewal
reference list