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
note_search
String
Phrases in order's note field to search by
order_ids
Array
Order ids to get
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,1011" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"<?php
$api_token = '<your_access_token>';
$params = [
'product_id' => 123,
'page' => 1,
'per_page' => 10,
'location_id' => 456,
'status' => 'in-progress',
'note_search' => 'example note',
'order_ids' => [789, 1011]
];
$query = http_build_query($params);
$url = "https://apid.iproyal.com/v1/reseller/orders?$query";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>Example response:
{
"data": [
{
"id": 420,
"note": null,
"product_name": "Static Residential",
"plan_name": "30 Days",
"expire_date": "2024-04-20 10:25:12",
"status": "confirmed",
"location": "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:
Example response:
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
Example request:
Example response:
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
product_question_answers
Array
Answers to questions
Example request:
Example response:
Extend Order
POST /orders/{order_id}/extend
Body Parameters
product_plan_id
Integer
Product plan id
Example request:
Example response:
Last updated
Was this helpful?