Skip to content

Subtract data from a sub-user order

POST
/users/{id}/data/subtract
curl --request POST \
--url https://api.proxyrequest.com/api/v1/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/data/subtract \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "package_id": "550e8400-e29b-41d4-a716-446655440002", "data": 1073741824 }'

Subtracts the requested number of bytes from the selected sub-user’s order for the supplied package and returns the updated order.

id
required
string format: uuid

A UUID string identifying this user.

object
package_id
required
string format: uuid
data
required
integer
>= 1
Examples
ExampleSubtractDataRequest

Subtract data request

{
"package_id": "550e8400-e29b-41d4-a716-446655440002",
"data": 1073741824
}

The request was accepted and the updated resource is returned.

Media typeapplication/json
object
id
string
<= 36 characters
is_auto_renewal
required
boolean
auto_renewal_percentage
Auto Renewal Threshold (%)

When this percentage of the data allowance has been consumed, the order is automatically renewed if the user has sufficient balance. Set to 0 to disable auto-renewal. 80 → renew when 80% of data is used

integer
<= 70
auto_renewal_data
Auto Renewal Data (GB)

Amount of data in GB to add when auto-renewal is triggered. Set to 0 to use the package default.

integer
<= 10000
package
required
object
key
additional properties
proxy_password

Password used by the customer to authenticate proxy connections. Auto-generated by default — change only if a custom value is needed. Must be between 4 and 64 characters.

string
<= 64 characters
proxy_password_reset
Password Last Changed

Timestamp of the last proxy password change. Read-only — updated automatically whenever the password is rotated.

string format: date-time
nullable
pools

Private proxy pools assigned to this order. Pools restrict which proxy IPs are available to this customer. Leave blank to use the full provider pool.

Array<string>
data
Data Allowance (bytes)

Total data allowance for this order in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB

integer format: int64
<= 1000000000000000
data_remaining
required
integer
data_spent
Data Spent (bytes)

Total bytes consumed from this order’s data allowance so far. Updated in real time as the customer uses the proxy.

integer format: int64
>= -9223372036854776000 <= 9223372036854776000
ledgers
required
Array<object>
object
key
additional properties
latest_data_top_up
Latest Top-up (bytes)

Amount of data added to this order in bytes during the most recent top-up.

integer format: int64
>= -9223372036854776000 <= 9223372036854776000
latest_data_top_up_date
Latest Top-up Date

Timestamp of the most recent data top-up, set when an invoice is fulfilled.

string format: date-time
nullable
data_updated
required
Last Used
string format: date-time
updated
required
string format: date-time
created
required
string format: date-time
Examples
Exampleexample

Example response

{
"id": "550e8400-e29b-41d4-a716-446655440001",
"is_auto_renewal": true,
"auto_renewal_percentage": 1,
"auto_renewal_data": 1,
"package": {},
"proxy_password": "p9W4rT2xK7mQ",
"proxy_password_reset": "2026-07-01T12:30:00Z",
"pools": [
"residential"
],
"data": 1073741824,
"data_remaining": 1,
"data_spent": 1073741824,
"ledgers": [
{}
],
"latest_data_top_up": 1,
"latest_data_top_up_date": "2026-07-01T12:30:00Z",
"data_updated": "2026-07-01T12:30:00Z",
"updated": "2026-07-01T12:30:00Z",
"created": "2026-07-01T12:30:00Z"
}

The request is malformed or violates a business rule.

Media typeapplication/json

Validation and API error payload. Field names may be added dynamically; field errors are returned as arrays of human-readable messages.

object
detail
string
non_field_errors
Array<string>
translation

Stable translation key suitable for client localisation.

string
key
additional properties
One of:
string
Examples
ExampleValidationError

Validation error

{
"non_field_errors": [
"The request could not be processed."
],
"translation": "errors.request.invalid"
}

Authentication credentials are missing, expired, or invalid.

Media typeapplication/json

Validation and API error payload. Field names may be added dynamically; field errors are returned as arrays of human-readable messages.

object
detail
string
non_field_errors
Array<string>
translation

Stable translation key suitable for client localisation.

string
key
additional properties
One of:
string
Examples
ExampleAuthenticationRequired

Authentication required

{
"detail": "Authentication credentials were not provided."
}

The authenticated account cannot perform this operation.

Media typeapplication/json

Validation and API error payload. Field names may be added dynamically; field errors are returned as arrays of human-readable messages.

object
detail
string
non_field_errors
Array<string>
translation

Stable translation key suitable for client localisation.

string
key
additional properties
One of:
string
Examples
ExamplePermissionDenied

Permission denied

{
"detail": "You do not have permission to perform this action."
}

The requested resource does not exist in the current account scope.

Media typeapplication/json

Validation and API error payload. Field names may be added dynamically; field errors are returned as arrays of human-readable messages.

object
detail
string
non_field_errors
Array<string>
translation

Stable translation key suitable for client localisation.

string
key
additional properties
One of:
string
Examples
ExampleResourceNotFound

Resource not found

{
"detail": "Not found."
}