Youproxy

Calculate an order

Updated:

Returns the order price before checkout, including discount, balance check, and warnings. Always call this before Create an order to surface validation issues without spending balance.

Endpoint:

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

Path parameters

Name

Type

Description

apiKey*

String

Your personal API key.

Request body

Name

Type

Description

proxyType*

string

Which proxy type to calculate for.

IPv4 IPv6 MOBILE ISP

quantity*

number

Number of IP addresses to order.

rentPeriodDays*

number

Rental duration in days. Get valid values from Rent period.

country*

string

ISO 3166-1 alpha-3 code (e.g. USA). Get valid values from Country.

goal*

string

Custom goal label for the order.

promoCode

string

Discount promo code. Get valid values from Promo codes.

Additional fields when proxyType=MOBILE

Name

Type

Description

rotationTime*

number

Rotation interval in seconds. Get valid values from Mobile operator.

mobileOperator*

string

Operator tag. Get valid values from Mobile operator.

Examples

curl -X POST https://youproxy.io/client/api/v1/$KEY/calculate/order \
  -H "Content-Type: application/json" \
  -d '{
    "proxyType": "IPv4",
    "quantity": 5,
    "rentPeriodDays": 30,
    "country": "USA",
    "goal": "scraping",
    "promoCode": "SAVE10"
  }'
curl -X POST https://youproxy.io/client/api/v1/$KEY/calculate/order \
  -H "Content-Type: application/json" \
  -d '{
    "proxyType": "IPv6",
    "quantity": 5,
    "rentPeriodDays": 30,
    "country": "USA",
    "goal": "scraping",
    "promoCode": "SAVE10"
  }'
# MOBILE — note the extra fields
curl -X POST https://youproxy.io/client/api/v1/$KEY/calculate/order \
  -H "Content-Type: application/json" \
  -d '{
    "proxyType": "MOBILE",
    "quantity": 5,
    "rentPeriodDays": 30,
    "country": "USA",
    "goal": "scraping",
    "rotationTime": 300,
    "mobileOperator": "verizon"
  }'
curl -X POST https://youproxy.io/client/api/v1/$KEY/calculate/order \
  -H "Content-Type: application/json" \
  -d '{
    "proxyType": "ISP",
    "quantity": 5,
    "rentPeriodDays": 30,
    "country": "USA",
    "goal": "scraping",
    "promoCode": "SAVE10"
  }'

Response

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 total. null on error.

currency

string

ISO currency code (e.g. USD).

discount

number | null

Discount percentage applied (e.g. 10 means 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, the order won't go through with current data — fix and retry.

error

object | null

{ code, message } on failure, null on success.

On this page