NAV
Gofiber
bash php python

Introduction

Our HTTP REST API allows you to manage vital details of your account and services in client portal. JSON is used for all API returns

Use left menu to browse trough available methods, use right menu to check required parameters, data to post and code samples in various languages.

Swagger Doc: You can download or display the JSON to generate documentation in Swagger.

Authentication

JSON Web Token Authentication

curl 'https://manager.idcviettel.com/api/login' \
    -d username="username"\
    -d password="password"

# grab authentication token from the response and pass it in Authorization header
curl 'https://manager.idcviettel.com/api/details' \
    -H "Authorization: Bearer $token"
$resp = $client->post('/login', [
    'form_params' => [
        'username' => 'username',
        'password' => 'password'
    ]
]);

$token = $resp->json()['token'];

$resp = $client->get('/details', [
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

echo $resp->getBody();
payload = username
resp = requests.post('https://manager.idcviettel.com/api/login', data=payload)

headers = {
    'Authorization': 'Bearer ' + req.json().token
}
resp = requests.get('https://manager.idcviettel.com/api/details', headers=headers)
print(resp)

Make sure to replace username and password with your client area details.

To authenticate, you need to send a JSON Web Token (JWT) in the authorization header of the HTTP request.

To obtain the authorization token you need to submit a request with your username and password to POST https://manager.idcviettel.com/api/login API method

All API calls that require authentication expect HTTP header in the form of Authorization: Bearer <token>.

For example:
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc...

Basic Authentication

# pass the correct header with each request (-u option)
curl 'https://manager.idcviettel.com/api/details' \
    -u "username:password"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'auth' => ['username', 'password']
]);

$resp = $client->get('/details');
# python requests module handles basic authentication if provided with auth parameter
payload = username
req = requests.get('https://manager.idcviettel.com/api/details', auth=('username', 'password'))
print(req.json())

Make sure to replace username and password with your client area details.

This authentication method requires that you send your client area username (email address) and password with each request.

API calls that require authentication expect a header in the form of Authorization: Basic <credentials>, where credentials is the Base64 encoding of username and password joined by a single colon :.

For example:
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

You can find more info on this authentication method here: Basic HTTP Authentication

Clientarea

User Login

Return Client details

POST_DATA="{
    \"username\": \"usernameValue\",
    \"password\": \"passwordValue\",
    \"remember\": \"rememberValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/login" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
]);

$options = [
    'json' => [
        "username" => "usernameValue",
        "password" => "passwordValue",
        "remember" => "rememberValue"
    ]
]
$resp = $client->post('/login', $options);
echo $resp->getBody();
payload = {
    'username': "usernameValue",
    'password': "passwordValue",
    'remember': "rememberValue"
}


req = requests.post('https://manager.idcviettel.com/api/login', json=payload)
print(req.json())

HTTP Request

POST /login

Query Parameters

Parameter Type Description
username string

Your acount email address

password string

Account password

remember boolean

Remember login session with 360 day

Logout

Invalidate authorization token


curl -X POST "https://manager.idcviettel.com/api/logout" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->post('/logout');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/logout', headers=headers)
print(req.json())
Example Response:
{
    "status": true
}

HTTP Request

POST /logout

Refresh Token

Generate new authorization token using refresh token

POST_DATA="{
    \"refresh_token\": \"refresh_tokenValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
]);

$options = [
    'json' => [
        "refresh_token" => "refresh_tokenValue"
    ]
]
$resp = $client->post('/token', $options);
echo $resp->getBody();
payload = {
    'refresh_token': "refresh_tokenValue"
}


req = requests.post('https://manager.idcviettel.com/api/token', json=payload)
print(req.json())
Example Response:
{
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHR(...)vY2xlYiHGvauCWZD9B0VwXgHEzXDllqY",
    "refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJBQ(...)Rmivc_u3YA_kgDqOPtUuGNXOzueXYtZw"
}

HTTP Request

POST /token

Query Parameters

Parameter Type Description
refresh_token string

Refresh token previously obtained from POST /login

Revoke Token

Invalidate authorization and refresh token. Pass refresh token or call this method with valid access token

POST_DATA="{
    \"refresh_token\": \"refresh_tokenValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/revoke" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
]);

$options = [
    'json' => [
        "refresh_token" => "refresh_tokenValue"
    ]
]
$resp = $client->post('/revoke', $options);
echo $resp->getBody();
payload = {
    'refresh_token': "refresh_tokenValue"
}


req = requests.post('https://manager.idcviettel.com/api/revoke', json=payload)
print(req.json())
Example Response:
{
    "status": true
}

HTTP Request

POST /revoke

Query Parameters

Parameter Type Description
refresh_token string

User Details

Return registration details for my account


curl -X GET "https://manager.idcviettel.com/api/details" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/details');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/details', headers=headers)
print(req.json())
Example Response:
{
    "client": {
        "id": "26",
        "email": "api@example.com",
        "lastlogin": "2016-12-30 12:24:28",
        "ip": "172.100.2.1",
        "host": "hostname",
        "firstname": "Joe",
        "lastname": "Doe",
        "companyname": "",
        "address1": "Pretty View Lane",
        "address2": "3294",
        "city": "Santa Rosa",
        "state": "California",
        "postcode": "95401",
        "country": "US",
        "phonenumber": "+1.24123123"
    }
}

HTTP Request

GET /details

Password Reset

Request password reset email for account

POST_DATA="{
    \"email\": \"emailValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/passwordreset" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
]);

$options = [
    'json' => [
        "email" => "emailValue"
    ]
]
$resp = $client->post('/passwordreset', $options);
echo $resp->getBody();
payload = {
    'email': "emailValue"
}


req = requests.post('https://manager.idcviettel.com/api/passwordreset', json=payload)
print(req.json())
Example Response:
{
    "info": [
        "generated_reset_request"
    ]
}

HTTP Request

POST /passwordreset

Query Parameters

Parameter Type Description
email string

EMail address

Update User Details

Update registration details under my account

POST_DATA="{
    \"email\": \"emailValue\",
    \"firstname\": \"firstnameValue\",
    \"lastname\": \"lastnameValue\",
    \"country\": \"countryValue\",
    \"phonenumber\": \"phonenumberValue\",
    \"type\": \"typeValue\",
    \"telegramnotifications\": \"telegramnotificationsValue\"
}"

curl -X PUT "https://manager.idcviettel.com/api/details" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "email" => "emailValue",
        "firstname" => "firstnameValue",
        "lastname" => "lastnameValue",
        "country" => "countryValue",
        "phonenumber" => "phonenumberValue",
        "type" => "typeValue",
        "telegramnotifications" => "telegramnotificationsValue"
    ]
]
$resp = $client->put('/details', $options);
echo $resp->getBody();
payload = {
    'email': "emailValue",
    'firstname': "firstnameValue",
    'lastname': "lastnameValue",
    'country': "countryValue",
    'phonenumber': "phonenumberValue",
    'type': "typeValue",
    'telegramnotifications': "telegramnotificationsValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.put('https://manager.idcviettel.com/api/details', json=payload, headers=headers)
print(req.json())
Example Response:
{
    "client": {
        "id": "26",
        "email": "api@example.com",
        "lastlogin": "2016-12-30 12:34:20",
        "ip": "172.100.2.1",
        "host": "hostname",
        "firstname": "Joe",
        "lastname": "Doe",
        "companyname": "",
        "address1": "Pretty View Lane",
        "address2": "3194",
        "city": "Santa Rosa",
        "state": "California",
        "postcode": "95401",
        "country": "US",
        "phonenumber": "+1.24123123"
    },
    "info": [
        "client_info_updated"
    ]
}

HTTP Request

PUT /details

Query Parameters

Parameter Type Description
email string

Email Address

firstname string

First Name

lastname string

Last Name

country string

Country

phonenumber string

Phone

type string

Account Type

Available values: Private, Company.

telegramnotifications string[]

Telegram notifications

Available values: Yes.

User Logs

Returns logs from history


curl -X GET "https://manager.idcviettel.com/api/logs" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/logs');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/logs', headers=headers)
print(req.json())

HTTP Request

GET /logs

Get Affiliate summary


curl -X GET "https://manager.idcviettel.com/api/affiliates/summary" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/affiliates/summary');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/affiliates/summary', headers=headers)
print(req.json())

HTTP Request

GET /affiliates/summary

Get Affiliate campaigns


curl -X GET "https://manager.idcviettel.com/api/affiliates/campaigns" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/affiliates/campaigns');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/affiliates/campaigns', headers=headers)
print(req.json())

HTTP Request

GET /affiliates/campaigns

Get Affiliate commissions


curl -X GET "https://manager.idcviettel.com/api/affiliates/commissions" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/affiliates/commissions');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/affiliates/commissions', headers=headers)
print(req.json())

HTTP Request

GET /affiliates/commissions

Get Affiliate payouts


curl -X GET "https://manager.idcviettel.com/api/affiliates/payouts" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/affiliates/payouts');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/affiliates/payouts', headers=headers)
print(req.json())

HTTP Request

GET /affiliates/payouts

Get Affiliate vouchers


curl -X GET "https://manager.idcviettel.com/api/affiliates/vouchers" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/affiliates/vouchers');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/affiliates/vouchers', headers=headers)
print(req.json())

HTTP Request

GET /affiliates/vouchers

Get Affiliate commission plans


curl -X GET "https://manager.idcviettel.com/api/affiliates/commissionplans" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/affiliates/commissionplans');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/affiliates/commissionplans', headers=headers)
print(req.json())

HTTP Request

GET /affiliates/commissionplans

List all portal notifications

Return a list of all portal notifications.


curl -X GET "https://manager.idcviettel.com/api/notifications" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/notifications');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/notifications', headers=headers)
print(req.json())

HTTP Request

GET /notifications

Query Parameters

Parameter Type Description
rel_type string

Optional, return only by relation type

rel_id string

Optional, return only by relation id

List new portal notifications

Return only new portal notifications.


curl -X GET "https://manager.idcviettel.com/api/notifications/new" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/notifications/new');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/notifications/new', headers=headers)
print(req.json())

HTTP Request

GET /notifications/new

Query Parameters

Parameter Type Description
rel_type string

Optional, return only by relation type

rel_id string

Optional, return only by relation id

Acknowledge notification

Marks the notification as read


