API: add_service
Main:
- my_balance
- add_service
- update_service
- get_available_locations
- get_service_info
- suspend_service
- unsuspend_service
- terminate_service
- get_account_services
- prolong_service
- del_ips_from_service
- add_typecancel
- terminate_typecancel
- applycredit
- get_ips_access_list
- update_ips_access_list
- change_service_pass
- add_hosts_to_block
- del_hosts_from_block
- get_hosts_blocked_info
Work with groups:
add_service
Discription: Adding a new service (proxy)
Parameter | Type | Description | Required |
---|---|---|---|
action | string | add_service | required |
hash | string | Your API hash | required |
userid | int | Your customer ID | required |
count | int | Count of IP (proxy) on the service being created | required |
prolong_type | string | auto_prolong - tariff with automatic renewal of the service if there is money on the balance.
I.e. when you create renewal invoice, if you have money on the balance, they will be automatically
deducted from the credit balance (selected by default). manual_prolong - tariff with renewal via manual payment of the renewal invoice. I.e. if you create invoice for renewal, even if you have sufficient balance, the invoice will not be paid automatically and the service will not be renewal, as long as you do not pay this invoice.(you can pay invoice manual or via command applycredit) |
not required |
service_name | string | The name that will be assigned to the service being created | not required |
proxy_location | string | Proxy location in format "country:city" or "country". Examples: 1. "proxy_location" => "US" - proxy servers will be created in the US location 2. "proxy_location" => "US:Jersy_NJ" - proxy servers will be created in the US in Jersy_NJ location to find out the available locations, use the query: get_available_locations |
not required |
typecancel | string | "End of Billing Period" - the service will be deleted at the end of the billing period, without automatic renewal. By default, all created services are automatically renewed and money is debited from the partner's balance. The billing period for services is one month | not required |
noemail | boolean | true - without email notification about adding a new service. By default false | not required |
noinvoiceemail | boolean | true - without email notification of a new invoice. By default false | not required |
accessips | string | A comma-separated list of IP addresses for accessing the proxy without a password. You can specify networks in the range from /23 to /32 | not required |
Example Request (CURL)
$postfields = array( "userid"=>$userid, "hash"=>$hash, "action"=>"add_service", "count"=>3, "proxy_location"=>"US:Jersy_NJ", "accessips"=>"192.168.0.1,8.8.8.8" ); $result = connect_api_proxy007com($postfields); function connect_api_proxy007com($postfields) { $url = "https://proxy007.com/proxy/api/index.php"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 900); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); $data = curl_exec($ch); curl_close($ch); return $data; }
Answer:
{"code":"2001","status":"successful","balance":50.21,"added_proxyes_count":"3","serviceid":"123","invoiceid":"234"}"