Extend by orderID
Endpoint:
Returns the price before extending whole orders — every IP in the specified orders gets extended. Always call this before the actual Extend by order IDs request to surface validation issues without spending balance. To calculate price for extending specific IPs instead, use Extend by IPs.
Request body
Name | Type | Description |
|---|---|---|
proxyType* | String | One of: |
orderIds* | array | Order IDs to extend. Get them from Get IP addresses — the |
rentPeriodDays* | number | Extension duration in days. Get valid values from Rent period. |
promoCode | string | Discount promo code. Get valid values from Promo codes. |
Example
curl -X POST https://youproxy.io/client/api/v1/$KEY/calculate/extend \
-H "Content-Type: application/json" \
-d '{
"proxyType": "IPv4",
"orderIds": ["1112223334283d122", "45654645634283d122"],
"rentPeriodDays": 30,
"promoCode": "SAVE10"
}'For IPv6, MOBILE, or ISP — change proxyType and use the corresponding order 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": 25,
"message": "Incorrect order IDs"
},
"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.