curl -X PUT "https://manager.idcviettel.com/api/notifications/@id/ack" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->put('/notifications/@id/ack');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.put('https://manager.idcviettel.com/api/notifications/@id/ack', headers=headers)
print(req.json())

HTTP Request

PUT /notifications/@id/ack

Query Parameters

Parameter Type Description
id int

Change Password

Change password

POST_DATA="{
    \"oldpassword\": \"oldpasswordValue\",
    \"password\": \"passwordValue\",
    \"password2\": \"password2Value\"
}"

curl -X POST "https://manager.idcviettel.com/api/password/change" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "oldpassword" => "oldpasswordValue",
        "password" => "passwordValue",
        "password2" => "password2Value"
    ]
]
$resp = $client->post('/password/change', $options);
echo $resp->getBody();
payload = {
    'oldpassword': "oldpasswordValue",
    'password': "passwordValue",
    'password2': "password2Value"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/password/change', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /password/change

Query Parameters

Parameter Type Description
oldpassword string

old password

password string

New password

password2 string

New password

Forgot Password

forgot password


curl -X POST "https://manager.idcviettel.com/api/password/forgot" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
]);


$resp = $client->post('/password/forgot');
echo $resp->getBody();


req = requests.post('https://manager.idcviettel.com/api/password/forgot')
print(req.json())

HTTP Request

POST /password/forgot

Validate Reset Password

Validate Reset Password From email link active

POST_DATA="{
    \"activate\": \"activateValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/password/passreset" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
]);

$options = [
    'json' => [
        "activate" => "activateValue"
    ]
]
$resp = $client->post('/password/passreset', $options);
echo $resp->getBody();
payload = {
    'activate': "activateValue"
}


req = requests.post('https://manager.idcviettel.com/api/password/passreset', json=payload)
print(req.json())

HTTP Request

POST /password/passreset

Query Parameters

Parameter Type Description
activate string

activate code

Summany info


curl -X GET "https://manager.idcviettel.com/api/clientarea" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/clientarea');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/clientarea', headers=headers)
print(req.json())

HTTP Request

GET /clientarea

List status key


curl -X GET "https://manager.idcviettel.com/api/clientarea/statuses" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/clientarea/statuses');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/clientarea/statuses', headers=headers)
print(req.json())

HTTP Request

GET /clientarea/statuses

Get contacts details

Return array with contact details


curl -X GET "https://manager.idcviettel.com/api/contact/@id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/contact/@id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/contact/@id', headers=headers)
print(req.json())

HTTP Request

GET /contact/@id

Query Parameters

Parameter Type Description
id int

Contact ID

List history


curl -X GET "https://manager.idcviettel.com/api/clientarea/histories" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/clientarea/histories');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/clientarea/histories', headers=headers)
print(req.json())

HTTP Request

GET /clientarea/histories

Emails history


curl -X GET "https://manager.idcviettel.com/api/clientarea/history/emails" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/clientarea/history/emails');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/clientarea/history/emails', headers=headers)
print(req.json())

HTTP Request

GET /clientarea/history/emails

Email Details


curl -X GET "https://manager.idcviettel.com/api/clientarea/history/emails/@id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/clientarea/history/emails/@id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/clientarea/history/emails/@id', headers=headers)
print(req.json())

HTTP Request

GET /clientarea/history/emails/@id

Query Parameters

Parameter Type Description
id int

Email ID

Service menus

Get list Categories for Service.


curl -X GET "https://manager.idcviettel.com/api/clientarea/nav/service" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/clientarea/nav/service');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/clientarea/nav/service', headers=headers)
print(req.json())

HTTP Request

GET /clientarea/nav/service

Search Service/Product


curl -X GET "https://manager.idcviettel.com/api/clientarea/search/@query" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/clientarea/search/@query');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/clientarea/search/@query', headers=headers)
print(req.json())

HTTP Request

GET /clientarea/search/@query

Query Parameters

Parameter Type Description
query string

Value to search

Downloads


curl -X GET "https://manager.idcviettel.com/api/downloads" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
]);


$resp = $client->get('/downloads');
echo $resp->getBody();


req = requests.get('https://manager.idcviettel.com/api/downloads')
print(req.json())

HTTP Request

GET /downloads

Download File


curl -X GET "https://manager.idcviettel.com/api/download/@id" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
]);


$resp = $client->get('/download/@id');
echo $resp->getBody();


req = requests.get('https://manager.idcviettel.com/api/download/@id')
print(req.json())

HTTP Request

GET /download/@id

Query Parameters

Parameter Type Description
id int

ChangeOwner Service

Sử dụng: &rel_id=:serviceId&rel_type=:ServiceType&make=(reject|approve) để xác nhận hay hủy


curl -X GET "https://manager.idcviettel.com/api/changeowner" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/changeowner');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/changeowner', headers=headers)
print(req.json())

HTTP Request

GET /changeowner

Get Client Settings


curl -X GET "https://manager.idcviettel.com/api/clientarea/settings" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/clientarea/settings');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/clientarea/settings', headers=headers)
print(req.json())

HTTP Request

GET /clientarea/settings

Update Client Settings

POST_DATA="{
    \"configs\": {
        \"key\": \"value\"
    }
}"

curl -X POST "https://manager.idcviettel.com/api/clientarea/settings" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "configs" => [
            "key" => "value"
        ]
    ]
]
$resp = $client->post('/clientarea/settings', $options);
echo $resp->getBody();
payload = {
    'configs': {
        'key': "value"
    }
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/clientarea/settings', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /clientarea/settings

Query Parameters

Parameter Type Description
configs array

Value to setting: RecordsPerPage, DefaultTimezone, DefaultPaymentModule, CreditAutoApply, ClientNotifications, DefaultNameservers

Account Verification

POST_DATA="{
    \"code\": \"codeValue\",
    \"type\": \"sms\"
}"

curl -X POST "https://manager.idcviettel.com/api/verification/verify" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "code" => "codeValue",
        "type" => "sms"
    ]
]
$resp = $client->post('/verification/verify', $options);
echo $resp->getBody();
payload = {
    'code': "codeValue",
    'type': "sms"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/verification/verify', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /verification/verify

Query Parameters

Parameter Type Description
code string
type string

sms/email

Resend Verification

POST_DATA="{
    \"code\": \"codeValue\",
    \"type\": \"typeValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/verification/resend" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "code" => "codeValue",
        "type" => "typeValue"
    ]
]
$resp = $client->post('/verification/resend', $options);
echo $resp->getBody();
payload = {
    'code': "codeValue",
    'type': "typeValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/verification/resend', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /verification/resend

Query Parameters

Parameter Type Description
code string
type string

sms/email

Billing

Account balance

Get current account balance(unpaid invoices total), account credit


curl -X GET "https://manager.idcviettel.com/api/balance" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/balance');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/balance', headers=headers)
print(req.json())
Example Response:
{
    {
        "success": true,
        "details": {
            "currency": "USD",
            "acc_balance": "123456.55",
            "acc_credit": "0.00"
        }
    }
}

HTTP Request

GET /balance

List Invoices

List all invoices under my account


curl -X GET "https://manager.idcviettel.com/api/invoice" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/invoice');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/invoice', headers=headers)
print(req.json())
Example Response:
{
    "invoices": [
        {
            "id": "308976",
            "date": "2016-12-30",
            "dateorig": "2016-12-30",
            "duedate": "2017-01-06",
            "paybefore": "2017-01-06",
            "total": "19.65",
            "datepaid": "2016-12-30 12:40:47",
            "status": "Paid",
            "merge_id": null,
            "number": "2016\/12\/1",
            "currency": "USD"
        }
    ]
}

HTTP Request

GET /invoice

Invoice Details

Get invoice details


curl -X GET "https://manager.idcviettel.com/api/invoice/@id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/invoice/@id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/invoice/@id', headers=headers)
print(req.json())
Example Response:
{
    "invoice": {
        "id": "308976",
        "status": "Paid",
        "date": "2016-12-30",
        "duedate": "2017-01-06",
        "paybefore": "2017-01-06",
        "datepaid": "2016-12-30 12:40:47",
        "subtotal": 16.24,
        "credit": 0,
        "tax": 3.41,
        "taxrate": 21,
        "tax2": 0,
        "taxrate2": 0,
        "taxexempt": "0",
        "total": 19.65,
        "rate": 1,
        "rate2": 0,
        "rate3": 1,
        "notes": "",
        "items": [
            {
                "id": "12305",
                "invoice_id": "308976",
                "type": "Other",
                "item_id": "0",
                "description": "Example Service",
                "amount": "15.00",
                "taxed": "1",
                "qty": "1.00",
                "linetotal": "15.00"
            },
            {
                "id": "12309",
                "invoice_id": "308976",
                "type": "Other",
                "item_id": "-2",
                "description": "PayPal Payment Fee",
                "amount": "1.24",
                "taxed": "1",
                "qty": "1.00",
                "linetotal": "1.24"
            }
        ],
        "client": {
            "id": "26",
            "email": "api@example.com",
            "firstname": "Joe",
            "lastname": "Doe",
            "companyname": "",
            "address1": "Pretty View Lane",
            "address2": "3194",
            "city": "Santa Rosa",
            "state": "California",
            "postcode": "95401",
            "country": "US",
            "phonenumber": "+1.24123123"
        },
        "number": "2016\/12\/1",
        "currency": "USD"
    }
}

HTTP Request

GET /invoice/@id

Query Parameters

Parameter Type Description
id int

Apply credit

Apply account credit to invoice

POST_DATA="{
    \"amount\": \"amountValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/invoice/@id/credit" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "amount" => "amountValue"
    ]
]
$resp = $client->post('/invoice/@id/credit', $options);
echo $resp->getBody();
payload = {
    'amount': "amountValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/invoice/@id/credit', json=payload, headers=headers)
print(req.json())
Example Response:
{
    "success": true,
    "invoice_status": "Paid",
    "applied": 2.1
}

HTTP Request

POST /invoice/@id/credit

Query Parameters

Parameter Type Description
id int
amount number

Optional credit amount, when no value is specified maximum amount to fully pay the invoice will be used

Payment Methods

List available payment methods


curl -X GET "https://manager.idcviettel.com/api/payment" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/payment');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/payment', headers=headers)
print(req.json())
Example Response:
{
    "payments": {
        "10": "BankTransfer",
        "9": "PayPal"
    }
}

