Products
Get Products
GET
/products
Returns a product list containing plans, locations, questions and quantity discounts.
Example request:
curl -X GET "https://apid.iproyal.com/v1/reseller/products" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"
const https = require('https');
const api_token = '<your_access_token>';
const options = {
hostname: 'apid.iproyal.com',
path: '/v1/reseller/products',
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();
import requests
api_token = '<your_access_token>'
url = 'https://apid.iproyal.com/v1/reseller/products'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())
const https = require('https');
const api_token = '<your_access_token>';
const options = {
hostname: 'apid.iproyal.com',
path: '/v1/reseller/products',
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();
Example response:
{
"data": [
{
"id": 9,
"name": "Static Residential",
"plans": [
{
"id": 4,
"name": "30 Days",
"price": 2,
"min_quantity": 5,
"max_quantity": 100000
},
...
],
"locations": [
{
"id": 51,
"name": "Australia",
"out_of_stock": false,
"available_proxies_count": 1142
},
...
],
"questions": [
{
"id": 5,
"text": "On which website do you plan to use them?",
"is_required": false
}
],
"quantity_discounts": [
{
"quantity_from": 99,
"discount_percent": 5
},
...
]
},
...
]
}
Last updated