Youproxy

Extend by orderID

Endpoint:

POST/client/api/v1/{apiKey}/calculate/extend/order

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: IPv4, IPv6, MOBILE, ISP.

orderIds*

array

Order IDs to extend. Get them from Get IP addresses — the orderId field. Every IP in each listed order will be extended.

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

success

boolean

true on success, false if error is populated.

proxyType

string | null

Echoes the requested type. null on error.

balance

number

Account balance in currency.

price

number | null

Calculated extension cost. null on error.

currency

string

ISO currency code (e.g. USD).

discount

number | null

Discount percentage applied (e.g. 10 = 10%). 0 if no promo code.

promoCodeStatus

string | null

VALID, NO_VALID, or null if no promoCode sent.

warnings

array | null

Non-blocking issues. If present, extension won't go through with current data.

error

object | null

{ code, message } on failure. See Possible errors for codes.

The HTTP status is 200 OK for both success and error responses — check success: false to detect failures, not the HTTP code.

On this page