HTTP Request

GET /payment

Payment Methods Fees

List available payment methods with fees


curl -X GET "https://manager.idcviettel.com/api/payment/fees" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/payment/fees');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/payment/fees', headers=headers)
print(req.json())
Example Response:
{
    "payments": [
        {
            "id": 1,
            "name": "Bank Transfer",
            "fixed_fee": "0.0",
            "percent_fee": "0.0",
        },
        {
            "id": 2,
            "name": "Stripe",
            "fixed_fee": "0.5",
            "percent_fee": "2.9",
        },
        {
            "id": 4,
            "name": "Credit Card",
            "fixed_fee": "0.1",
            "percent_fee": "2.4"
        },
        {
            "id": 5,
            "name": "PayPal",
            "fixed_fee": "0.3",
            "percent_fee": "2.9"
        }
    ]
}

HTTP Request

GET /payment/fees

Currencies List

Return currencies details


curl -X GET "https://manager.idcviettel.com/api/currencies" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
]);


$resp = $client->get('/currencies');
echo $resp->getBody();


req = requests.get('https://manager.idcviettel.com/api/currencies')
print(req.json())

HTTP Request

GET /currencies

Credit logs


curl -X GET "https://manager.idcviettel.com/api/billing/creditlogs" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/billing/creditlogs');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/billing/creditlogs', headers=headers)
print(req.json())

HTTP Request

GET /billing/creditlogs

Redeem a voucher

Using Redeem a voucher

POST_DATA="{
    \"code\": \"codeValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/billing/creditvoucher" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "code" => "codeValue"
    ]
]
$resp = $client->post('/billing/creditvoucher', $options);
echo $resp->getBody();
payload = {
    'code': "codeValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/billing/creditvoucher', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /billing/creditvoucher

Query Parameters

Parameter Type Description
code string

Voucher Code

Add Funds

Create Invoice Add Credits

POST_DATA="{
    \"funds\": \"fundsValue\",
    \"gateway\": \"gatewayValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/billing/addfunds" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "funds" => "fundsValue",
        "gateway" => "gatewayValue"
    ]
]
$resp = $client->post('/billing/addfunds', $options);
echo $resp->getBody();
payload = {
    'funds': "fundsValue",
    'gateway': "gatewayValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/billing/addfunds', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /billing/addfunds

Query Parameters

Parameter Type Description
funds int

Amount of money

gateway int

Payment Method

List Invoices

List all invoices under my account
Using: &page=&perpage= for pagination. page start 0.
filter[service_status]= search invoice by service status, filter[service]= search invoice by service id


curl -X GET "https://manager.idcviettel.com/api/invoices" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/invoices');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/invoices', headers=headers)
print(req.json())

HTTP Request

GET /invoices

List Invoices Due

List all invoices due under my account
Using: &page=&perpage= for pagination. page start 0


curl -X GET "https://manager.idcviettel.com/api/invoices/due" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/invoices/due');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/invoices/due', headers=headers)
print(req.json())

HTTP Request

GET /invoices/due

Download Invoice Pdf


curl -X GET "https://manager.idcviettel.com/api/invoice/@id/pdf" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/invoice/@id/pdf');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/invoice/@id/pdf', headers=headers)
print(req.json())

HTTP Request

GET /invoice/@id/pdf

Query Parameters

Parameter Type Description
id int

Payall Invoice

POST_DATA="{
    \"selected\": {
        \"key\": \"value\"
    }
}"

curl -X POST "https://manager.idcviettel.com/api/invoices/payall" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "selected" => [
            "key" => "value"
        ]
    ]
]
$resp = $client->post('/invoices/payall', $options);
echo $resp->getBody();
payload = {
    'selected': {
        'key': "value"
    }
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/invoices/payall', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /invoices/payall

Query Parameters

Parameter Type Description
selected array

selected invoice id

Delete Invoice


curl -X DELETE "https://manager.idcviettel.com/api/invoice/@id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->delete('/invoice/@id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.delete('https://manager.idcviettel.com/api/invoice/@id', headers=headers)
print(req.json())

HTTP Request

DELETE /invoice/@id

Query Parameters

Parameter Type Description
id int

Invoice id

List Estimates

List all estimates under my account
Using: &page=&perpage= for pagination. page start 0.
filter[service_status]= search invoice by service status, filter[service]= search invoice by service id


curl -X GET "https://manager.idcviettel.com/api/estimates" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/estimates');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/estimates', headers=headers)
print(req.json())

HTTP Request

GET /estimates

Estimates Details


curl -X GET "https://manager.idcviettel.com/api/estimates/@id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/estimates/@id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/estimates/@id', headers=headers)
print(req.json())

HTTP Request

GET /estimates/@id

Query Parameters

Parameter Type Description
id string

Estimates id

Download Invoice Pdf


curl -X GET "https://manager.idcviettel.com/api/estimate/@id/pdf" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/estimate/@id/pdf');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/estimate/@id/pdf', headers=headers)
print(req.json())

HTTP Request

GET /estimate/@id/pdf

Query Parameters

Parameter Type Description
id int

Get Payment link from Gateways.


curl -X GET "https://manager.idcviettel.com/api/billing/@invoice_id/pay/@gateway_id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/billing/@invoice_id/pay/@gateway_id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/billing/@invoice_id/pay/@gateway_id', headers=headers)
print(req.json())

HTTP Request

GET /billing/@invoice_id/pay/@gateway_id

Query Parameters

Parameter Type Description
invoice_id int

Invoice ID

gateway_id int

Gateway ID

Support

List Tickets

List support tickets under my account


curl -X GET "https://manager.idcviettel.com/api/tickets" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/tickets');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/tickets', headers=headers)
print(req.json())

HTTP Request

GET /tickets

Ticket details

Get ticket details, including all replies


curl -X GET "https://manager.idcviettel.com/api/tickets/@number" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/tickets/@number');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/tickets/@number', headers=headers)
print(req.json())
Example Response:
{
    "ticket": {
        "date": "2016-12-30 12:48:13",
        "ticket_number": "736633",
        "name": "Joe Doe",
        "email": "api@example.com",
        "subject": "Lore Ipsum",
        "body": "Donec sollicitudin molestie malesuada. \r\nSed porttitor lectus nibh. Vivamus magna justo, \r\nlacinia eget consectetur sed, convallis at tellus.",
        "status": "Answered",
        "client_read": "1",
        "deptname": "Billing"
    },
    "replies": [
        {
            "id": "929",
            "name": "Suppport Staff",
            "date": "2016-12-30 12:51:04",
            "body": "Vestibulum ac diam sit amet quam \r\nvehicula elementum sed sit amet dui. \r\nPraesent sapien massa\r\n\r\n-- Maecenas efficitur elit est --",
            "status": "Sent",
            "type": "Admin"
        }
    ]
}

HTTP Request

GET /tickets/@number

Query Parameters

Parameter Type Description
number int

Ticket number

Ticket attachment

Get ticket attachment


curl -X GET "https://manager.idcviettel.com/api/ticket/attachment/@file" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/ticket/attachment/@file');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/ticket/attachment/@file', headers=headers)
print(req.json())

HTTP Request

GET /ticket/attachment/@file

Query Parameters

Parameter Type Description
number int

Ticket number

file string

Attachment id

Create Ticket

Submit new ticket

POST_DATA="{
    \"dept_id\": 1,
    \"subject\": \"Subject\",
    \"body\": \"Message ...\"
}"

curl -X POST "https://manager.idcviettel.com/api/tickets" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "dept_id" => 1,
        "subject" => "Subject",
        "body" => "Message ..."
    ]
]
$resp = $client->post('/tickets', $options);
echo $resp->getBody();
payload = {
    'dept_id': 1,
    'subject': "Subject",
    'body': "Message ..."
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/tickets', json=payload, headers=headers)
print(req.json())
Example Response:
{
    "ticket": 865650
}

HTTP Request

POST /tickets

Query Parameters

Parameter Type Description
dept_id int

Department id

subject string

Ticket subject

body string

Ticket message

Create Reply

Reply to ticket

POST_DATA="{
    \"body\": \"reply text ..\"
}"

curl -X POST "https://manager.idcviettel.com/api/tickets/@number" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "body" => "reply text .."
    ]
]
$resp = $client->post('/tickets/@number', $options);
echo $resp->getBody();
payload = {
    'body': "reply text .."
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/tickets/@number', json=payload, headers=headers)
print(req.json())
Example Response:
{
    "info": [
        "reply_added"
    ]
}

HTTP Request

POST /tickets/@number

Query Parameters

Parameter Type Description
number int

Ticket number

body string

Reply message

Re-open ticket

Try to re-open closed ticket


curl -X PUT "https://manager.idcviettel.com/api/tickets/@number/open" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->put('/tickets/@number/open');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.put('https://manager.idcviettel.com/api/tickets/@number/open', headers=headers)
print(req.json())
Example Response:
{
    "status": true
}

HTTP Request

PUT /tickets/@number/open

Query Parameters

Parameter Type Description
number int

Ticket number

Close ticket

Send request to close a ticket


curl -X PUT "https://manager.idcviettel.com/api/tickets/@number/close" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->put('/tickets/@number/close');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.put('https://manager.idcviettel.com/api/tickets/@number/close', headers=headers)
print(req.json())
Example Response:
{
    "status": true
}

HTTP Request

PUT /tickets/@number/close

Query Parameters

Parameter Type Description
number int

Ticket number

List ticket departments

Get the list of ticket departments


curl -X GET "https://manager.idcviettel.com/api/ticket/departments" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/ticket/departments');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/ticket/departments', headers=headers)
print(req.json())

HTTP Request

GET /ticket/departments

Domains


curl -X DELETE "https://manager.idcviettel.com/api/domain/@id/dnssec/@key" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->delete('/domain/@id/dnssec/@key');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.delete('https://manager.idcviettel.com/api/domain/@id/dnssec/@key', headers=headers)
print(req.json())

HTTP Request

DELETE /domain/@id/dnssec/@key

Query Parameters

Parameter Type Description
id int

Domain id

key string

Enable/disable domain autorenew


curl -X PUT "https://manager.idcviettel.com/api/domain/@id/autorenew" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->put('/domain/@id/autorenew');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.put('https://manager.idcviettel.com/api/domain/@id/autorenew', headers=headers)
print(req.json())

