Orders
Get Orders
GET
/orders
Query Parameters
product_id
Integer
Product id
page
Integer
Number of page
per_page
Integer
Number of orders to get per page
location_id
Integer
Location id
status
String
Order status
unpaid
in-progress
confirmed
refunded
expired
note_search
String
Phrases in order's note field to search by
order_ids
Array
Order ids to get
sort_by
String
Column to sort by. Required with order
order
String
Sort order. Required with sort_by
asc
desc
statuses
Array
Order statuses. Must contain only values from the available options.
unpaid
in-progress
confirmed
refunded
expired
status_is_expiring_soon
Boolean
Is order expiring soon
order_billing_type
String
Order billing type
subscription
regular
Example request:
curl -X GET "https://apid.iproyal.com/v1/reseller/orders?product_id=123&page=1&per_page=10&location_id=456&status=in-progress¬e_search=example%20note&order_ids[]=789&order_ids[]=1011" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"
Example response:
{
"data": [
{
"id": 420,
"note": null,
"product_name": "Static Residential",
"expire_date": "2024-04-20 10:25:12",
"plan_name": "30 Days",
"status": "confirmed",
"location": "United States",
"locations": "United States",
"quantity": 5,
"questions_answers": [
{
"question": "Extra requirements (if you have any):",
"answer": "I need 128.158.97"
}
],
"proxy_data": {
"ports": {
"socks5": 12324,
"http|https": 12323
},
"proxies": []
},
"auto_extend_settings": null,
"extended_history": []
},
...
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 2,
"path": "https://apid.iproyal.com/v1/reseller/orders",
"per_page": 10,
"to": 10,
"total": 14
}
}
Get Order
GET
/orders/{order_id}
Example request:
curl -X GET "https://apid.iproyal.com/v1/reseller/orders/12345" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"
Example response:
{
"id": 420,
"note": null,
"product_name": "Static Residential",
"expire_date": "2024-04-20 10:25:12",
"plan_name": "30 Days",
"status": "expired",
"location": "Canada",
"locations": "Canada",
"quantity": 5,
"questions_answers": [],
"proxy_data": {
"ports": {
"socks5": 12324,
"http|https": 12323
},
"proxies": []
},
"auto_extend_settings": null,
"extended_history": []
}
Calculate Pricing
GET
/orders/calculate-pricing
Query Parameters
product_id
Integer
Product id
product_plan_id
Integer
Product plan id
product_location_id
Integer
Product location id
quantity
Integer
Proxy quantity
coupon_code
String
Coupon code
order_id
Integer
Order id
order_billing_type
String
Order billing type
subscription
regular
product_question_answers
Array
Product question answers
Example request:
curl -X GET "https://apid.iproyal.com/v1/reseller/orders/calculate-pricing?product_id=123&product_plan_id=456&product_location_id=789&quantity=10&coupon_code=DISCOUNT2024" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"
Example response:
{
"pre_discount_price": 30,
"price_with_vat": 30,
"vat": null,
"price": 30,
"pre_discount_price_per_item": 3,
"price_per_item": 3,
"plan_discount_percent": 0,
"location_discount_percent": 0,
"coupon_discount_percent": 0,
"quantity_discount_percent": 0,
"total_discount_percent": 0,
"quantity_required_for_next_discount": {
"quantity": 90,
"discount": 5
},
"message": null
}
Create Order
POST
/orders
Body Parameters:
product_id
Integer
Product id
product_plan_id
Integer
Product plan id
product_location_id
Integer
Product location id
quantity
Integer
Proxy quantity
coupon_code
String
Coupon code
auto_extend
Boolean
Should the order be extended automatically. Default value is true.
product_question_answers
Array
Answers to questions
{ question_id: answer, ... }
card_id
Integer
Card id. If an order is paid by card, the card_id
must be provided; otherwise, it will be treated as a balance purchase.
selection
Array
You can provide multiple locations with their quantities using the selection.locations
field. When you use this, you do not need to specify product_plan_id
and quantity
as top-level parameters in the request body.
Example request:
curl -X POST "https://apid.iproyal.com/v1/reseller/orders" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json" \
-d '{
"product_id": 123,
"product_plan_id": 456,
"coupon_code": "DISCOUNT2024",
"auto_extend": true,
"product_question_answers": {
"question_id_1": "answer_1",
"question_id_2": "answer_2"
},
"card_id": 1,
"selection": {
"locations": [
{
"product_location_id": 789,
"quantity": 10
}
]
}
}'
Example response:
{
"id": 420,
"note": null,
"product_name": "Static Residential",
"plan_name": "30 Days",
"expire_date": "2024-04-20 10:25:12",
"status": "expired",
"location": "Canada",
"locations": "Canada",
"quantity": 5,
"questions_answers": [],
"proxy_data": {
"ports": {
"socks5": 12324,
"http|https": 12323
},
"proxies": []
},
"auto_extend_settings": null,
"extended_history": []
}
Extend Order
POST
/orders/{order_id}/extend
Body Parameters
product_plan_id
Integer
Product plan id
card_id
Integer
Card id. If an order extend is paid by card, the card_id
must be provided; otherwise, it will be treated as a balance purchase.
Example request:
curl -X POST "https://apid.iproyal.com/v1/reseller/orders/12345/extend" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json" \
-d '{
"product_plan_id": 678,
"card_id": 1
}'
Example response:
{
"id": 420,
"note": null,
"product_name": "Static Residential",
"plan_name": "30 Days",
"expire_date": "2024-04-20 10:25:12",
"status": "expired",
"location": "Canada",
"locations": "Canada",
"quantity": 5,
"questions_answers": [],
"proxy_data": {
"ports": {
"socks5": 12324,
"http|https": 12323
},
"proxies": []
},
"auto_extend_settings": null,
"extended_history": []
}
Last updated