Extend by IPs
Endpoint:
Returns the price before extending specific IP addresses. Always call this before the actual Extend by IP addresses request to surface validation issues without spending balance. To calculate price for extending whole orders instead, use Extend by orders ID.
Name | Type | Description |
|---|---|---|
apiKey* | String | Your personal API key. |
Request body
Name | Type | Description |
|---|---|---|
proxyType* | String | One of: |
ipAddressIds* | array | IP address IDs to extend. Get them from Get IP addresses. |
rentPeriodDays* | number | Extension duration in days. Get valid values from Rent period. |
promoCode* | String | Discount promo code. Get valid values from Promo codes. |
Note for IPv6: all IPs from the same order must be extended together — partial extension is not allowed. Pass every ipAddressIds from the order in one request.
Example
curl -X POST https://youproxy.io/client/api/v1/$KEY/calculate/extend \
-H "Content-Type: application/json" \
-d '{
"proxyType": "IPv4",
"ipAddressIds": ["1111111111111111", "2222222222222222"],
"rentPeriodDays": 30,
"promoCode": "SAVE10"
}'For IPv6, MOBILE, or ISP — change proxyType and use the corresponding IDs from Get IP addresses. Body shape is otherwise identical.
Response
Same shape for all proxy types — proxyType field echoes the requested value. Switch tabs to see each scenario.
{
"success": true,
"proxyType": "IPv4",
"balance": 7.18,
"price": 2.65,
"currency": "USD",
"discount": 0,
"promoCodeStatus": null,
"error": null,
"warnings": null
}{
"success": true,
"proxyType": "IPv4",
"balance": 7.18,
"price": 8.30,
"currency": "USD",
"discount": 0,
"promoCodeStatus": null,
"error": null,
"warnings": [
{
"code": 16,
"message": "Insufficient funds on balance"
}
]
}{
"success": true,
"proxyType": "IPv4",
"balance": 7.18,
"price": 2.65,
"currency": "USD",
"discount": 0,
"promoCodeStatus": "VALID",
"error": null,
"warnings": null
}{
"success": true,
"proxyType": "IPv4",
"balance": 7.18,
"price": 2.65,
"currency": "USD",
"discount": 0,
"promoCodeStatus": "NO_VALID",
"error": null,
"warnings": null
}{
"success": false,
"proxyType": null,
"balance": 0.65,
"price": null,
"currency": "USD",
"discount": null,
"promoCodeStatus": null,
"error": {
"code": 24,
"message": "Incorrect ip addresses"
},
"warnings": null
}Response fields
Field | Type | Description |
|---|---|---|
| boolean |
|
| string | null | Echoes the requested type. |
| number | Account balance in |
| number | null | Calculated extension cost. |
| string | ISO currency code (e.g. |
| number | null | Discount percentage applied (e.g. |
| string | null |
|
| array | null | Non-blocking issues. If present, extension won't go through with current data. |
| object | null |
|
The HTTP status is 200 OK for both success and error responses — check success: false to detect failures, not the HTTP code.