HTTP Request

PUT /domain/@id/autorenew

Query Parameters

Parameter Type Description
id int

Domain id

Domain Bulksearch

Domain Bulk Search

POST_DATA="{
    \"name\": \"nameValue\",
    \"tlds\": \"tldsValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/domain/bulksearch" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
]);

$options = [
    'json' => [
        "name" => "nameValue",
        "tlds" => "tldsValue"
    ]
]
$resp = $client->post('/domain/bulksearch', $options);
echo $resp->getBody();
payload = {
    'name': "nameValue",
    'tlds': "tldsValue"
}


req = requests.post('https://manager.idcviettel.com/api/domain/bulksearch', json=payload)
print(req.json())

HTTP Request

POST /domain/bulksearch

Query Parameters

Parameter Type Description
name string

Domain name, ie. example

tlds string

Domain extension, ie. .com, .net

Domain Suggestion Tlds

Domain Suggestion Tlds


curl -X GET "https://manager.idcviettel.com/api/domain/suggestion" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/domain/suggestion');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/domain/suggestion', headers=headers)
print(req.json())

HTTP Request

GET /domain/suggestion

Domain Sale Tlds

Domain Sale Tlds


curl -X GET "https://manager.idcviettel.com/api/domain/sale" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/domain/sale');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/domain/sale', headers=headers)
print(req.json())

HTTP Request

GET /domain/sale

SSL Certificates

List SSL Certificates

List all ssl services under your account


curl -X GET "https://manager.idcviettel.com/api/certificate" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/certificate');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/certificate', headers=headers)
print(req.json())
Example Response:
{
    "sslservices": [
        {
            "id": "300",
            "domain": "examplename.com",
            "total": "27.85",
            "status": "Pending",
            "billingcycle": "Annually",
            "next_due": "2017-12-30",
            "category": "GoGetSSL",
            "category_url": "gogetssl",
            "name": "Comodo InstantSSL",
            "cert_email": "admin@example.com",
            "cert_status": "",
            "cert_expires": "2017-12-30 13:43:12"
        }
    ]
}

HTTP Request

GET /certificate

Certificate details

Return details for certificate @id


curl -X GET "https://manager.idcviettel.com/api/certificate/@id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/certificate/@id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/certificate/@id', headers=headers)
print(req.json())
Example Response:
{
    "service": {
        "id": "300",
        "date_created": "2016-12-30",
        "domain": "examplename.com",
        "firstpayment": "27.85",
        "total": "27.85",
        "billingcycle": "Annually",
        "next_due": "2017-12-30",
        "next_invoice": "2017-10-31",
        "status": "Pending",
        "label": "",
        "name": "Comodo InstantSSL",
        "cert_status": "",
        "cert_expires": "2017-12-30 13:43:12",
        "csr": "-----BEGIN CERTIFICATE REQUEST----- ...",
        "contacts": {
            "admin": {
                "FName": "Mary",
                "LName": "Sue",
                "City": "Santa Rosa",
                "State": "California",
                "PostalCode": "95401",
                "EmailAddress": "mary@example.com",
                "Country": "US",
                "Address1": "Pretty View Lane",
                "Address2": "3194",
                "Phone": 24123223,
                "OrgName": "n\/a",
                "PreFix": 1,
                "JobTitle": "n\/a"
            },
            "billing": {
                (...)
            },
            "tech": {
                (...)
            }
        },
        "organization": {
            "state": "Texas",
            "country": "US",
            "name": "My Org name",
            "unit": "Dev",
            "locality": "SanAntonio",
            "postalcode": "n\/a",
            "address2": "n\/a",
            "address1": "n\/a",
        },
        "cert_email": "admin@example.com",
        "software": "1"
    }
}

HTTP Request

GET /certificate/@id

Query Parameters

Parameter Type Description
id int

Service id

Download certificate

Return X.509 certificate data


curl -X GET "https://manager.idcviettel.com/api/certificate/@id/crt" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/certificate/@id/crt');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/certificate/@id/crt', headers=headers)
print(req.json())

HTTP Request

GET /certificate/@id/crt

Query Parameters

Parameter Type Description
id int

Service id

List available certificates

Return a list with certificate available for purchase


curl -X GET "https://manager.idcviettel.com/api/certificate/order" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/certificate/order');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/certificate/order', headers=headers)
print(req.json())
Example Response:
{
    "products": [
        {
            "id": "25",
            "name": "InstantSSL",
            "description": "",
            "periods": [
                {
                    "years": 1,
                    "price": 27.85,
                    "renew": 27.85
                },
                {
                    "years": 2,
                    "price": 48.75,
                    "renew": 48.75
                }
            ],
            "category": "SSL Certificates",
            "category_url": "sslcertificates"
        },
        (...)
    ]
}

HTTP Request

GET /certificate/order

List server software for certificates

Return a list with software IDs required or certificate


curl -X GET "https://manager.idcviettel.com/api/certificate/order/@product_id/software" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/certificate/order/@product_id/software');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/certificate/order/@product_id/software', headers=headers)
print(req.json())
Example Response:
{
    "software": [
        {
            "id": 0,
            "name": "AOL"
        },
        {
            "id": 1,
            "name": "Apache-SSL (Ben-SSL, not Stronghold)"
        },
        (...)
    ]
}

HTTP Request

GET /certificate/order/@product_id/software

Query Parameters

Parameter Type Description
product_id int

Certificate product ID

Order new certificates

Create new order for a certificate

POST_DATA="{
    \"product_id\": \"product_idValue\",
    \"csr\": \"example.com\",
    \"years\": \"yearsValue\",
    \"pay_method\": \"pay_methodValue\",
    \"approver_email\": \"approver_emailValue\",
    \"admin\": \"adminValue\",
    \"tech\": \"techValue\",
    \"billing\": \"billingValue\",
    \"organization\": \"organizationValue\",
    \"software\": \"softwareValue\",
    \"data\": \"dataValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/certificate/order" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "product_id" => "product_idValue",
        "csr" => "example.com",
        "years" => "yearsValue",
        "pay_method" => "pay_methodValue",
        "approver_email" => "approver_emailValue",
        "admin" => "adminValue",
        "tech" => "techValue",
        "billing" => "billingValue",
        "organization" => "organizationValue",
        "software" => "softwareValue",
        "data" => "dataValue"
    ]
]
$resp = $client->post('/certificate/order', $options);
echo $resp->getBody();
payload = {
    'product_id': "product_idValue",
    'csr': "example.com",
    'years': "yearsValue",
    'pay_method': "pay_methodValue",
    'approver_email': "approver_emailValue",
    'admin': "adminValue",
    'tech': "techValue",
    'billing': "billingValue",
    'organization': "organizationValue",
    'software': "softwareValue",
    'data': "dataValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/certificate/order', json=payload, headers=headers)
print(req.json())
Example Response:
{
    "order_num": 873340994,
    "invoice_id": "308978",
    "total": "27.85",
    "items": {
        "id": "10",
        "type": "Hosting",
        "name": "test.com",
        "product_id": "3"
    }
}

HTTP Request

POST /certificate/order

Query Parameters

Parameter Type Description
product_id int

Certificate product ID

csr string

Domain name

years int

Number of years

pay_method int

Payment method ID

approver_email string

Email addres used in domain validation

admin int

Admin contact ID

tech int

Tech contact ID

billing int

Billing contact ID

organization array

Organization details

software int

Server/Software ID

data array

Addditional data required for some products

List SSL Certificates

List all ssl services under your account


curl -X GET "https://manager.idcviettel.com/api/certificates" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/certificates');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/certificates', headers=headers)
print(req.json())

HTTP Request

GET /certificates

Services

List services

List all services under your account


curl -X GET "https://manager.idcviettel.com/api/service" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service', headers=headers)
print(req.json())
Example Response:
{
    "services": [
        {
            "id": "301",
            "domain": "examplename.com",
            "total": "9.99",
            "status": "Pending",
            "billingcycle": "Monthly",
            "next_due": "2017-12-30",
            "category": "Hosting",
            "category_url": "hosting",
            "name": "Starter Hosting"
        }
    ]
}

HTTP Request

GET /service

List service methods

List methods available for service


curl -X GET "https://manager.idcviettel.com/api/service/@id/methods" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/methods');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/methods', headers=headers)
print(req.json())
Example Response:
{
    "methods": [
        {
            "name": "Upgrade Request",
            "method": "POST",
            "route": "\/service\/@id\/upgrade"
        },
        {
            "name": "Upgrade Options",
            "method": "GET",
            "route": "\/service\/@id\/upgrade"
        },
        {
            "name": "Change service label",
            "method": "POST",
            "route": "\/service\/@id\/label"
        },
        {
            "name": "Service label",
            "method": "GET",
            "route": "\/service\/@id\/label"
        },
        {
            "name": "Cancel Service",
            "method": "POST",
            "route": "\/service\/@id\/cancel"
        }
    ]
}

HTTP Request

GET /service/@id/methods

Query Parameters

Parameter Type Description
id int

Upgrade Options

List upgrade options


curl -X GET "https://manager.idcviettel.com/api/service/@id/upgrade" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/upgrade');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/upgrade', headers=headers)
print(req.json())
Example Response:
{
    "resources": [
        {
            "id": 1557,
            "name": "Bandwidth",
            "type": "select",
            "items": [
                {
                    "id": "9953",
                    "name": "100 GB",
                    "price": 1,
                    "setup_price": 0,
                    "selected": true
                },
                {
                    "id": "10103",
                    "name": "500 GB",
                    "price": 5,
                    "setup_price": 0,
                    "selected": false
                },
                {
                    "id": "10104",
                    "name": "1 TB",
                    "price": 10,
                    "setup_price": 0,
                    "selected": false
                }
            ]
        }
    ],
    "package": []
}

HTTP Request

GET /service/@id/upgrade

Query Parameters

Parameter Type Description
id int

Upgrade Request

Estimate or request upgrade

// Format of ''resources'' paremeter
{
    "resource_id" : "qty_value", // sliders & qty fields
    "resource_id" : "item_id", // dropdown & radio fields
    "resource_id" : {
        "item_id": "qty_value" // dropdown with qty field
    }
}
POST_DATA="{
    \"resources\": \"resourcesValue\",
    \"package\": \"packageValue\",
    \"cycle\": \"cycleValue\",
    \"send\": \"sendValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/service/@id/upgrade" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "resources" => "resourcesValue",
        "package" => "packageValue",
        "cycle" => "cycleValue",
        "send" => "sendValue"
    ]
]
$resp = $client->post('/service/@id/upgrade', $options);
echo $resp->getBody();
payload = {
    'resources': "resourcesValue",
    'package': "packageValue",
    'cycle': "cycleValue",
    'send': "sendValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/service/@id/upgrade', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /service/@id/upgrade

Query Parameters

Parameter Type Description
id int

Service id

resources array

array with resource values

package int

New package id, optonal when upgrading resources

cycle string

New billing cycle, optonal when upgrading resources

send boolean

Set to true when you want to send your upgrade request

Cancel Service

Request service cancellation

POST_DATA="{
    \"immediate\": \"immediateValue\",
    \"reason\": \"reasonValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/service/@id/cancel" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "immediate" => "immediateValue",
        "reason" => "reasonValue"
    ]
]
$resp = $client->post('/service/@id/cancel', $options);
echo $resp->getBody();
payload = {
    'immediate': "immediateValue",
    'reason': "reasonValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/service/@id/cancel', json=payload, headers=headers)
print(req.json())
Example Response:
{
  "info": [
    "cancell_sent"
  ]
}

HTTP Request

POST /service/@id/cancel

Query Parameters

Parameter Type Description
id int

Service id

immediate string

set to false to terminate service at the end of billing date, true - terminate immediately

reason string

Reason for this request

Service label

Show current service label


curl -X GET "https://manager.idcviettel.com/api/service/@id/label" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/label');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/label', headers=headers)
print(req.json())
Example Response:
{
    "label": "example"
}

HTTP Request

GET /service/@id/label

Query Parameters

Parameter Type Description
id int

Service id

Change service label

Set new custom label to identify this service

POST_DATA="{
    \"label\": \"labelValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/service/@id/label" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "label" => "labelValue"
    ]
]
$resp = $client->post('/service/@id/label', $options);
echo $resp->getBody();
payload = {
    'label': "labelValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/service/@id/label', json=payload, headers=headers)
print(req.json())
Example Response:
{
    "success": true,
    "info": [
        "label_updated"
    ]
}

HTTP Request

POST /service/@id/label

Query Parameters

Parameter Type Description
id int

Service id

label string

New label

Service details

Return details for service @id


curl -X GET "https://manager.idcviettel.com/api/service/@id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id', headers=headers)
print(req.json())
Example Response:
{
    "service": {
        "id": "301",
        "date_created": "2016-12-30",
        "domain": "examplename.com",
        "firstpayment": "9.99",
        "total": "9.99",
        "billingcycle": "Monthly",
        "next_due": "2017-12-30",
        "next_invoice": "2017-01-27",
        "status": "Active",
        "label": "",
        "username": "examplen",
        "password": "pdtzc",
        "name": "Starter Hosting"
    }
}

HTTP Request

GET /service/@id

Query Parameters

Parameter Type Description
id int

Service id

List VMs

List virtual servers


curl -X GET "https://manager.idcviettel.com/api/service/@id/vms" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/vms');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/vms', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/vms

Query Parameters

Parameter Type Description
id int

Get VM Details

Get the details of a particular virtual server


curl -X GET "https://manager.idcviettel.com/api/service/@id/vms/@vmid" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/vms/@vmid');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/vms/@vmid', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

Create VM

Add new virtual server

POST_DATA="{
    \"label\": \"labelValue\",
    \"template\": \"templateValue\",
    \"memory\": \"memoryValue\",
    \"cpu\": \"cpuValue\",
    \"disk\": \"diskValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/service/@id/vms" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "label" => "labelValue",
        "template" => "templateValue",
        "memory" => "memoryValue",
        "cpu" => "cpuValue",
        "disk" => "diskValue"
    ]
]
$resp = $client->post('/service/@id/vms', $options);
echo $resp->getBody();
payload = {
    'label': "labelValue",
    'template': "templateValue",
    'memory': "memoryValue",
    'cpu': "cpuValue",
    'disk': "diskValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/service/@id/vms', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /service/@id/vms

Query Parameters

Parameter Type Description
id int
label string

VM label

template string

Template ID

memory string

Amount of RAM memory in MB

cpu string

Amount of CPU cores

disk string

Disk Space in GB

Destroy VM

Remove virtual server


curl -X DELETE "https://manager.idcviettel.com/api/service/@id/vms/@vmid" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->delete('/service/@id/vms/@vmid');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.delete('https://manager.idcviettel.com/api/service/@id/vms/@vmid', headers=headers)
print(req.json())

HTTP Request

DELETE /service/@id/vms/@vmid

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

Resize VM

Edit a virtual server

POST_DATA="{
    \"memory\": \"memoryValue\",
    \"cpu\": \"cpuValue\"
}"

curl -X PUT "https://manager.idcviettel.com/api/service/@id/vms/@vmid" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "memory" => "memoryValue",
        "cpu" => "cpuValue"
    ]
]
$resp = $client->put('/service/@id/vms/@vmid', $options);
echo $resp->getBody();
payload = {
    'memory': "memoryValue",
    'cpu': "cpuValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.put('https://manager.idcviettel.com/api/service/@id/vms/@vmid', json=payload, headers=headers)
print(req.json())

HTTP Request

PUT /service/@id/vms/@vmid

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

memory string

Amount of RAM in MB

cpu string

Amount of CPU cores

Stop VM

Stop virtual server


curl -X POST "https://manager.idcviettel.com/api/service/@id/vms/@vmid/stop" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->post('/service/@id/vms/@vmid/stop');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/service/@id/vms/@vmid/stop', headers=headers)
print(req.json())

HTTP Request

POST /service/@id/vms/@vmid/stop

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

Start VM

Start virtual servers


curl -X POST "https://manager.idcviettel.com/api/service/@id/vms/@vmid/start" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->post('/service/@id/vms/@vmid/start');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/service/@id/vms/@vmid/start', headers=headers)
print(req.json())

HTTP Request

POST /service/@id/vms/@vmid/start

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

Shutdown VM

Perform graceful shutdown


curl -X POST "https://manager.idcviettel.com/api/service/@id/vms/@vmid/shutdown" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->post('/service/@id/vms/@vmid/shutdown');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/service/@id/vms/@vmid/shutdown', headers=headers)
print(req.json())

HTTP Request

POST /service/@id/vms/@vmid/shutdown

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

Reboot VM

Reboot virtual servers


curl -X POST "https://manager.idcviettel.com/api/service/@id/vms/@vmid/reboot" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->post('/service/@id/vms/@vmid/reboot');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/service/@id/vms/@vmid/reboot', headers=headers)
print(req.json())

HTTP Request

POST /service/@id/vms/@vmid/reboot

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

Reset VM

Reset virtual servers power


curl -X POST "https://manager.idcviettel.com/api/service/@id/vms/@vmid/reset" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->post('/service/@id/vms/@vmid/reset');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/service/@id/vms/@vmid/reset', headers=headers)
print(req.json())

HTTP Request

POST /service/@id/vms/@vmid/reset

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

Rebuild VM

Rebuild server, you can get list of templates supported by this server using '''/service/$id/vms/$vmid/rebuild'''

POST_DATA="{
    \"template\": \"templateValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/service/@id/vms/@vmid/rebuild" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "template" => "templateValue"
    ]
]
$resp = $client->post('/service/@id/vms/@vmid/rebuild', $options);
echo $resp->getBody();
payload = {
    'template': "templateValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/service/@id/vms/@vmid/rebuild', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /service/@id/vms/@vmid/rebuild

Query Parameters

Parameter Type Description
id int
vmid int
template string

Template ID

List OS templates

List templates that can be used to create virtual server


curl -X GET "https://manager.idcviettel.com/api/service/@id/templates" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/templates');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/templates', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/templates

Query Parameters

Parameter Type Description
id int

Resources

Show available and used resources


curl -X GET "https://manager.idcviettel.com/api/service/@id/resources" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/resources');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/resources', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/resources

Query Parameters

Parameter Type Description
id int

IP Addresses

List Service IP Addresses


curl -X GET "https://manager.idcviettel.com/api/service/@id/ip" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/ip');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/ip', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/ip

Query Parameters

Parameter Type Description
id int

Service ID

Reverse DNS

Get reverse DNS entries for service's IP addresses


curl -X GET "https://manager.idcviettel.com/api/service/@id/rdns" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/rdns');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/rdns', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/rdns

Query Parameters

Parameter Type Description
id int

Service ID

Update rDNS

Update reverse DNS entries service's IP addresses

POST_DATA="{
    \"ipaddress\": \"ipaddressValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/service/@id/rdns" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "ipaddress" => "ipaddressValue"
    ]
]
$resp = $client->post('/service/@id/rdns', $options);
echo $resp->getBody();
payload = {
    'ipaddress': "ipaddressValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/service/@id/rdns', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /service/@id/rdns

Query Parameters

Parameter Type Description
id int

Service ID

ipaddress array

Use Ip address as parameter key and hostname as value

Get list services active

Get list services active


curl -X GET "https://manager.idcviettel.com/api/services/active" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/services/active');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/services/active', headers=headers)
print(req.json())

HTTP Request

GET /services/active

List services by category

List all services under your account by Category id.
filter[hide_terminated]=1 filter[hide_cancelled]=1 filter[hide_suspended]=1 filter[hide_fraud]=1 filter[status]=Active


curl -X GET "https://manager.idcviettel.com/api/services/@cid" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/services/@cid');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/services/@cid', headers=headers)
print(req.json())
Example Response:
 {
    "id": "278",
    "product_id": "10",
    "domain": "tranbinh11278",
    "label": "",
    "total": "580000.00",
    "status": "Active",
    "billingcycle": "Monthly",
    "next_due": "2023-04-30",
    "expires": "2023-04-30",
    "catname": "Cloud VN",
    "slug": "cloud-vn",
    "name": "Cloud VN #5",
    "parent_category_id": "12",
    "parent_category_name": "Cloud Server",
    "parent_category_slug": "12-cloud-server",
    "paytype": "Regular",
    "config": {
        "onboot": 1,
        "sockets": 1,
        "memory": 8192,
        "cpu": "host",
        "cores": "4",
        "cpulimit": 4,
        "cpuunits": "1600",
        "name": "tranbinh11278",
        "cipassword": "NCZD5Yy4",
        "agent": "1",
        "net0": "virtio=36:2b:d0:6b:5f:ca,bridge=vmbr108,firewall=1,rate=100",
        "description": "116.103.108.201",
        "scsi0": "template:302/base-302-disk-0.raw,size=120G"
    }
}

HTTP Request

GET /services/@cid

Query Parameters

Parameter Type Description
cid int

Category id, 0 to get all

List services widgets

List all services widgets


curl -X GET "https://manager.idcviettel.com/api/service/@id/widgets" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/widgets');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/widgets', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/widgets

Query Parameters

Parameter Type Description
id int

Service id

Get VM usage

Get the details of a particular virtual server


curl -X GET "https://manager.idcviettel.com/api/service/@id/vms/@vmid/usage" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/vms/@vmid/usage');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/vms/@vmid/usage', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid/usage

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

Get VM Traffic

Get the details of a particular virtual server


curl -X GET "https://manager.idcviettel.com/api/service/@id/vms/@vmid/traffic" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/vms/@vmid/traffic');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/vms/@vmid/traffic', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid/traffic

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

Get VM Backup

Get the details of a particular virtual server


curl -X GET "https://manager.idcviettel.com/api/service/@id/vms/@vmid/backup" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/vms/@vmid/backup');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/vms/@vmid/backup', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid/backup

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

Delete VM Backup

Get the details of a particular virtual server


curl -X DELETE "https://manager.idcviettel.com/api/service/@id/vms/@vmid/backup/@backupid" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->delete('/service/@id/vms/@vmid/backup/@backupid');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.delete('https://manager.idcviettel.com/api/service/@id/vms/@vmid/backup/@backupid', headers=headers)
print(req.json())

HTTP Request

DELETE /service/@id/vms/@vmid/backup/@backupid

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

backupid string

Backup id

Reset VM password


curl -X POST "https://manager.idcviettel.com/api/service/@id/vms/@vmid/resetpwd" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->post('/service/@id/vms/@vmid/resetpwd');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/service/@id/vms/@vmid/resetpwd', headers=headers)
print(req.json())

HTTP Request

POST /service/@id/vms/@vmid/resetpwd

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

Get cPanel Backup

Get the details of a particular virtual server


curl -X GET "https://manager.idcviettel.com/api/service/cpanel2/@id/backup" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/cpanel2/@id/backup');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/cpanel2/@id/backup', headers=headers)
print(req.json())

HTTP Request

GET /service/cpanel2/@id/backup

Query Parameters

Parameter Type Description
id int

Manual renew Service

Check if domain is available for registration. Returns status: "ok" if domain is available, empty response otherwise


curl -X POST "https://manager.idcviettel.com/api/service/@id/manualrenew" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->post('/service/@id/manualrenew');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/service/@id/manualrenew', headers=headers)
print(req.json())

HTTP Request

POST /service/@id/manualrenew

Query Parameters

Parameter Type Description
id string

VM Cpu Usage graph

Retuns html code that can be embedded in page


curl -X GET "https://manager.idcviettel.com/api/service/@id/vms/@vmid/usage/cpu" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/vms/@vmid/usage/cpu');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/vms/@vmid/usage/cpu', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid/usage/cpu

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

VM Network Usage graph

Retuns html code that can be embedded in page


curl -X GET "https://manager.idcviettel.com/api/service/@id/vms/@vmid/usage/net" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/vms/@vmid/usage/net');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/vms/@vmid/usage/net', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid/usage/net

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

VM Disk Usage graph

Retuns html code that can be embedded in page


curl -X GET "https://manager.idcviettel.com/api/service/@id/vms/@vmid/usage/disk" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/vms/@vmid/usage/disk');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/vms/@vmid/usage/disk', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid/usage/disk

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

List Disks attached to VM

Get the list of disks available for a particular virtual server


curl -X GET "https://manager.idcviettel.com/api/service/@id/vms/@vmid/storage" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/vms/@vmid/storage');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/vms/@vmid/storage', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid/storage

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

Resize Disk VM

Change disk size

POST_DATA="{
    \"size\": \"sizeValue\"
}"

curl -X PUT "https://manager.idcviettel.com/api/service/@id/vms/@vmid/storage/@diskid" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "size" => "sizeValue"
    ]
]
$resp = $client->put('/service/@id/vms/@vmid/storage/@diskid', $options);
echo $resp->getBody();
payload = {
    'size': "sizeValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.put('https://manager.idcviettel.com/api/service/@id/vms/@vmid/storage/@diskid', json=payload, headers=headers)
print(req.json())

HTTP Request

PUT /service/@id/vms/@vmid/storage/@diskid

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

diskid string

Disk ID

size int

the disk space in GB

List VM rebuild templates

RebuiList templates that can be used to rebuild virtual server


curl -X GET "https://manager.idcviettel.com/api/service/@id/templates/@vmid" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/templates/@vmid');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/templates/@vmid', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/templates/@vmid

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

List ISO images

List ISO images that can be attached to VM


curl -X GET "https://manager.idcviettel.com/api/service/@id/images" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/images');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/images', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/images

Query Parameters

Parameter Type Description
id int

Add ISO image

Add your own ISO image

POST_DATA="{
    \"label\": \"labelValue\",
    \"file_url\": \"file_urlValue\",
    \"min_memory\": \"min_memoryValue\",
    \"version\": \"versionValue\",
    \"os\": \"osValue\",
    \"distro\": \"distroValue\",
    \"virtualization\": \"virtualizationValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/service/@id/images" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "label" => "labelValue",
        "file_url" => "file_urlValue",
        "min_memory" => "min_memoryValue",
        "version" => "versionValue",
        "os" => "osValue",
        "distro" => "distroValue",
        "virtualization" => "virtualizationValue"
    ]
]
$resp = $client->post('/service/@id/images', $options);
echo $resp->getBody();
payload = {
    'label': "labelValue",
    'file_url': "file_urlValue",
    'min_memory': "min_memoryValue",
    'version': "versionValue",
    'os': "osValue",
    'distro': "distroValue",
    'virtualization': "virtualizationValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/service/@id/images', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /service/@id/images

Query Parameters

Parameter Type Description
id int
label string

Label for this ISO Image

file_url string

Url pointing to iso file

min_memory int

Minimum memory size in MB

version string

Version number

os string

Os type, use Windows, Linux or Freebsd

distro string

Distribution name

virtualization array

Supported virualization types, xen, kvm,kvm_virtio

List VM Network Interfaces

Get network Interfaces assigned to virtual servers


curl -X GET "https://manager.idcviettel.com/api/service/@id/vms/@vmid/interfaces" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/vms/@vmid/interfaces');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/vms/@vmid/interfaces', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid/interfaces

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

List Available IPs

List IPs that can be assigned to virtual srver


curl -X GET "https://manager.idcviettel.com/api/service/@id/vms/@vmid/interfaces/@iface/ips" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/vms/@vmid/interfaces/@iface/ips');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/vms/@vmid/interfaces/@iface/ips', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid/interfaces/@iface/ips

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

iface string

Network interface ID

List VM IPs

List IPs assigned to virtual server


curl -X GET "https://manager.idcviettel.com/api/service/@id/vms/@vmid/ips" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/vms/@vmid/ips');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/vms/@vmid/ips', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid/ips

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

Assign IP to VM

Add new ip to virtual server

POST_DATA="{
    \"ipid\": \"ipidValue\",
    \"interfaceid\": \"interfaceidValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/service/@id/vms/@vmid/ips" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "ipid" => "ipidValue",
        "interfaceid" => "interfaceidValue"
    ]
]
$resp = $client->post('/service/@id/vms/@vmid/ips', $options);
echo $resp->getBody();
payload = {
    'ipid': "ipidValue",
    'interfaceid': "interfaceidValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/service/@id/vms/@vmid/ips', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /service/@id/vms/@vmid/ips

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

ipid string

IP Address ID

interfaceid string

Network interface ID

Remove IP from VM

Unassign ip from virtual server


curl -X DELETE "https://manager.idcviettel.com/api/service/@id/vms/@vmid/ips/@ipid" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->delete('/service/@id/vms/@vmid/ips/@ipid');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.delete('https://manager.idcviettel.com/api/service/@id/vms/@vmid/ips/@ipid', headers=headers)
print(req.json())

HTTP Request

DELETE /service/@id/vms/@vmid/ips/@ipid

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

ipid string

IP Address ID

interfaceid string

Network interface ID

Reverse DNS

Get reverse DNS entries for VM IP addresses


curl -X GET "https://manager.idcviettel.com/api/service/@id/vms/@vmid/rdns" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/service/@id/vms/@vmid/rdns');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/service/@id/vms/@vmid/rdns', headers=headers)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid/rdns

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

Update rDNS

Update reverse DNS entries for VM IP addresses

POST_DATA="{
    \"ipaddress\": \"ipaddressValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/service/@id/vms/@vmid/rdns" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "ipaddress" => "ipaddressValue"
    ]
]
$resp = $client->post('/service/@id/vms/@vmid/rdns', $options);
echo $resp->getBody();
payload = {
    'ipaddress': "ipaddressValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/service/@id/vms/@vmid/rdns', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /service/@id/vms/@vmid/rdns

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

ipaddress string

Use Ip address as parameter key and hostname as value eg. '192.168.10.15' = 'hostname'

Rebuild Network

Rebuild the network for a particular virtual server

POST_DATA="{
    \"shutdown_type\": \"shutdown_typeValue\",
    \"force\": \"forceValue\",
    \"startup\": \"startupValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/service/@id/vms/@vmid/rebuild_network" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "shutdown_type" => "shutdown_typeValue",
        "force" => "forceValue",
        "startup" => "startupValue"
    ]
]
$resp = $client->post('/service/@id/vms/@vmid/rebuild_network', $options);
echo $resp->getBody();
payload = {
    'shutdown_type': "shutdown_typeValue",
    'force': "forceValue",
    'startup': "startupValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/service/@id/vms/@vmid/rebuild_network', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /service/@id/vms/@vmid/rebuild_network

Query Parameters

Parameter Type Description
id int
vmid string

Virtual server id

shutdown_type string

Virtual server id

force bool

Force reboot

startup bool

Required startup

Cart

Most of API methods found here will require service @id, you can lookup your service ids with /service method

List product categories

Return a list of product categories.


curl -X GET "https://manager.idcviettel.com/api/category" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/category');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/category', headers=headers)
print(req.json())
Example Response:
{
    "categories": [
        {
            "id": "10",
            "name": "Hosting",
            "description": "",
            "slug": "hosting"
        },
        {
            "id": "6",
            "name": "Domains",
            "description": "",
            "slug": "domains"
        },
        {
            "id": "16",
            "name": "Dedicated",
            "description": "",
            "slug": "dedicated"
        }
    ]
}

HTTP Request

GET /category

List products in category

Return a list of product available for purchase under requested category


curl -X GET "https://manager.idcviettel.com/api/category/@category_id/product" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/category/@category_id/product');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/category/@category_id/product', headers=headers)
print(req.json())
Example Response:
{
    "products": [
        {
            "id": "333",
            "type": "1",
            "name": "Starter Hosting",
            "stock": false,
            "paytype": "Regular",
            "description": "Disk:10GB
Memory:2GB
MySql:10 DB
Email:100 Users
", "qty": "0", "tags": [ ], "periods": [ { "title": "m", "value": "m", "price": 9.99, "setup": 0, "selected": true }, { "title": "a", "value": "a", "price": 109.89, "setup": 0, "selected": false }, { "title": "b", "value": "b", "price": 199.8, "setup": 0, "selected": false }, { "title": "t", "value": "t", "price": 299.7, "setup": 0, "selected": false } ] }, (...) ] }

HTTP Request

GET /category/@category_id/product

Query Parameters

Parameter Type Description
category_id int

Category ID

Get product configuration details

Return product details with form configuration, addons and subproducts if available.


curl -X GET "https://manager.idcviettel.com/api/order/@product_id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/order/@product_id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/order/@product_id', headers=headers)
print(req.json())
Example Response:
{
    "product": {
        "id": "333",
        "category_name": "Hosting",
        "category_id": "49",
        "name": "Starter Hosting",
        "price": 9.99,
        "recurring": "m",
        "setup": 0,
        "config": {
            "product": [
                {
                    "type": "select",
                    "title": "pickcycle",
                    "id": "cycle",
                    "name": "cycle",
                    "items": [
                        {
                            "title": "m",
                            "value": "m",
                            "price": 9.99,
                            "setup": 0,
                            "selected": true
                        },
                        {
                            "title": "a",
                            "value": "a",
                            "price": 109.89,
                            "setup": 0,
                            "selected": false
                        },
                        {
                            "title": "b",
                            "value": "b",
                            "price": 199.8,
                            "setup": 0,
                            "selected": false
                        },
                        {
                            "title": "t",
                            "value": "t",
                            "price": 299.7,
                            "setup": 0,
                            "selected": false
                        }
                    ],
                    "value": "m",
                    "price": 9.99,
                    "setup": 0
                },
                {
                    "type": "input",
                    "title": "domain",
                    "id": "domain",
                    "name": "domain",
                    "value": null
                }
            ],
            "forms": [
                {
                    "type": "select",
                    "title": "Disk Size",
                    "id": "1618",
                    "firstItemId": 10330,
                    "description": "",
                    "name": "custom[1618]",
                    "required": false,
                    "multiple": false,
                    "config": {
                        "conditionals": []
                    },
                    "value": [],
                    "textvalue": [],
                    "price": 0,
                    "recurring_price": 0,
                    "setup": 0,
                    "prorata_date": null,
                    "items": [
                        {
                            "title": "512MB",
                            "value": 1,
                            "id": 10330,
                            "price": 0,
                            "setup": 0,
                            "selected": false
                        },
                        {
                            "title": "1GB",
                            "value": 1,
                            "id": 10331,
                            "price": 0,
                            "setup": 0,
                            "selected": false
                        },
                        {
                            "title": "2GB",
                            "value": 1,
                            "id": 10332,
                            "price": 0,
                            "setup": 0,
                            "selected": false
                        }
                    ]
                },
                (...)
            ],
            "addons": [
                {
                    "type": "subitem",
                    "title": "Cpanel2: Add Extra IP",
                    "id": "31",
                    "value": null,
                    "description": "Automatically adds IP address to account",
                    "config": [
                        {
                            "type": "checkbox",
                            "title": "add",
                            "name": "addon[31]",
                            "checked": false
                        },
                        {
                            "type": "select",
                            "title": "billingcycle",
                            "name": "addon_cycles[31]",
                            "items": [
                                {
                                    "title": "m",
                                    "value": "m",
                                    "price": 5,
                                    "setup": 0,
                                    "selected": true
                                },
                                {
                                    "title": "q",
                                    "value": "q",
                                    "price": 20,
                                    "setup": 0,
                                    "selected": false
                                },
                                {
                                    "title": "a",
                                    "value": "a",
                                    "price": 50,
                                    "setup": 0,
                                    "selected": false
                                }
                            ]
                        }
                    ],
                    "price": 0,
                    "recurring_price": 0,
                    "setup": 0,
                    "prorata_date": null
                },
                (...)
            ],
            "subproducts": []
        },
        "recurring_price": 9.99,
        "prorata_date": null
    }
}

HTTP Request

GET /order/@product_id

Query Parameters

Parameter Type Description
product_id int

Product ID

Order new service

Create and submit new order for selected product.

To get available cycle and configuration options lookup product details using GET /order/@product_id

POST_DATA="{
    \"domain\": \"example.com\",
    \"cycle\": \"m\",
    \"pay_method\": \"1\",
    \"custom\": {
        \"1618\": {
            \"10330\": 1
        }
    },
    \"promocode\": \"T346F\"
}"

curl -X POST "https://manager.idcviettel.com/api/order/@product_id" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "domain" => "example.com",
        "cycle" => "m",
        "pay_method" => "1",
        "custom" => [
            1618 => [
                10330 => 1
            ]
        ],
        "promocode" => "T346F"
    ]
]);

$resp = $client->post('/order/@product_id', $options);
echo $resp->getBody();
payload = {
    'domain': "example.com",
    'cycle': "m",
    'pay_method': "1",
    'custom': {
        '1618': {
            '10330': 1
        }
    },
    'promocode': "T346F"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/order/@product_id', json=payload, headers=headers)
print(req.json())
Example Response:
{
    "order_num": 873340995,
    "invoice_id": "308979",
    "total": "9.99",
    "items": {
        "id": "10",
        "type": "Hosting",
        "name": "test.com",
        "product_id": "3"
    }
}

HTTP Request

POST /order/@product_id

Query Parameters

Parameter Type Description
product_id int

Product ID

domain string

Domain name, ie. example.com, may be optional

cycle string

Billing period symbol

pay_method int

Payment method ID

custom array

Additional options data available for sop products

promocode string

Promotion code

Get order quote

Calculate order cost and recurring prices for selected items. Use the same parameters as for POST /order

POST_DATA="{
    \"pay_method\": \"pay_methodValue\",
    \"output\": \"short\",
    \"items\": [
        {
            \"type\": \"product\",
            \"product_id\": 1080,
            \"domain\": \"hosting.com\",
            \"cycle\": \"a\"
        },
        {
            \"type\": \"certificate\",
            \"product_id\": 840,
            \"csr\": \"-----BEGIN CERTIFICATE REQUEST----- (...)\",
            \"years\": 1,
            \"approver_email\": \"admin@hosting.com\"
        }
    ]
}"

curl -X POST "https://manager.idcviettel.com/api/quote" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "pay_method" => "pay_methodValue",
        "output" => "short",
        "items" => [
            [
                "type" => "product",
                "product_id" => 1080,
                "domain" => "hosting.com",
                "cycle" => "a"
            ],
            [
                "type" => "certificate",
                "product_id" => 840,
                "csr" => "-----BEGIN CERTIFICATE REQUEST----- (...)",
                "years" => 1,
                "approver_email" => "admin@hosting.com"
            ]
        ]
    ]
]
$resp = $client->post('/quote', $options);
echo $resp->getBody();
payload = {
    'pay_method': "pay_methodValue",
    'output': "short",
    'items': [
        {
            'type': "product",
            'product_id': 1080,
            'domain': "hosting.com",
            'cycle': "a"
        },
        {
            'type': "certificate",
            'product_id': 840,
            'csr': "-----BEGIN CERTIFICATE REQUEST----- (...)",
            'years': 1,
            'approver_email': "admin@hosting.com"
        }
    ]
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/quote', json=payload, headers=headers)
print(req.json())
Example Response:
{
    "summary": {
        "subtotal": 72.2,
        "total": 88.81,
        "credit": 0,
        "discount": 0,
        "cost": 72.2,
        "recurring": [
            {
                "title": "Annually",
                "price": 81.18,
                "value": "a"
            },
            {
                "title": "Monthly",
                "price": 1.48,
                "value": "m"
            }
        ],
        "tax": [
            {
                "name": "VAT",
                "tax": 16.61,
                "value": 23
            }
        ]
    },
    "items": [
        {
            "product": {
                "id": 1080,
                "category_name": "SSL",
                "category_id": 69,
                "name": "GeoTrust QuickSSL Premium",
                "domain": "test.api",
                (...)
            },
            "domains": {
                (...)
            },
            "coupon": {},
            "index": 0,
            "valid": true,
            "info": [],
            "error": []
        },
        {
            "product": {
                "id": 840,
                "category_name": "Proxmox",
                "category_id": 19,
                "name": "VPS",
                "domain": "user.test.api",
                (...)
            },
            "domains": {
                (...)
            },
            "coupon": {},
            "index": 1,
            "valid": true,
            "info": [],
            "error": []
        },
        {
            "product": null,
            "domains": {
                "hosting.com": {
                    "id": 6,
                    "index": 0,
                    "category_id": "6",
                    "category_name": "Domains",
                    "name": "hosting.com",
                    "tld": ".com",
                    "period": 1,
                    "price": "12.00",
                    (...) 
                }
            },
            "coupon": {},
            "index": 2,
            "valid": true,
            "info": [],
            "error": []
        }
    ]
}

HTTP Request

POST /quote

Query Parameters

Parameter Type Description
pay_method int

Payment method ID

output string

Type of output, default is short. Possible options

  • short - Basic details about the item in cart
  • config- Basic details and form components
  • full - All details available in cart
items array

list with order items

Order multiple services

Create and submit new order for multiple services

Each item in the items array needs to include order type and parameters used by one of the method listed below:
POST /order/$product_id - use product for item type
POST /certificate/order - use certificate for item type

POST_DATA="{
    \"pay_method\": 1,
    \"ignore_errors\": \"No error\",
    \"items\": [
        {
            \"type\": \"product\",
            \"product_id\": 1080,
            \"domain\": \"hosting.com\",
            \"cycle\": \"a\"
        },
        {
            \"type\": \"certificate\",
            \"product_id\": 840,
            \"csr\": \"-----BEGIN CERTIFICATE REQUEST----- (...)\",
            \"years\": 1,
            \"approver_email\": \"admin@hosting.com\"
        }
    ]
}"

curl -X POST "https://manager.idcviettel.com/api/order" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "pay_method" => 1,
        "ignore_errors" => "No error",
        "items" => [
            [
                "type" => "product",
                "product_id" => 1080,
                "domain" => "hosting.com",
                "cycle" => "a"
            ],
            [
                "type" => "certificate",
                "product_id" => 840,
                "csr" => "-----BEGIN CERTIFICATE REQUEST----- (...)",
                "years" => 1,
                "approver_email" => "admin@hosting.com"
            ]
        ]
    ]
]
$resp = $client->post('/order', $options);
echo $resp->getBody();
payload = {
    'pay_method': 1,
    'ignore_errors': "No error",
    'items': [
        {
            'type': "product",
            'product_id': 1080,
            'domain': "hosting.com",
            'cycle': "a"
        },
        {
            'type': "certificate",
            'product_id': 840,
            'csr': "-----BEGIN CERTIFICATE REQUEST----- (...)",
            'years': 1,
            'approver_email': "admin@hosting.com"
        }
    ]
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/order', json=payload, headers=headers)
print(req.json())
Example Response:
{
    "order_num_list": [
        179534732,
        179534732,
        179534732
    ],
    "invoice_id": "503425",
    "total": "94.40",
    "items": [
        {
            "type": "Hosting",
            "id": "1025",
            "name": "hosting.com",
            "product_id": "1080"
        },
        {
            "type": "Hosting",
            "id": "1026",
            "name": "hosting.com",
            "product_id": "840"
        }
    ]
}

HTTP Request

POST /order

Query Parameters

Parameter Type Description
pay_method int

Payment method ID

ignore_errors bool

Process order even if some of the items were rejected due to errors

items array

list with order items

List product categories

Return a list of product categories.


curl -X GET "https://manager.idcviettel.com/api/categories" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
]);


$resp = $client->get('/categories');
echo $resp->getBody();


req = requests.get('https://manager.idcviettel.com/api/categories')
print(req.json())

HTTP Request

GET /categories

Language

List language

Return languages details


curl -X GET "https://manager.idcviettel.com/api/languages" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
]);


$resp = $client->get('/languages');
echo $resp->getBody();


req = requests.get('https://manager.idcviettel.com/api/languages')
print(req.json())

HTTP Request

GET /languages

Get Language File

List support tickets under my account


curl -X GET "https://manager.idcviettel.com/api/languages/file/@langname" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
]);


$resp = $client->get('/languages/file/@langname');
echo $resp->getBody();


req = requests.get('https://manager.idcviettel.com/api/languages/file/@langname')
print(req.json())

HTTP Request

GET /languages/file/@langname

Query Parameters

Parameter Type Description
langname string

lang name

Posts

Get list post sale

Get list post sale


curl -X GET "https://manager.idcviettel.com/api/post/sale" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
]);


$resp = $client->get('/post/sale');
echo $resp->getBody();


req = requests.get('https://manager.idcviettel.com/api/post/sale')
print(req.json())

HTTP Request

GET /post/sale

Get list recent post blog

Get list recent post blog


curl -X GET "https://manager.idcviettel.com/api/post/recent" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
]);


$resp = $client->get('/post/recent');
echo $resp->getBody();


req = requests.get('https://manager.idcviettel.com/api/post/recent')
print(req.json())

HTTP Request

GET /post/recent

Affiliate

Active Affiliate


curl -X POST "https://manager.idcviettel.com/api/affiliate/active" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->post('/affiliate/active');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/affiliate/active', headers=headers)
print(req.json())

HTTP Request

POST /affiliate/active

Affiliate Info


curl -X GET "https://manager.idcviettel.com/api/affiliate" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/affiliate');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/affiliate', headers=headers)
print(req.json())

HTTP Request

GET /affiliate

Affiliate Commission


curl -X GET "https://manager.idcviettel.com/api/affiliate/commission" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/affiliate/commission');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/affiliate/commission', headers=headers)
print(req.json())

HTTP Request

GET /affiliate/commission

Affiliate Payouts


curl -X GET "https://manager.idcviettel.com/api/affiliate/payouts" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/affiliate/payouts');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/affiliate/payouts', headers=headers)
print(req.json())

HTTP Request

GET /affiliate/payouts

Affiliate Vouchers


curl -X GET "https://manager.idcviettel.com/api/affiliate/vouchers" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/affiliate/vouchers');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/affiliate/vouchers', headers=headers)
print(req.json())

HTTP Request

GET /affiliate/vouchers

List Commision Plans


curl -X GET "https://manager.idcviettel.com/api/affiliate/plans" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/affiliate/plans');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/affiliate/plans', headers=headers)
print(req.json())

HTTP Request

GET /affiliate/plans

View Commision Plan


curl -X GET "https://manager.idcviettel.com/api/affiliate/plans/@id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/affiliate/plans/@id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/affiliate/plans/@id', headers=headers)
print(req.json())

HTTP Request

GET /affiliate/plans/@id

Query Parameters

Parameter Type Description
id int

Plan ID

Add Vouchers

POST_DATA="{
    \"plan\": \"planValue\",
    \"cycle\": \"cycleValue\",
    \"audience\": \"audienceValue\",
    \"max_usage_limit\": \"max_usage_limitValue\",
    \"max_usage\": \"max_usageValue\",
    \"expires\": \"expiresValue\",
    \"discount\": \"discountValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/affiliate/addvoucher" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "plan" => "planValue",
        "cycle" => "cycleValue",
        "audience" => "audienceValue",
        "max_usage_limit" => "max_usage_limitValue",
        "max_usage" => "max_usageValue",
        "expires" => "expiresValue",
        "discount" => "discountValue"
    ]
]
$resp = $client->post('/affiliate/addvoucher', $options);
echo $resp->getBody();
payload = {
    'plan': "planValue",
    'cycle': "cycleValue",
    'audience': "audienceValue",
    'max_usage_limit': "max_usage_limitValue",
    'max_usage': "max_usageValue",
    'expires': "expiresValue",
    'discount': "discountValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/affiliate/addvoucher', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /affiliate/addvoucher

Query Parameters

Parameter Type Description
plan int

Plan ID
Requested

cycle string

Voucher cycle
Requested

Available values: once, recurring.

audience string

Voucher audience

Available values: new, all, existing.

max_usage_limit boolean

max_usage_limit

max_usage string

max_usage

expires string

Expires Date

Value pattern: MM/DD/YYYY

discount string

Discount value

Available values: Min: 1, Max: Commission Rate.

Affiliate Delete Vouchers

POST_DATA="{
    \"id\": \"idValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/affiliate/removevoucher" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "id" => "idValue"
    ]
]
$resp = $client->post('/affiliate/removevoucher', $options);
echo $resp->getBody();
payload = {
    'id': "idValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/affiliate/removevoucher', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /affiliate/removevoucher

Query Parameters

Parameter Type Description
id int

Plan ID, Empty if get list plans

Security

List security


curl -X GET "https://manager.idcviettel.com/api/security" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('/security');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://manager.idcviettel.com/api/security', headers=headers)
print(req.json())

HTTP Request

GET /security

Add IP access

all - keyword matching all
IPs xxx.xxx.xxx.xxx - IP single
xxx.xxx.xxx.xxx/M - IP with Mask in CIDR format
xxx.xxx.xxx.xxx/mmm.mmm.mmm.mmm - IP with Mask in dotted quad format

POST_DATA="{
    \"rule\": \"10.10.10.10\/32\"
}"

curl -X POST "https://manager.idcviettel.com/api/security/ipaccess" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "rule" => "10.10.10.10/32"
    ]
]
$resp = $client->post('/security/ipaccess', $options);
echo $resp->getBody();
payload = {
    'rule': "10.10.10.10\/32"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/security/ipaccess', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /security/ipaccess

Query Parameters

Parameter Type Description
rule string

Rule Access

Remove IP access


curl -X DELETE "https://manager.idcviettel.com/api/security/ipaccess/@id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->delete('/security/ipaccess/@id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.delete('https://manager.idcviettel.com/api/security/ipaccess/@id', headers=headers)
print(req.json())

HTTP Request

DELETE /security/ipaccess/@id

Query Parameters

Parameter Type Description
id int

Rule id

Add SSH Key

POST_DATA="{
    \"ssh_key_name\": \"ssh_key_nameValue\",
    \"ssh_key_key\": \"ssh_key_keyValue\"
}"

curl -X POST "https://manager.idcviettel.com/api/security/sshkey" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "ssh_key_name" => "ssh_key_nameValue",
        "ssh_key_key" => "ssh_key_keyValue"
    ]
]
$resp = $client->post('/security/sshkey', $options);
echo $resp->getBody();
payload = {
    'ssh_key_name': "ssh_key_nameValue",
    'ssh_key_key': "ssh_key_keyValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/security/sshkey', json=payload, headers=headers)
print(req.json())

HTTP Request

POST /security/sshkey

Query Parameters

Parameter Type Description
ssh_key_name string

SSH Name

ssh_key_key string

SSh Key

Remove SSH Key

Đang test chưa xong


curl -X POST "https://manager.idcviettel.com/api/security/sshkey/@id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://manager.idcviettel.com/api',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->post('/security/sshkey/@id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://manager.idcviettel.com/api/security/sshkey/@id', headers=headers)
print(req.json())

HTTP Request

POST /security/sshkey/@id

Query Parameters

Parameter Type Description
id int

sshkey id