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://my.delta.bg/api/login' \
-d username="username"\
-d password="password"
# grab authentication token from the response and pass it in Authorization header
curl 'https://my.delta.bg/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://my.delta.bg/api/login', data=payload)
headers = {
'Authorization': 'Bearer ' + req.json().token
}
resp = requests.get('https://my.delta.bg/api/details', headers=headers)
print(resp)
Make sure to replace
username
andpassword
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://my.delta.bg/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://my.delta.bg/api/details' \
-u "username:password"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/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://my.delta.bg/api/details', auth=('username', 'password'))
print(req.json())
Make sure to replace
username
andpassword
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
Login
Generate new authorization token
POST_DATA="{
\"username\": \"user@example.com\",
\"password\": \"secret\"
}"
curl -X POST "https://my.delta.bg/api/login" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
]);
$options = [
'json' => [
"username" => "user@example.com",
"password" => "secret"
]
]
$resp = $client->post('login', $options);
echo $resp->getBody();
payload = {
'username': "user@example.com",
'password': "secret"
}
req = requests.post('https://my.delta.bg/api/login', json=payload)
print(req.json())
Example Response:
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHRw(...)5lZ9T79ft9uwOkqRRmIBbtR51_w",
"refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIzMD(...)ChwIAb3zvxBu6kvULa2AwAt9U-I"
}
HTTP Request
POST /login
Query Parameters
Parameter | Type | Description |
---|---|---|
username | string |
Your acount email address |
password | string |
Account password |
Logout
Invalidate authorization token
curl -X POST "https://my.delta.bg/api/logout" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->post('logout');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/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://my.delta.bg/api/token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
]);
$options = [
'json' => [
"refresh_token" => "refresh_tokenValue"
]
]
$resp = $client->post('token', $options);
echo $resp->getBody();
payload = {
'refresh_token': "refresh_tokenValue"
}
req = requests.post('https://my.delta.bg/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 |
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://my.delta.bg/api/revoke" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
]);
$options = [
'json' => [
"refresh_token" => "refresh_tokenValue"
]
]
$resp = $client->post('revoke', $options);
echo $resp->getBody();
payload = {
'refresh_token': "refresh_tokenValue"
}
req = requests.post('https://my.delta.bg/api/revoke', json=payload)
print(req.json())
Example Response:
{
"status": true
}
HTTP Request
POST /revoke
Query Parameters
Parameter | Type | Description |
---|---|---|
refresh_token | string |
Sign up
Create new account
POST_DATA="{
\"email\": \"emailValue\",
\"password\": \"passwordValue\",
\"firstname\": \"firstnameValue\",
\"lastname\": \"lastnameValue\",
\"address1\": \"address1Value\",
\"city\": \"cityValue\",
\"langstate2\": \"langstate2Value\",
\"postcode\": \"postcodeValue\",
\"country\": \"countryValue\",
\"phonenumber\": \"phonenumberValue\",
\"type\": \"typeValue\",
\"companyname\": \"companynameValue\",
\"companycity\": \"companycityValue\",
\"companyaddress\": \"companyaddressValue\",
\"companyvat\": \"companyvatValue\",
\"companypersonincharge\": \"companypersoninchargeValue\",
\"companydds\": \"companyddsValue\",
\"currency\": \"currencyValue\"
}"
curl -X POST "https://my.delta.bg/api/signup" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
]);
$options = [
'json' => [
"email" => "emailValue",
"password" => "passwordValue",
"firstname" => "firstnameValue",
"lastname" => "lastnameValue",
"address1" => "address1Value",
"city" => "cityValue",
"langstate2" => "langstate2Value",
"postcode" => "postcodeValue",
"country" => "countryValue",
"phonenumber" => "phonenumberValue",
"type" => "typeValue",
"companyname" => "companynameValue",
"companycity" => "companycityValue",
"companyaddress" => "companyaddressValue",
"companyvat" => "companyvatValue",
"companypersonincharge" => "companypersoninchargeValue",
"companydds" => "companyddsValue",
"currency" => "currencyValue"
]
]
$resp = $client->post('signup', $options);
echo $resp->getBody();
payload = {
'email': "emailValue",
'password': "passwordValue",
'firstname': "firstnameValue",
'lastname': "lastnameValue",
'address1': "address1Value",
'city': "cityValue",
'langstate2': "langstate2Value",
'postcode': "postcodeValue",
'country': "countryValue",
'phonenumber': "phonenumberValue",
'type': "typeValue",
'companyname': "companynameValue",
'companycity': "companycityValue",
'companyaddress': "companyaddressValue",
'companyvat': "companyvatValue",
'companypersonincharge': "companypersoninchargeValue",
'companydds': "companyddsValue",
'currency': "currencyValue"
}
req = requests.post('https://my.delta.bg/api/signup', json=payload)
print(req.json())
Example Response:
{
"info": [
"client_registered"
]
}
HTTP Request
POST /signup
Query Parameters
Parameter | Type | Description |
---|---|---|
string |
Email Address Required |
|
password | string |
Password Required |
firstname | string |
First Name Required |
lastname | string |
Last Name Required |
address1 | string |
Address 1 Required |
city | string |
City Required |
langstate2 | string |
Област Required |
postcode | string |
Post code Required |
country | string |
Country Required |
phonenumber | string |
Phone Required |
type | string |
Account Type
Available values:
|
companyname | string |
Organization Required for organization account |
companycity | string |
Град Required for organization account |
companyaddress | string |
Адрес Required for organization account |
companyvat | string |
Булстат Required for organization account |
companypersonincharge | string |
МОЛ Required for organization account |
companydds | string |
ЗДДС номер |
currency | string |
Currency
Available values:
|
Password Reset
Request password reset email for account
POST_DATA="{
\"email\": \"emailValue\"
}"
curl -X POST "https://my.delta.bg/api/passwordreset" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
]);
$options = [
'json' => [
"email" => "emailValue"
]
]
$resp = $client->post('passwordreset', $options);
echo $resp->getBody();
payload = {
'email': "emailValue"
}
req = requests.post('https://my.delta.bg/api/passwordreset', json=payload)
print(req.json())
Example Response:
{
"info": [
"generated_reset_request"
]
}
HTTP Request
POST /passwordreset
Query Parameters
Parameter | Type | Description |
---|---|---|
string |
EMail address |
User Details
Return registration details for my account
curl -X GET "https://my.delta.bg/api/details" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('details');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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
Update User Details
Update registration details under my account
POST_DATA="{
\"email\": \"emailValue\",
\"firstname\": \"firstnameValue\",
\"lastname\": \"lastnameValue\",
\"address1\": \"address1Value\",
\"city\": \"cityValue\",
\"langstate2\": \"langstate2Value\",
\"postcode\": \"postcodeValue\",
\"country\": \"countryValue\",
\"phonenumber\": \"phonenumberValue\",
\"type\": \"typeValue\",
\"companyname\": \"companynameValue\",
\"companycity\": \"companycityValue\",
\"companyaddress\": \"companyaddressValue\",
\"companyvat\": \"companyvatValue\",
\"companypersonincharge\": \"companypersoninchargeValue\",
\"companydds\": \"companyddsValue\"
}"
curl -X PUT "https://my.delta.bg/api/details" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"email" => "emailValue",
"firstname" => "firstnameValue",
"lastname" => "lastnameValue",
"address1" => "address1Value",
"city" => "cityValue",
"langstate2" => "langstate2Value",
"postcode" => "postcodeValue",
"country" => "countryValue",
"phonenumber" => "phonenumberValue",
"type" => "typeValue",
"companyname" => "companynameValue",
"companycity" => "companycityValue",
"companyaddress" => "companyaddressValue",
"companyvat" => "companyvatValue",
"companypersonincharge" => "companypersoninchargeValue",
"companydds" => "companyddsValue"
]
]
$resp = $client->put('details', $options);
echo $resp->getBody();
payload = {
'email': "emailValue",
'firstname': "firstnameValue",
'lastname': "lastnameValue",
'address1': "address1Value",
'city': "cityValue",
'langstate2': "langstate2Value",
'postcode': "postcodeValue",
'country': "countryValue",
'phonenumber': "phonenumberValue",
'type': "typeValue",
'companyname': "companynameValue",
'companycity': "companycityValue",
'companyaddress': "companyaddressValue",
'companyvat': "companyvatValue",
'companypersonincharge': "companypersoninchargeValue",
'companydds': "companyddsValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://my.delta.bg/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 |
---|---|---|
string |
Email Address |
|
firstname | string |
First Name |
lastname | string |
Last Name |
address1 | string |
Address 1 |
city | string |
City |
langstate2 | string |
Област |
postcode | string |
Post code |
country | string |
Country |
phonenumber | string |
Phone |
type | string |
Account Type
Available values:
|
companyname | string |
Organization |
companycity | string |
Град |
companyaddress | string |
Адрес |
companyvat | string |
Булстат |
companypersonincharge | string |
МОЛ |
companydds | string |
ЗДДС номер |
User Logs
Returns logs from history
curl -X GET "https://my.delta.bg/api/logs" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('logs');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/logs', headers=headers)
print(req.json())
HTTP Request
GET /logs
Get Affiliate summary
curl -X GET "https://my.delta.bg/api/affiliates/summary" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('affiliates/summary');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/affiliates/summary', headers=headers)
print(req.json())
HTTP Request
GET /affiliates/summary
Get Affiliate campaigns
curl -X GET "https://my.delta.bg/api/affiliates/campaigns" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('affiliates/campaigns');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/affiliates/campaigns', headers=headers)
print(req.json())
HTTP Request
GET /affiliates/campaigns
Get Affiliate commissions
curl -X GET "https://my.delta.bg/api/affiliates/commissions" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('affiliates/commissions');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/affiliates/commissions', headers=headers)
print(req.json())
HTTP Request
GET /affiliates/commissions
Get Affiliate payouts
curl -X GET "https://my.delta.bg/api/affiliates/payouts" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('affiliates/payouts');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/affiliates/payouts', headers=headers)
print(req.json())
HTTP Request
GET /affiliates/payouts
Get Affiliate vouchers
curl -X GET "https://my.delta.bg/api/affiliates/vouchers" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('affiliates/vouchers');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/affiliates/vouchers', headers=headers)
print(req.json())
HTTP Request
GET /affiliates/vouchers
Get Affiliate commission plans
curl -X GET "https://my.delta.bg/api/affiliates/commissionplans" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('affiliates/commissionplans');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/affiliates/commissionplans', headers=headers)
print(req.json())
HTTP Request
GET /affiliates/commissionplans
List contacts
Return a list of contacts on this account
curl -X GET "https://my.delta.bg/api/contact" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('contact');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/contact', headers=headers)
print(req.json())
Example Response:
{
"contacts": [
{
"email": "mary@example.com",
"id": "49",
"firstname": "Mary",
"lastname": "Sue",
"companyname": "",
"company": "0",
"lastlogin": "0000-00-00 00:00:00"
}
]
}
HTTP Request
GET /contact
Add contact
Create new contact account, if password is provided you can use provided email addres to login as that contact.
POST_DATA="{
\"password\": \"passwordValue\",
\"privileges\": \"privilegesValue\",
\"email\": \"emailValue\",
\"firstname\": \"firstnameValue\",
\"lastname\": \"lastnameValue\",
\"address1\": \"address1Value\",
\"city\": \"cityValue\",
\"langstate2\": \"langstate2Value\",
\"postcode\": \"postcodeValue\",
\"country\": \"countryValue\",
\"phonenumber\": \"phonenumberValue\",
\"type\": \"typeValue\",
\"companyname\": \"companynameValue\",
\"companycity\": \"companycityValue\",
\"companyaddress\": \"companyaddressValue\",
\"companyvat\": \"companyvatValue\",
\"companypersonincharge\": \"companypersoninchargeValue\",
\"companydds\": \"companyddsValue\"
}"
curl -X POST "https://my.delta.bg/api/contact" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"password" => "passwordValue",
"privileges" => "privilegesValue",
"email" => "emailValue",
"firstname" => "firstnameValue",
"lastname" => "lastnameValue",
"address1" => "address1Value",
"city" => "cityValue",
"langstate2" => "langstate2Value",
"postcode" => "postcodeValue",
"country" => "countryValue",
"phonenumber" => "phonenumberValue",
"type" => "typeValue",
"companyname" => "companynameValue",
"companycity" => "companycityValue",
"companyaddress" => "companyaddressValue",
"companyvat" => "companyvatValue",
"companypersonincharge" => "companypersoninchargeValue",
"companydds" => "companyddsValue"
]
]
$resp = $client->post('contact', $options);
echo $resp->getBody();
payload = {
'password': "passwordValue",
'privileges': "privilegesValue",
'email': "emailValue",
'firstname': "firstnameValue",
'lastname': "lastnameValue",
'address1': "address1Value",
'city': "cityValue",
'langstate2': "langstate2Value",
'postcode': "postcodeValue",
'country': "countryValue",
'phonenumber': "phonenumberValue",
'type': "typeValue",
'companyname': "companynameValue",
'companycity': "companycityValue",
'companyaddress': "companyaddressValue",
'companyvat': "companyvatValue",
'companypersonincharge': "companypersoninchargeValue",
'companydds': "companyddsValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/contact', json=payload, headers=headers)
print(req.json())
Example Response:
{
"contact_id": "1",
"info": [
"profile_added"
]
}
HTTP Request
POST /contact
Query Parameters
Parameter | Type | Description |
---|---|---|
password | string |
Optional, allows you to login as contact |
privileges | array |
Array with privileges that you want to enable. Formatted the same way as output from |
string |
Email Address |
|
firstname | string |
First Name |
lastname | string |
Last Name |
address1 | string |
Address 1 |
city | string |
City |
langstate2 | string |
Област |
postcode | string |
Post code |
country | string |
Country |
phonenumber | string |
Phone |
type | string |
Account Type
Available values:
|
companyname | string |
Organization |
companycity | string |
Град |
companyaddress | string |
Адрес |
companyvat | string |
Булстат |
companypersonincharge | string |
МОЛ |
companydds | string |
ЗДДС номер |
Contact privileges
List possible contact privileges.
Each domain and service may list additional privileges, depending on available features.
curl -X GET "https://my.delta.bg/api/contact/privileges" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('contact/privileges');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/contact/privileges', headers=headers)
print(req.json())
Example Response:
{
"privileges": {
"billing": [
"emails", // Receive billing notifications
"payinvoice", // Allow to view/pay invoices
"orders", // Allow to place new orders
"balance", // View account balance
"addfunds", // Add account funds
"creditcard" // Edit Credit Card details
],
"support": [
"newticket", // Open new tickets
"tickets", // View all tickets
"closeticket", // Close tickets
"emails" // Receive email notifications from support
],
"misc": [
"editmain", // Modify main profile details
"emails", // View emails history
"editipaccess", // Edit allowed IP access
"manageprofiles", // Add / Edit contacts
"affiliates" // Access affiliates section
],
"services": {
"full": 1, // Full control over services
"332": [
"basic", // View basic details
"billing", // View billing info
"cancelation", // Request cancellation
"upgrade", // Upgrade / Downgrade
"notify", // Receive related email notifications
(...)
"logindetails"
]
},
"domains": {
"full": 1, // Full control over domains
"523": [
"basic", // View basic details
"renew", // Renew domain
"notify", // Receive related email notifications
"contactinfo", // Contact Information
(...)
"nameservers" // Manage Nameservers
]
}
}
}
HTTP Request
GET /contact/privileges
Get contacts details
Return array with contact details
curl -X GET "https://my.delta.bg/api/contact/@id" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('contact/@id');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/contact/@id', headers=headers)
print(req.json())
Example Response:
{
"contact": {
"id": "49",
"email": "mary@example.com",
"firstname": "Mary",
"lastname": "Sue",
"companyname": "",
"address1": "Pretty View Lane",
"address2": "3194",
"city": "Santa Rosa",
"state": "California",
"postcode": "95401",
"country": "US",
"phonenumber": "+1.24123123",
"type": "Private",
"privileges" : {
"support" : ["tickets", "newticket"]
}
}
}
HTTP Request
GET /contact/@id
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Contact ID |
Edit contact
Change contact details`
POST_DATA="{
\"privileges\": \"privilegesValue\",
\"email\": \"emailValue\",
\"firstname\": \"firstnameValue\",
\"lastname\": \"lastnameValue\",
\"address1\": \"address1Value\",
\"city\": \"cityValue\",
\"langstate2\": \"langstate2Value\",
\"postcode\": \"postcodeValue\",
\"country\": \"countryValue\",
\"phonenumber\": \"phonenumberValue\",
\"type\": \"typeValue\",
\"companyname\": \"companynameValue\",
\"companycity\": \"companycityValue\",
\"companyaddress\": \"companyaddressValue\",
\"companyvat\": \"companyvatValue\",
\"companypersonincharge\": \"companypersoninchargeValue\",
\"companydds\": \"companyddsValue\"
}"
curl -X PUT "https://my.delta.bg/api/contact/@id" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"privileges" => "privilegesValue",
"email" => "emailValue",
"firstname" => "firstnameValue",
"lastname" => "lastnameValue",
"address1" => "address1Value",
"city" => "cityValue",
"langstate2" => "langstate2Value",
"postcode" => "postcodeValue",
"country" => "countryValue",
"phonenumber" => "phonenumberValue",
"type" => "typeValue",
"companyname" => "companynameValue",
"companycity" => "companycityValue",
"companyaddress" => "companyaddressValue",
"companyvat" => "companyvatValue",
"companypersonincharge" => "companypersoninchargeValue",
"companydds" => "companyddsValue"
]
]
$resp = $client->put('contact/@id', $options);
echo $resp->getBody();
payload = {
'privileges': "privilegesValue",
'email': "emailValue",
'firstname': "firstnameValue",
'lastname': "lastnameValue",
'address1': "address1Value",
'city': "cityValue",
'langstate2': "langstate2Value",
'postcode': "postcodeValue",
'country': "countryValue",
'phonenumber': "phonenumberValue",
'type': "typeValue",
'companyname': "companynameValue",
'companycity': "companycityValue",
'companyaddress': "companyaddressValue",
'companyvat': "companyvatValue",
'companypersonincharge': "companypersoninchargeValue",
'companydds': "companyddsValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://my.delta.bg/api/contact/@id', json=payload, headers=headers)
print(req.json())
Example Response:
{
"info": [
"profile_updated"
]
}
HTTP Request
PUT /contact/@id
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
privileges | array |
Array with privileges that you want to enable. Formatted the same way as output from |
string |
Email Address |
|
firstname | string |
First Name |
lastname | string |
Last Name |
address1 | string |
Address 1 |
city | string |
City |
langstate2 | string |
Област |
postcode | string |
Post code |
country | string |
Country |
phonenumber | string |
Phone |
type | string |
Account Type
Available values:
|
companyname | string |
Organization |
companycity | string |
Град |
companyaddress | string |
Адрес |
companyvat | string |
Булстат |
companypersonincharge | string |
МОЛ |
companydds | string |
ЗДДС номер |
List all portal notifications
Return a list of all portal notifications.
curl -X GET "https://my.delta.bg/api/notifications" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('notifications');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/api/notifications/new" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('notifications/new');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/api/notifications/@id/ack" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->put('notifications/@id/ack');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://my.delta.bg/api/notifications/@id/ack', headers=headers)
print(req.json())
HTTP Request
PUT /notifications/@id/ack
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Billing
Account balance
Get current account balance(unpaid invoices total), account credit
curl -X GET "https://my.delta.bg/api/balance" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('balance');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/api/invoice" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('invoice');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/api/invoice/@id" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('invoice/@id');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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://my.delta.bg/api/payment" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('payment');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/api/payment/fees" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('payment/fees');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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
Support
List Tickets
List support tickets under my account
curl -X GET "https://my.delta.bg/api/tickets" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('tickets');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/tickets', headers=headers)
print(req.json())
Example Response:
{
"tickets": [
{
"client_read": "1",
"ticket_number": "736633",
"date": "2016-12-30 12:48:13",
"deptname": "Billing",
"subject": "Lore Ipsum",
"status": "Open",
"lastreply": "2020-09-12 11:10:03"
}
]
}
HTTP Request
GET /tickets
Ticket details
Get ticket details, including all replies
curl -X GET "https://my.delta.bg/api/tickets/@number" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('tickets/@number');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/api/ticket/attachment/@file" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('ticket/attachment/@file');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/api/tickets" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/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://my.delta.bg/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://my.delta.bg/api/tickets/@number" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/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://my.delta.bg/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://my.delta.bg/api/tickets/@number/open" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->put('tickets/@number/open');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://my.delta.bg/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://my.delta.bg/api/tickets/@number/close" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->put('tickets/@number/close');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://my.delta.bg/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://my.delta.bg/api/ticket/departments" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('ticket/departments');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/ticket/departments', headers=headers)
print(req.json())
HTTP Request
GET /ticket/departments
Domains
List Domains
List domains under your account
curl -X GET "https://my.delta.bg/api/domain" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/domain', headers=headers)
print(req.json())
Example Response:
{
"domains": [
{
"id": "47",
"name": "testname.com",
"expires": "2017-12-30",
"recurring_amount": "15.00",
"date_created": "2016-12-30",
"status": "Active",
"period": "1",
"autorenew": "1",
"daytoexpire": "365"
}
]
}
HTTP Request
GET /domain
Domain details
Get domain details
curl -X GET "https://my.delta.bg/api/domain/@id" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/domain/@id', headers=headers)
print(req.json())
Example Response:
{
"details": {
"id": "47",
"name": "testname.com",
"date_created": "2016-12-30",
"firstpayment": "10.00",
"recurring_amount": "15.00",
"period": "1",
"expires": "2017-12-30",
"status": "Active",
"next_due": "2017-12-30",
"next_invoice": "2017-11-30",
"idprotection": "0",
"nameservers": [
"ns1.example.com",
"ns2.example.com",
"ns3.example.com",
"ns4.example.com"
],
"autorenew": "1"
}
}
HTTP Request
GET /domain/@id
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
Domain details by name
Get domain details by name
curl -X GET "https://my.delta.bg/api/domain/name/@name" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/name/@name');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/domain/name/@name', headers=headers)
print(req.json())
Example Response:
{
"details": [
{
"id": "47",
"name": "testname.com",
"date_created": "2016-12-30",
"firstpayment": "10.00",
"recurring_amount": "15.00",
"period": "1",
"expires": "2017-12-30",
"status": "Active",
"next_due": "2017-12-30",
"next_invoice": "2017-11-30",
"idprotection": "0",
"nameservers": [
"ns1.example.com",
"ns2.example.com",
"ns3.example.com",
"ns4.example.com"
],
"autorenew": "1"
},
{
"id": "48",
"name": "testname.com",
"date_created": "2016-05-30",
"firstpayment": "10.00",
"recurring_amount": "15.00",
"period": "1",
"expires": "2017-05-30",
"status": "Expired",
"next_due": "2017-05-30",
"next_invoice": "2017-04-30",
"idprotection": "0",
"nameservers": [
"ns1.example.com",
"ns2.example.com",
"ns3.example.com",
"ns4.example.com"
],
"autorenew": "1"
},
]
}
HTTP Request
GET /domain/name/@name
Query Parameters
Parameter | Type | Description |
---|---|---|
name | string |
Domain name |
Get domain nameservers
curl -X GET "https://my.delta.bg/api/domain/@id/ns" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/ns');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/domain/@id/ns', headers=headers)
print(req.json())
HTTP Request
GET /domain/@id/ns
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
Update domain nameservers
Change domain nameservers, if $nameservers
is left empty, default namesevers will be used
POST_DATA="{
\"nameservers\": \"nameserversValue\"
}"
curl -X PUT "https://my.delta.bg/api/domain/@id/ns" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"nameservers" => "nameserversValue"
]
]
$resp = $client->put('domain/@id/ns', $options);
echo $resp->getBody();
payload = {
'nameservers': "nameserversValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://my.delta.bg/api/domain/@id/ns', json=payload, headers=headers)
print(req.json())
Example Response:
{
"info": [
"success_changes_save"
]
}
HTTP Request
PUT /domain/@id/ns
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
nameservers | array |
List of nameservers to use |
Register domain nameservers
curl -X POST "https://my.delta.bg/api/domain/@id/reg" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->post('domain/@id/reg');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/domain/@id/reg', headers=headers)
print(req.json())
HTTP Request
POST /domain/@id/reg
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
DNS Records DNS Records
List DNS records
curl -X GET "https://my.delta.bg/api/domain/@id/dns" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/dns');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/domain/@id/dns', headers=headers)
print(req.json())
Example Response:
{
"records": [
{
"id": 1,
"name": "test",
"ttl": 0,
"priority": 0,
"type": "A",
"content": "100.100.10.1"
}
]
}
HTTP Request
GET /domain/@id/dns
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
Create DNS Records
Add a new DNS record
POST_DATA="{
\"name\": \"nameValue\",
\"type\": \"typeValue\",
\"priority\": \"priorityValue\",
\"content\": \"contentValue\"
}"
curl -X POST "https://my.delta.bg/api/domain/@id/dns" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"name" => "nameValue",
"type" => "typeValue",
"priority" => "priorityValue",
"content" => "contentValue"
]
]
$resp = $client->post('domain/@id/dns', $options);
echo $resp->getBody();
payload = {
'name': "nameValue",
'type': "typeValue",
'priority': "priorityValue",
'content': "contentValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/domain/@id/dns', json=payload, headers=headers)
print(req.json())
Example Response:
{
"info": [
"DNS Management updated successfully"
]
}
HTTP Request
POST /domain/@id/dns
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
name | string |
Reord name |
type | string |
Reord type |
priority | string |
Reord priority |
content | string |
Reord content eg. IP addres for A records |
Update DNS Records
Change a DNS record
POST_DATA="{
\"name\": \"nameValue\",
\"type\": \"typeValue\",
\"priority\": \"priorityValue\",
\"content\": \"contentValue\"
}"
curl -X PUT "https://my.delta.bg/api/domain/@id/dns/@index" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"name" => "nameValue",
"type" => "typeValue",
"priority" => "priorityValue",
"content" => "contentValue"
]
]
$resp = $client->put('domain/@id/dns/@index', $options);
echo $resp->getBody();
payload = {
'name': "nameValue",
'type': "typeValue",
'priority': "priorityValue",
'content': "contentValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://my.delta.bg/api/domain/@id/dns/@index', json=payload, headers=headers)
print(req.json())
Example Response:
{
"info": [
"DNS Management updated successfully"
]
}
HTTP Request
PUT /domain/@id/dns/@index
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
record_id | int |
Recod index |
name | string |
Record name |
type | string |
Record type |
priority | string |
Record priority |
content | string |
Record content eg. IP address for A records |
Remove DNS Records
Remove a DNS record
curl -X DELETE "https://my.delta.bg/api/domain/@id/dns/@index" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->delete('domain/@id/dns/@index');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.delete('https://my.delta.bg/api/domain/@id/dns/@index', headers=headers)
print(req.json())
Example Response:
{
"info": [
"DNS Management updated successfully"
]
}
HTTP Request
DELETE /domain/@id/dns/@index
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
record_id | int |
Recod index |
DNS Records Types
List supported records type
curl -X GET "https://my.delta.bg/api/domain/@id/dns/types" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/dns/types');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/domain/@id/dns/types', headers=headers)
print(req.json())
Example Response:
{
"types": [
"A",
"CNAME",
"URL",
"FRAME",
"MX",
"MXE",
"TXT"
]
}
HTTP Request
GET /domain/@id/dns/types
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
Get domain EPP Code
curl -X GET "https://my.delta.bg/api/domain/@id/epp" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/epp');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/domain/@id/epp', headers=headers)
print(req.json())
HTTP Request
GET /domain/@id/epp
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
Synchronize domain
curl -X GET "https://my.delta.bg/api/domain/@id/sync" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/sync');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/domain/@id/sync', headers=headers)
print(req.json())
HTTP Request
GET /domain/@id/sync
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
Get domain lock
curl -X GET "https://my.delta.bg/api/domain/@id/reglock" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/reglock');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/domain/@id/reglock', headers=headers)
print(req.json())
HTTP Request
GET /domain/@id/reglock
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
Update domain lock
curl -X PUT "https://my.delta.bg/api/domain/@id/reglock" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->put('domain/@id/reglock');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://my.delta.bg/api/domain/@id/reglock', headers=headers)
print(req.json())
HTTP Request
PUT /domain/@id/reglock
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
Update domain ID Protection
curl -X PUT "https://my.delta.bg/api/domain/@id/idprotection" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->put('domain/@id/idprotection');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://my.delta.bg/api/domain/@id/idprotection', headers=headers)
print(req.json())
HTTP Request
PUT /domain/@id/idprotection
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
Get domain contact info
curl -X GET "https://my.delta.bg/api/domain/@id/contact" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/contact');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/domain/@id/contact', headers=headers)
print(req.json())
HTTP Request
GET /domain/@id/contact
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
Update domain contact info
curl -X PUT "https://my.delta.bg/api/domain/@id/contact" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->put('domain/@id/contact');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://my.delta.bg/api/domain/@id/contact', headers=headers)
print(req.json())
HTTP Request
PUT /domain/@id/contact
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
Get email forwarding
curl -X GET "https://my.delta.bg/api/domain/@id/emforwarding" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/emforwarding');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/domain/@id/emforwarding', headers=headers)
print(req.json())
HTTP Request
GET /domain/@id/emforwarding
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
Update email forwarding
curl -X PUT "https://my.delta.bg/api/domain/@id/emforwarding" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->put('domain/@id/emforwarding');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://my.delta.bg/api/domain/@id/emforwarding', headers=headers)
print(req.json())
HTTP Request
PUT /domain/@id/emforwarding
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
Update domain forwarding
curl -X PUT "https://my.delta.bg/api/domain/@id/forwarding" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->put('domain/@id/forwarding');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://my.delta.bg/api/domain/@id/forwarding', headers=headers)
print(req.json())
HTTP Request
PUT /domain/@id/forwarding
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
Get domain autorenew
curl -X GET "https://my.delta.bg/api/domain/@id/autorenew" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/autorenew');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/domain/@id/autorenew', headers=headers)
print(req.json())
HTTP Request
GET /domain/@id/autorenew
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
Enable/disable domain autorenew
curl -X PUT "https://my.delta.bg/api/domain/@id/autorenew" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->put('domain/@id/autorenew');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://my.delta.bg/api/domain/@id/autorenew', headers=headers)
print(req.json())
HTTP Request
PUT /domain/@id/autorenew
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
Returns the available flags
curl -X GET "https://my.delta.bg/api/domain/@id/dnssec/flags" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/dnssec/flags');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/domain/@id/dnssec/flags', headers=headers)
print(req.json())
HTTP Request
GET /domain/@id/dnssec/flags
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
Returns the list of DNSSEC keys
curl -X GET "https://my.delta.bg/api/domain/@id/dnssec" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/dnssec');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/domain/@id/dnssec', headers=headers)
print(req.json())
HTTP Request
GET /domain/@id/dnssec
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
Adds the DNSSEC key
curl -X PUT "https://my.delta.bg/api/domain/@id/dnssec" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->put('domain/@id/dnssec');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://my.delta.bg/api/domain/@id/dnssec', headers=headers)
print(req.json())
HTTP Request
PUT /domain/@id/dnssec
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Domain id |
curl -X DELETE "https://my.delta.bg/api/domain/@id/dnssec/@key" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->delete('domain/@id/dnssec/@key');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.delete('https://my.delta.bg/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 |
Domain availability
Check if domain is available for registration. Returns status: "ok" if domain is available, empty response otherwise
POST_DATA="{
\"name\": \"example.com\"
}"
curl -X POST "https://my.delta.bg/api/domain/lookup" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"name" => "example.com"
]
]
$resp = $client->post('domain/lookup', $options);
echo $resp->getBody();
payload = {
'name': "example.com"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/domain/lookup', json=payload, headers=headers)
print(req.json())
Example Response:
{
"available": false,
"name": "example.com",
"premium": false,
"periods": [
{
"id": "6",
"period": "1",
"register": "10.00",
"transfer": "0.00",
"renew": "15.00",
"redemption": "40.00"
},
{
"id": "6",
"period": "2",
"register": "20.00",
"transfer": "20.00",
"renew": "20.00",
"redemption": "80.00"
}
]
}
HTTP Request
POST /domain/lookup
Query Parameters
Parameter | Type | Description |
---|---|---|
name | string |
Domain name |
Available TLDs
List TLDs available for registration and transfer
curl -X GET "https://my.delta.bg/api/domain/order" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/order');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/domain/order', headers=headers)
print(req.json())
Example Response:
{
"tlds": [
{
"id": "6",
"tld": ".com",
"periods": [
{
"period": "1",
"register": "10.00",
"transfer": "0.00",
"renew": "15.00",
"redemption": "40.00"
},
{
"period": "2",
"register": "20.00",
"transfer": "20.00",
"renew": "30.00",
"redemption": "80.00"
}
]
},
(...)
]
}
HTTP Request
GET /domain/order
Additinal data for TLD
Get additional forms required for some TLDs
curl -X GET "https://my.delta.bg/api/domain/order/@id/form" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/order/@id/form');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/domain/order/@id/form', headers=headers)
print(req.json())
Example Response:
{
"forms": [
{
"type": "domaindnssupport",
"title": "DNS Management",
"id": "1424",
"firstItemId": 9067,
"description": "",
"name": "custom[1424][9067]",
"required": false,
"multiple": false,
"config": {
"enableddefault": 0
},
"value": [],
"textvalue": [],
"price": 0,
"recurring_price": 0,
"setup": 0,
"prorata_date": null,
"items": [
{
"title": "",
"value": 1,
"id": 9067,
"price": 4,
"setup": 0,
"selected": false
}
]
},
{
"type": "select",
"title": "Language",
"id": "1755",
"firstItemId": 10952,
"description": "",
"name": "custom[1755]",
"required": false,
"multiple": false,
"config": {
"conditionals": []
},
"value": [],
"textvalue": [],
"price": 0,
"recurring_price": 0,
"setup": 0,
"prorata_date": null,
"items": [
{
"title": "AFR",
"value": 1,
"id": 10952,
"price": 0,
"setup": 0,
"selected": false
},
{
"title": "ALB",
"value": 1,
"id": 10953,
"price": 0,
"setup": 0,
"selected": false
},
(...)
]
}
]
}
HTTP Request
GET /domain/order/@id/form
Query Parameters
Parameter | Type | Description |
---|---|---|
tld_id | int |
TLD ID |
Order new domain
Create new order for a domain, please check if requested domain is available first, otherwise your order may get cancelled.
POST_DATA="{
\"name\": \"example.com\",
\"years\": \"yearsValue\",
\"action\": \"actionValue\",
\"tld_id\": \"tld_idValue\",
\"pay_method\": \"pay_methodValue\",
\"epp\": \"eppValue\",
\"nameservers\": \"nameserversValue\",
\"registrant\": \"registrantValue\",
\"admin\": \"adminValue\",
\"tech\": \"techValue\",
\"billing\": \"billingValue\",
\"data\": \"dataValue\",
\"aff_id\": 55
}"
curl -X POST "https://my.delta.bg/api/domain/order" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"name" => "example.com",
"years" => "yearsValue",
"action" => "actionValue",
"tld_id" => "tld_idValue",
"pay_method" => "pay_methodValue",
"epp" => "eppValue",
"nameservers" => "nameserversValue",
"registrant" => "registrantValue",
"admin" => "adminValue",
"tech" => "techValue",
"billing" => "billingValue",
"data" => "dataValue",
"aff_id" => 55
]
]
$resp = $client->post('domain/order', $options);
echo $resp->getBody();
payload = {
'name': "example.com",
'years': "yearsValue",
'action': "actionValue",
'tld_id': "tld_idValue",
'pay_method': "pay_methodValue",
'epp': "eppValue",
'nameservers': "nameserversValue",
'registrant': "registrantValue",
'admin': "adminValue",
'tech': "techValue",
'billing': "billingValue",
'data': "dataValue",
'aff_id': 55
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/domain/order', json=payload, headers=headers)
print(req.json())
Example Response:
{
"order_num": 563647679,
"invoice_id": "308977",
"total": "10.00",
"items": {
"id": "10",
"type": "Domain Register",
"name": "test.com",
"product_id": "3"
}
}
HTTP Request
POST /domain/order
Query Parameters
Parameter | Type | Description |
---|---|---|
name | string |
Domain name |
years | string |
Number of years |
action | string |
register|transfer |
tld_id | string |
TLD id |
pay_method | int |
Payment method ID |
epp | string |
EPP Transfer code, required when transfering some domains |
nameservers | array |
Optional array with 2 - 4 nameservers that you want to use |
registrant | int |
Optional contact ID to use for registrant contact this domain |
admin | int |
Optional contact ID to use for admin contact this domain |
tech | int |
Optional contact ID to use for tech contact this domain |
billing | int |
Optional contact ID to use for billing contact this domain |
data | array |
Addditional data required for some TLDs |
aff_id | int |
Affiliate ID |
Renew domain
Create new renew order for a domain, please check if requested domain is available first, otherwise your order may get cancelled.
POST_DATA="{
\"years\": \"yearsValue\",
\"pay_method\": \"pay_methodValue\"
}"
curl -X POST "https://my.delta.bg/api/domain/@id/renew" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"years" => "yearsValue",
"pay_method" => "pay_methodValue"
]
]
$resp = $client->post('domain/@id/renew', $options);
echo $resp->getBody();
payload = {
'years': "yearsValue",
'pay_method': "pay_methodValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/domain/@id/renew', json=payload, headers=headers)
print(req.json())
HTTP Request
POST /domain/@id/renew
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
years | string |
Number of years |
pay_method | int |
Payment method ID |
SSL Certificates
List SSL Certificates
List all ssl services under your account
curl -X GET "https://my.delta.bg/api/certificate" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('certificate');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/api/certificate/@id" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('certificate/@id');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/api/certificate/@id/crt" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('certificate/@id/crt');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/api/certificate/order" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('certificate/order');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/api/certificate/order/@product_id/software" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('certificate/order/@product_id/software');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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\",
\"aff_id\": 55
}"
curl -X POST "https://my.delta.bg/api/certificate/order" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/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",
"aff_id" => 55
]
]
$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",
'aff_id': 55
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/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 |
aff_id | int |
Affiliate ID |
Services
List services
List all services under your account
curl -X GET "https://my.delta.bg/api/service" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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
Service details
Return details for service @id
curl -X GET "https://my.delta.bg/api/service/@id" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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 service methods
List methods available for service
curl -X GET "https://my.delta.bg/api/service/@id/methods" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/methods');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/api/service/@id/upgrade" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/upgrade');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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 |
reason | string |
Reason for this request |
Service label
Show current service label
curl -X GET "https://my.delta.bg/api/service/@id/label" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/label');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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 |
Bandwidth Graph
Return base64 encoded images representing bandwidth usage for last day, week and month
curl -X GET "https://my.delta.bg/api/service/@id/bandwidth-graphs"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
]);
$resp = $client->get('service/@id/bandwidth-graphs');
echo $resp->getBody();
req = requests.get('https://my.delta.bg/api/service/@id/bandwidth-graphs')
print(req.json())
HTTP Request
GET /service/@id/bandwidth-graphs
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Bandwidth Usage
Return bandwidth usage and billing details
curl -X GET "https://my.delta.bg/api/service/@id/bandwidth"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
]);
$resp = $client->get('service/@id/bandwidth');
echo $resp->getBody();
req = requests.get('https://my.delta.bg/api/service/@id/bandwidth')
print(req.json())
HTTP Request
GET /service/@id/bandwidth
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
List VMs
List virtual servers
curl -X GET "https://my.delta.bg/api/service/@id/vms" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/vms');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/api/service/@id/vms/@vmid" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/vms/@vmid');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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_id\": \"template_idValue\",
\"password\": \"passwordValue\",
\"memory\": \"memoryValue\",
\"cpu\": \"cpuValue\",
\"cpu_share\": \"cpu_shareValue\",
\"disk\": \"diskValue\",
\"swap\": \"swapValue\",
\"note\": \"noteValue\",
\"license_key\": \"license_keyValue\",
\"license_type\": \"license_typeValue\"
}"
curl -X POST "https://my.delta.bg/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://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"label" => "labelValue",
"template_id" => "template_idValue",
"password" => "passwordValue",
"memory" => "memoryValue",
"cpu" => "cpuValue",
"cpu_share" => "cpu_shareValue",
"disk" => "diskValue",
"swap" => "swapValue",
"note" => "noteValue",
"license_key" => "license_keyValue",
"license_type" => "license_typeValue"
]
]
$resp = $client->post('service/@id/vms', $options);
echo $resp->getBody();
payload = {
'label': "labelValue",
'template_id': "template_idValue",
'password': "passwordValue",
'memory': "memoryValue",
'cpu': "cpuValue",
'cpu_share': "cpu_shareValue",
'disk': "diskValue",
'swap': "swapValue",
'note': "noteValue",
'license_key': "license_keyValue",
'license_type': "license_typeValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/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_id | string |
Template ID |
password | string |
Initial root password |
memory | string |
Amount of RAM memory in MB |
cpu | string |
Amount of CPU cores |
cpu_share | string |
Share percentage of CPU |
disk | string |
Disk Space in GB |
swap | string |
Swap Space in GB |
note | string |
Custom note |
license_key | string |
Type of os license: |
license_type | string |
The key of a license, required if you have selected own licensing type |
Destroy VM
Remove virtual server
curl -X DELETE "https://my.delta.bg/api/service/@id/vms/@vmid" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->delete('service/@id/vms/@vmid');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.delete('https://my.delta.bg/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\",
\"cpu_share\": \"cpu_shareValue\"
}"
curl -X PUT "https://my.delta.bg/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://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"memory" => "memoryValue",
"cpu" => "cpuValue",
"cpu_share" => "cpu_shareValue"
]
]
$resp = $client->put('service/@id/vms/@vmid', $options);
echo $resp->getBody();
payload = {
'memory': "memoryValue",
'cpu': "cpuValue",
'cpu_share': "cpu_shareValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://my.delta.bg/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 memory in MB |
cpu | string |
Amount of CPU cores |
cpu_share | string |
Share percentage of CPU |
Stop VM
Stop virtual server
curl -X POST "https://my.delta.bg/api/service/@id/vms/@vmid/stop" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->post('service/@id/vms/@vmid/stop');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/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://my.delta.bg/api/service/@id/vms/@vmid/start" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->post('service/@id/vms/@vmid/start');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/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 |
Reboot VM
Reboot virtual servers, you can optionally specify ISO image to buot from.
POST_DATA="{
\"iso\": \"isoValue\"
}"
curl -X POST "https://my.delta.bg/api/service/@id/vms/@vmid/reboot" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"iso" => "isoValue"
]
]
$resp = $client->post('service/@id/vms/@vmid/reboot', $options);
echo $resp->getBody();
payload = {
'iso': "isoValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/vms/@vmid/reboot', json=payload, 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 |
iso | string |
Optional ISO Image to boot from |
VM Cpu Usage graph
Retuns html code that can be embedded in page
curl -X GET "https://my.delta.bg/api/service/@id/vms/@vmid/usage/cpu" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/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://my.delta.bg/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://my.delta.bg/api/service/@id/vms/@vmid/usage/net" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/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://my.delta.bg/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://my.delta.bg/api/service/@id/vms/@vmid/usage/disk" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/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://my.delta.bg/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://my.delta.bg/api/service/@id/vms/@vmid/storage" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/vms/@vmid/storage');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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 |
Reset VM password
Reset root password for VM
curl -X POST "https://my.delta.bg/api/service/@id/vms/@vmid/resetpwd" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->post('service/@id/vms/@vmid/resetpwd');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/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 |
List VM rebuild templates
RebuiList templates that can be used to rebuild virtual server
curl -X GET "https://my.delta.bg/api/service/@id/templates/@vmid" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/templates/@vmid');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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 |
Rebuild VM
Rebuild server, you can get list of templates supported by this server using '''/service/$id/vms/$vmid/rebuild'''
POST_DATA="{
\"template\": \"templateValue\",
\"license_key\": \"license_keyValue\",
\"license_type\": \"license_typeValue\"
}"
curl -X POST "https://my.delta.bg/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://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"template" => "templateValue",
"license_key" => "license_keyValue",
"license_type" => "license_typeValue"
]
]
$resp = $client->post('service/@id/vms/@vmid/rebuild', $options);
echo $resp->getBody();
payload = {
'template': "templateValue",
'license_key': "license_keyValue",
'license_type': "license_typeValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/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 | string |
Virtual server id |
template | string |
Template ID |
license_key | string |
Type of os license: |
license_type | string |
The key of a license, required if you have selected own licensing type |
List OS templates
List templates that can be used to create virtual server
curl -X GET "https://my.delta.bg/api/service/@id/templates" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/templates');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/templates', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/templates
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
List ISO images
List ISO images that can be attached to VM
curl -X GET "https://my.delta.bg/api/service/@id/images" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/images');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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 |
distro | string |
Distribution name |
virtualization | array |
Supported virualization types, |
List VM Network Interfaces
Get network Interfaces assigned to virtual servers
curl -X GET "https://my.delta.bg/api/service/@id/vms/@vmid/interfaces" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/vms/@vmid/interfaces');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/api/service/@id/vms/@vmid/interfaces/@iface/ips" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/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://my.delta.bg/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://my.delta.bg/api/service/@id/vms/@vmid/ips" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/vms/@vmid/ips');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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://my.delta.bg/api/service/@id/vms/@vmid/ips/@ipid" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/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://my.delta.bg/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://my.delta.bg/api/service/@id/vms/@vmid/rdns" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/vms/@vmid/rdns');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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 |
Resources
Show available and used resources
curl -X GET "https://my.delta.bg/api/service/@id/resources" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/resources');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/resources', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/resources
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
List OS templates and recipes
Lists templates that can be installed on server.
Lists recipes that can be used for additional configuration, check
usablefor
key to find which templates are supported by recipe.
curl -X GET "https://my.delta.bg/api/service/@id/reinstall/templates" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/reinstall/templates');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/reinstall/templates', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/reinstall/templates
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Reinstall Status
Get reinstall operation status
curl -X GET "https://my.delta.bg/api/service/@id/reinstall" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/reinstall');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/reinstall', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/reinstall
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Reinstall
Start reinstall operation on a server
POST_DATA="{
\"hostname\": \"hostnameValue\",
\"template\": \"templateValue\",
\"recipe\": \"recipeValue\",
\"password\": \"passwordValue\"
}"
curl -X POST "https://my.delta.bg/api/service/@id/reinstall" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"hostname" => "hostnameValue",
"template" => "templateValue",
"recipe" => "recipeValue",
"password" => "passwordValue"
]
]
$resp = $client->post('service/@id/reinstall', $options);
echo $resp->getBody();
payload = {
'hostname': "hostnameValue",
'template': "templateValue",
'recipe': "recipeValue",
'password': "passwordValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/reinstall', json=payload, headers=headers)
print(req.json())
HTTP Request
POST /service/@id/reinstall
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
hostname | string |
New hostname for server |
template | string |
Template ID |
recipe | string |
Recipe ID [Optional] |
password | string |
New password for server [Optional, will be generated automatically if left empty] |
Cancel Diagnostics
Cancel this operation
curl -X POST "https://my.delta.bg/api/service/@id/diag/cancel" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->post('service/@id/diag/cancel');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/diag/cancel', headers=headers)
print(req.json())
HTTP Request
POST /service/@id/diag/cancel
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
List Diagnostics templates
List templates that can be used fr diagnostics operation
curl -X GET "https://my.delta.bg/api/service/@id/diag/templates" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/diag/templates');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/diag/templates', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/diag/templates
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Diagnostics Status
Show diagnostic operation status
curl -X GET "https://my.delta.bg/api/service/@id/diag" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/diag');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/diag', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/diag
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Run Diagnostics
Start new diagnostic operation
POST_DATA="{
\"template\": \"templateValue\",
\"clearhdd\": \"clearhddValue\",
\"fullhddclear\": \"fullhddclearValue\"
}"
curl -X POST "https://my.delta.bg/api/service/@id/diag" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"template" => "templateValue",
"clearhdd" => "clearhddValue",
"fullhddclear" => "fullhddclearValue"
]
]
$resp = $client->post('service/@id/diag', $options);
echo $resp->getBody();
payload = {
'template': "templateValue",
'clearhdd': "clearhddValue",
'fullhddclear': "fullhddclearValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/diag', json=payload, headers=headers)
print(req.json())
HTTP Request
POST /service/@id/diag
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
template | string |
Diagnostic Template ID |
clearhdd | bool |
Clear disks |
fullhddclear | bool |
Full hard drive erase ($clearhdd also has to be set to True) |
List Rescue templates
List templates that can be used start rescue operation
curl -X GET "https://my.delta.bg/api/service/@id/rescue/templates" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/rescue/templates');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/rescue/templates', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/rescue/templates
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Rescue Status
Show rescue operation status
curl -X GET "https://my.delta.bg/api/service/@id/rescue" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/rescue');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/rescue', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/rescue
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Rescue
Start rescue operation on a server
POST_DATA="{
\"template\": \"templateValue\",
\"password\": \"passwordValue\"
}"
curl -X POST "https://my.delta.bg/api/service/@id/rescue" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"template" => "templateValue",
"password" => "passwordValue"
]
]
$resp = $client->post('service/@id/rescue', $options);
echo $resp->getBody();
payload = {
'template': "templateValue",
'password': "passwordValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/rescue', json=payload, headers=headers)
print(req.json())
HTTP Request
POST /service/@id/rescue
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
template | string |
Rescue Template ID |
password | string |
Password for rescue operation |
Cancel Rescue
Cancel rescue operation
curl -X POST "https://my.delta.bg/api/service/@id/rescue/cancel" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->post('service/@id/rescue/cancel');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/rescue/cancel', headers=headers)
print(req.json())
HTTP Request
POST /service/@id/rescue/cancel
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Server Info
Get server hardware and os details
curl -X GET "https://my.delta.bg/api/service/@id/info" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/info');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/info', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/info
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Update Hostname
Update server hostname
POST_DATA="{
\"hostname\": \"hostnameValue\"
}"
curl -X POST "https://my.delta.bg/api/service/@id/hostname" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"hostname" => "hostnameValue"
]
]
$resp = $client->post('service/@id/hostname', $options);
echo $resp->getBody();
payload = {
'hostname': "hostnameValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/hostname', json=payload, headers=headers)
print(req.json())
HTTP Request
POST /service/@id/hostname
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
hostname | string |
New Hostname |
List IPs
List server ips
curl -X GET "https://my.delta.bg/api/service/@id/ips" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/ips');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/ips', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/ips
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
List VLANs
List available VLANs
curl -X GET "https://my.delta.bg/api/service/@id/vlans" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/vlans');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/vlans', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/vlans
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Add IP
Add new ip to server
POST_DATA="{
\"vlan\": \"vlanValue\",
\"domain\": \"domainValue\",
\"num\": \"numValue\"
}"
curl -X POST "https://my.delta.bg/api/service/@id/ips" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"vlan" => "vlanValue",
"domain" => "domainValue",
"num" => "numValue"
]
]
$resp = $client->post('service/@id/ips', $options);
echo $resp->getBody();
payload = {
'vlan': "vlanValue",
'domain': "domainValue",
'num': "numValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/ips', json=payload, headers=headers)
print(req.json())
HTTP Request
POST /service/@id/ips
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
vlan | string |
VLAN ID |
domain | string |
IP Domain |
num | string |
Number of IPs to add [Optional] |
IP Details
Get details about IP
curl -X GET "https://my.delta.bg/api/service/@id/ips/@ip" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/ips/@ip');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/ips/@ip', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/ips/@ip
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
ip | string |
IP Address ID |
Edit IP
Update IP domain
POST_DATA="{
\"domain\": \"domainValue\"
}"
curl -X POST "https://my.delta.bg/api/service/@id/ips/@ip" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"domain" => "domainValue"
]
]
$resp = $client->post('service/@id/ips/@ip', $options);
echo $resp->getBody();
payload = {
'domain': "domainValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/ips/@ip', json=payload, headers=headers)
print(req.json())
HTTP Request
POST /service/@id/ips/@ip
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
ip | string |
IP Address ID |
domain | string |
Domain name |
Delete IP
Remove IP from server
curl -X DELETE "https://my.delta.bg/api/service/@id/ips/@ip" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->delete('service/@id/ips/@ip');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.delete('https://my.delta.bg/api/service/@id/ips/@ip', headers=headers)
print(req.json())
HTTP Request
DELETE /service/@id/ips/@ip
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
ip | string |
IP Address ID |
Reboot
Request server reboot
curl -X POST "https://my.delta.bg/api/service/@id/reboot" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->post('service/@id/reboot');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/reboot', headers=headers)
print(req.json())
HTTP Request
POST /service/@id/reboot
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Power OFF
Power off server
curl -X POST "https://my.delta.bg/api/service/@id/poweroff" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->post('service/@id/poweroff');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/poweroff', headers=headers)
print(req.json())
HTTP Request
POST /service/@id/poweroff
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Power ON
Power on server
curl -X POST "https://my.delta.bg/api/service/@id/poweron" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->post('service/@id/poweron');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/poweron', headers=headers)
print(req.json())
HTTP Request
POST /service/@id/poweron
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
IP Addresses
List Service IP Addresses
curl -X GET "https://my.delta.bg/api/service/@id/ip" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/ip');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/api/service/@id/rdns" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/rdns');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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://my.delta.bg/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 |
PDU ports
List PDU ports assigned to service
curl -X GET "https://my.delta.bg/api/service/@id/pdu"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
]);
$resp = $client->get('service/@id/pdu');
echo $resp->getBody();
req = requests.get('https://my.delta.bg/api/service/@id/pdu')
print(req.json())
HTTP Request
GET /service/@id/pdu
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Service id |
PDU Port state
Get PDU port/outlet state
curl -X GET "https://my.delta.bg/api/service/@id/pdu/@port"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
]);
$resp = $client->get('service/@id/pdu/@port');
echo $resp->getBody();
req = requests.get('https://my.delta.bg/api/service/@id/pdu/@port')
print(req.json())
HTTP Request
GET /service/@id/pdu/@port
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Service id |
port | int |
Port id |
Set PDU port status
Set PDU port/outlet state
POST_DATA="{
\"power\": \"powerValue\"
}"
curl -X POST "https://my.delta.bg/api/service/@id/pdu/@port" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
]);
$options = [
'json' => [
"power" => "powerValue"
]
]
$resp = $client->post('service/@id/pdu/@port', $options);
echo $resp->getBody();
payload = {
'power': "powerValue"
}
req = requests.post('https://my.delta.bg/api/service/@id/pdu/@port', json=payload)
print(req.json())
HTTP Request
POST /service/@id/pdu/@port
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Service id |
port | int |
Port id |
power | bool |
Desired power state - 'true' for ON or 'false' for OFF |
VM Memory Usage graph
Retuns base64 encoded png image
curl -X GET "https://my.delta.bg/api/service/@id/vms/@vmid/usage/memory" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/vms/@vmid/usage/memory');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/vms/@vmid/usage/memory', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/vms/@vmid/usage/memory
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
vmid | string |
Virtual server id |
List ISO images
List ISO images for a virtual server
curl -X GET "https://my.delta.bg/api/service/@id/vms/@vmid/images" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/vms/@vmid/images');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/vms/@vmid/images', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/vms/@vmid/images
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
vmid | string |
Virtual server id |
Mount ISO image
Mount or Unmount ISO image for a virtual server
POST_DATA="{
\"image\": \"imageValue\"
}"
curl -X POST "https://my.delta.bg/api/service/@id/vms/@vmid/images" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"image" => "imageValue"
]
]
$resp = $client->post('service/@id/vms/@vmid/images', $options);
echo $resp->getBody();
payload = {
'image': "imageValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/vms/@vmid/images', json=payload, headers=headers)
print(req.json())
HTTP Request
POST /service/@id/vms/@vmid/images
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
vmid | string |
Virtual server id |
image | string |
ISO Image name, leave empty to unmount images |
Boot Order
Change Boot order
//Possible options for $order parameter
"cd" // (1) Hard Disk (2) CDROM
"dc" // (1) CDROM (2) Hard Disk
"c" // Hard Disk Only
"d" // CDROM Only
POST_DATA="{
\"order\": \"orderValue\"
}"
curl -X POST "https://my.delta.bg/api/service/@id/vms/@vmid/boot" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"order" => "orderValue"
]
]
$resp = $client->post('service/@id/vms/@vmid/boot', $options);
echo $resp->getBody();
payload = {
'order': "orderValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/vms/@vmid/boot', json=payload, headers=headers)
print(req.json())
HTTP Request
POST /service/@id/vms/@vmid/boot
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
vmid | string |
Virtual server id |
order | string |
Boot order option |
Enable PXE
POST_DATA="{
\"state\": \"stateValue\"
}"
curl -X POST "https://my.delta.bg/api/service/@id/vms/@vmid/tuntap" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"state" => "stateValue"
]
]
$resp = $client->post('service/@id/vms/@vmid/tuntap', $options);
echo $resp->getBody();
payload = {
'state': "stateValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/vms/@vmid/tuntap', json=payload, headers=headers)
print(req.json())
HTTP Request
POST /service/@id/vms/@vmid/tuntap
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
vmid | string |
Virtual server id |
state | bool |
on/off |
Horizon login
Horizon login
curl -X GET "https://my.delta.bg/api/service/@id/horizonlogin" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/horizonlogin');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/horizonlogin', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/horizonlogin
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Instance image information
Instance image information
curl -X GET "https://my.delta.bg/api/service/@id/image" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/image');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/image', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/image
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
List available images
List available images
curl -X GET "https://my.delta.bg/api/service/@id/imagelist" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/imagelist');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/imagelist', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/imagelist
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Shutdown instance
Shutdown instance
curl -X POST "https://my.delta.bg/api/service/@id/stop" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->post('service/@id/stop');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/stop', headers=headers)
print(req.json())
HTTP Request
POST /service/@id/stop
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Boot instance
Boot instance
curl -X POST "https://my.delta.bg/api/service/@id/start" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->post('service/@id/start');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/start', headers=headers)
print(req.json())
HTTP Request
POST /service/@id/start
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Instance console
Instance console
curl -X GET "https://my.delta.bg/api/service/@id/vnc" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/vnc');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/vnc', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/vnc
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Reset instance password
Reset instance password
curl -X POST "https://my.delta.bg/api/service/@id/resetpassword" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->post('service/@id/resetpassword');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/resetpassword', headers=headers)
print(req.json())
HTTP Request
POST /service/@id/resetpassword
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Instance billing password
Instance billing password
curl -X GET "https://my.delta.bg/api/service/@id/password" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/password');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/password', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/password
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Boot instance into normal mode
Boot instance into normal mode
curl -X POST "https://my.delta.bg/api/service/@id/unrescue" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->post('service/@id/unrescue');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/unrescue', headers=headers)
print(req.json())
HTTP Request
POST /service/@id/unrescue
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Usage statistics
Usage statistics
POST_DATA="{
\"type\": \"typeValue\",
\"resource_id\": \"resource_idValue\",
\"last\": \"lastValue\"
}"
curl -X POST "https://my.delta.bg/api/service/@id/usage" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"type" => "typeValue",
"resource_id" => "resource_idValue",
"last" => "lastValue"
]
]
$resp = $client->post('service/@id/usage', $options);
echo $resp->getBody();
payload = {
'type': "typeValue",
'resource_id': "resource_idValue",
'last': "lastValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/usage', json=payload, headers=headers)
print(req.json())
HTTP Request
POST /service/@id/usage
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
type | string |
|
resource_id | int |
|
last | string |
List usage groups
List usage groups
curl -X GET "https://my.delta.bg/api/service/@id/usagegroups" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/usagegroups');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/usagegroups', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/usagegroups
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Rebuild instance
Rebuild instance
POST_DATA="{
\"image_id\": \"image_idValue\"
}"
curl -X POST "https://my.delta.bg/api/service/@id/rebuild" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"image_id" => "image_idValue"
]
]
$resp = $client->post('service/@id/rebuild', $options);
echo $resp->getBody();
payload = {
'image_id': "image_idValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/rebuild', json=payload, headers=headers)
print(req.json())
HTTP Request
POST /service/@id/rebuild
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
image_id | string |
Migrate options
Migrate options
POST_DATA="{
\"preserve\": \"preserveValue\",
\"donotstart\": \"donotstartValue\",
\"preservedip\": \"preservedipValue\"
}"
curl -X POST "https://my.delta.bg/api/service/@id/migrate" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"preserve" => "preserveValue",
"donotstart" => "donotstartValue",
"preservedip" => "preservedipValue"
]
]
$resp = $client->post('service/@id/migrate', $options);
echo $resp->getBody();
payload = {
'preserve': "preserveValue",
'donotstart': "donotstartValue",
'preservedip': "preservedipValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/migrate', json=payload, headers=headers)
print(req.json())
HTTP Request
POST /service/@id/migrate
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
preserve | string |
|
donotstart | string |
|
preservedip | string |
List Security groups
List Security groups
curl -X GET "https://my.delta.bg/api/service/@id/listsecuritygroups" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/listsecuritygroups');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/listsecuritygroups', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/listsecuritygroups
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
List network ports
List network ports
curl -X GET "https://my.delta.bg/api/service/@id/listnetworkports" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/listnetworkports');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/listnetworkports', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/listnetworkports
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Update network ports
Update network ports
POST_DATA="{
\"port\": \"portValue\",
\"security_groups\": \"security_groupsValue\"
}"
curl -X POST "https://my.delta.bg/api/service/@id/updatenetworkports" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"port" => "portValue",
"security_groups" => "security_groupsValue"
]
]
$resp = $client->post('service/@id/updatenetworkports', $options);
echo $resp->getBody();
payload = {
'port': "portValue",
'security_groups': "security_groupsValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@id/updatenetworkports', json=payload, headers=headers)
print(req.json())
HTTP Request
POST /service/@id/updatenetworkports
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
|
port | string |
|
security_groups | string |
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://my.delta.bg/api/category" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('category');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/api/category/@category_id/product" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('category/@category_id/product');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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://my.delta.bg/api/order/@product_id" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('order/@product_id');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/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\",
\"aff_id\": 55
}"
curl -X POST "https://my.delta.bg/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://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"domain" => "example.com",
"cycle" => "m",
"pay_method" => "1",
"custom" => [
1618 => [
10330 => 1
]
],
"promocode" => "T346F",
"aff_id" => 55
]
]);
$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",
'aff_id': 55
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/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 |
aff_id | int |
Affiliate ID |
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 /domain/order
- use domain
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\"
},
{
\"type\": \"domain\",
\"tld_id\": 6,
\"name\": \"hosting.com\",
\"action\": \"register\",
\"years\": 1
},
{
\"type\": \"domain\",
\"domain_id\": 1002,
\"action\": \"renew\",
\"years\": 1
}
],
\"aff_id\": 55
}"
curl -X POST "https://my.delta.bg/api/order" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/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"
],
[
"type" => "domain",
"tld_id" => 6,
"name" => "hosting.com",
"action" => "register",
"years" => 1
],
[
"type" => "domain",
"domain_id" => 1002,
"action" => "renew",
"years" => 1
]
],
"aff_id" => 55
]
]
$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"
},
{
'type': "domain",
'tld_id': 6,
'name': "hosting.com",
'action': "register",
'years': 1
},
{
'type': "domain",
'domain_id': 1002,
'action': "renew",
'years': 1
}
],
'aff_id': 55
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/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"
},
{
"type": "Domain Register",
"id": "354",
"name": "hosting.com",
"product_id": "6"
}
]
}
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 |
aff_id | int |
Affiliate ID |
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\"
},
{
\"type\": \"domain\",
\"tld_id\": 6,
\"name\": \"hosting.com\",
\"action\": \"register\",
\"years\": 1
},
{
\"type\": \"domain\",
\"domain_id\": 1002,
\"action\": \"renew\",
\"years\": 1
}
]
}"
curl -X POST "https://my.delta.bg/api/quote" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/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"
],
[
"type" => "domain",
"tld_id" => 6,
"name" => "hosting.com",
"action" => "register",
"years" => 1
],
[
"type" => "domain",
"domain_id" => 1002,
"action" => "renew",
"years" => 1
]
]
]
]
$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"
},
{
'type': "domain",
'tld_id': 6,
'name': "hosting.com",
'action': "register",
'years': 1
},
{
'type': "domain",
'domain_id': 1002,
'action': "renew",
'years': 1
}
]
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/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
|
items | array |
list with order items |
Get server state
Return details about server power state
curl -X GET "https://my.delta.bg/api/service/@id/status" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@id/status');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@id/status', headers=headers)
print(req.json())
HTTP Request
GET /service/@id/status
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
List Servers In-stock
List products with number of available servers
curl -X GET "https://my.delta.bg/api/serverstock" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('serverstock');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/serverstock', headers=headers)
print(req.json())
HTTP Request
GET /serverstock
List Servers In-stock per category
Checks the stock status of dedicated servers.
curl -X GET "https://my.delta.bg/api/serverstockcategory" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('serverstockcategory');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/serverstockcategory', headers=headers)
print(req.json())
HTTP Request
GET /serverstockcategory
DNS
List DNS
Returns a list of all DNS
curl -X GET "https://my.delta.bg/api/dns" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('dns');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/dns', headers=headers)
print(req.json())
Example Response:
{
"service_ids": [
"10",
"20"
],
"zones": [
{
"domain_id": "60",
"name": "booble.com",
"service_id": "10"
},
{
"domain_id": "61",
"name": "bgg12ooble.com",
"service_id": "20"
}
]
}
HTTP Request
GET /dns
Add DNS Zone
Creates a new DNS zone
POST_DATA="{
\"name\": \"testzone.com\"
}"
curl -X POST "https://my.delta.bg/api/service/@service_id/dns" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"name" => "testzone.com"
]
]
$resp = $client->post('service/@service_id/dns', $options);
echo $resp->getBody();
payload = {
'name': "testzone.com"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@service_id/dns', json=payload, headers=headers)
print(req.json())
Example Response:
{
"info": [
"Domain zone testzone.com was created successfully."
]
}
HTTP Request
POST /service/@service_id/dns
Query Parameters
Parameter | Type | Description |
---|---|---|
service_id | int |
Service ID |
name | string |
Zone name |
List DNS for service
Returns a list of DNS zones under the service
curl -X GET "https://my.delta.bg/api/service/@service_id/dns" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@service_id/dns');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@service_id/dns', headers=headers)
print(req.json())
Example Response:
{
"error": [
"invalid method"
]
}
HTTP Request
GET /service/@service_id/dns
Query Parameters
Parameter | Type | Description |
---|---|---|
service_id | int |
Service ID |
Get DNS details
Returns details of the DNS zone
curl -X GET "https://my.delta.bg/api/service/@service_id/dns/@zone_id" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@service_id/dns/@zone_id');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://my.delta.bg/api/service/@service_id/dns/@zone_id', headers=headers)
print(req.json())
Example Response:
{
"service_id": 10,
"name": "booble.com",
"records": [
{
"id":"10",
"name":"qwerty",
"ttl":1800,
"priority":0,
"content":"127.0.0.1",
"type":"A"
},
{
"id":"11",
"name":"qwerty",
"ttl":1800,
"priority":0,
"content":"ns1.qwerty.com",
"type":"NS"
}
]
}
HTTP Request
GET /service/@service_id/dns/@zone_id
Query Parameters
Parameter | Type | Description |
---|---|---|
service_id | int |
Service ID |
zone_id | int |
Zone ID |
Remove DNS zone
Deletes the selected DNS zone
curl -X DELETE "https://my.delta.bg/api/service/@service_id/dns/@zone_id" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->delete('service/@service_id/dns/@zone_id');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.delete('https://my.delta.bg/api/service/@service_id/dns/@zone_id', headers=headers)
print(req.json())
Example Response:
{
"info": [
"Domain zone testzone.com was deleted successfully."
]
}
HTTP Request
DELETE /service/@service_id/dns/@zone_id
Query Parameters
Parameter | Type | Description |
---|---|---|
service_id | int |
Service ID |
zone_id | int |
Zone ID |
Add DNS Record
Creates a new record in the DNS zone
POST_DATA="{
\"name\": \"example.com\",
\"ttl\": 3600,
\"priority\": 10,
\"type\": \"A\",
\"content\": \"192.168.1.2\"
}"
# OR ...
POST_DATA="{
\"name\": \"_sip._tcp.example.com\",
\"ttl\": 3600,
\"priority\": 10,
\"type\": \"SRV\",
\"content\": [
10,
5060,
\"vc01.example.com\"
]
}"
curl -X POST "https://my.delta.bg/api/service/@service_id/dns/@zone_id/records" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"name" => "example.com",
"ttl" => 3600,
"priority" => 10,
"type" => "A",
"content" => "192.168.1.2"
]
]);
// OR ...
$options = [
'json' => [
"name" => "_sip._tcp.example.com",
"ttl" => 3600,
"priority" => 10,
"type" => "SRV",
"content" => [
10,
5060,
"vc01.example.com"
]
]
]);
$resp = $client->post('service/@service_id/dns/@zone_id/records', $options);
echo $resp->getBody();
payload = {
'name': "example.com",
'ttl': 3600,
'priority': 10,
'type': "A",
'content': "192.168.1.2"
}
# OR ...
payload = {
'name': "_sip._tcp.example.com",
'ttl': 3600,
'priority': 10,
'type': "SRV",
'content': [
10,
5060,
"vc01.example.com"
]
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://my.delta.bg/api/service/@service_id/dns/@zone_id/records', json=payload, headers=headers)
print(req.json())
Example Response:
{
"record": {
"name": "_sip._tcp.example.com",
"type": "SRV",
"ttl": "3600",
"priority": "10",
"content": [
10,
5060,
"vc01.example.com"
]
},
"info": [
"dnsnewrecordadded",
"SRV"
]
}
HTTP Request
POST /service/@service_id/dns/@zone_id/records
Query Parameters
Parameter | Type | Description |
---|---|---|
service_id | int |
Service ID |
zone_id | int |
Zone ID |
name | string |
Record name |
ttl | int |
Record ttl |
priority | int |
Priority of the record |
type | string |
Record type |
content | string |
Contents of the record |
Edit DNS Record
Edits the selected DNS zone record
POST_DATA="{
\"name\": \"example.com\",
\"ttl\": 3600,
\"priority\": 10,
\"type\": \"A\",
\"content\": \"192.168.1.2\"
}"
curl -X PUT "https://my.delta.bg/api/service/@service_id/dns/@zone_id/records/@record_id" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"name" => "example.com",
"ttl" => 3600,
"priority" => 10,
"type" => "A",
"content" => "192.168.1.2"
]
]
$resp = $client->put('service/@service_id/dns/@zone_id/records/@record_id', $options);
echo $resp->getBody();
payload = {
'name': "example.com",
'ttl': 3600,
'priority': 10,
'type': "A",
'content': "192.168.1.2"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://my.delta.bg/api/service/@service_id/dns/@zone_id/records/@record_id', json=payload, headers=headers)
print(req.json())
Example Response:
{
"record": {
"id": "55",
"type": "A",
"ttl": "3600",
"name": "test",
"priority": 0,
"content": "192.168.1.2"
},
"info": [
"The record was updated successfully."
]
}
HTTP Request
PUT /service/@service_id/dns/@zone_id/records/@record_id
Query Parameters
Parameter | Type | Description |
---|---|---|
service_id | int |
Service ID |
zone_id | int |
Zone ID |
record_id | int |
Record ID |
name | string |
Record name |
ttl | int |
Record ttl |
priority | int |
Priority of the record |
type | string |
Record type |
content | string |
Contents of the record |
Remove DNS Record
Removes the selected DNS zone record
curl -X DELETE "https://my.delta.bg/api/service/@service_id/dns/@zone_id/records/@record_id" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->delete('service/@service_id/dns/@zone_id/records/@record_id');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.delete('https://my.delta.bg/api/service/@service_id/dns/@zone_id/records/@record_id', headers=headers)
print(req.json())
HTTP Request
DELETE /service/@service_id/dns/@zone_id/records/@record_id
Query Parameters
Parameter | Type | Description |
---|---|---|
service_id | int |
Service ID |
zone_id | int |
Zone ID |
record_id | int |
Record ID |
Services
Server Power status
Return server status
curl -X GET "https://my.delta.bg/api/service/@id/status"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
]);
$resp = $client->get('service/@id/status');
echo $resp->getBody();
req = requests.get('https://my.delta.bg/api/service/@id/status')
print(req.json())
HTTP Request
GET /service/@id/status
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Service id |
Reset Server
Return server status
POST_DATA="{
\"id\": \"idValue\"
}"
curl -X POST "https://my.delta.bg/api/service/@id/reset" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
]);
$options = [
'json' => [
"id" => "idValue"
]
]
$resp = $client->post('service/@id/reset', $options);
echo $resp->getBody();
payload = {
'id': "idValue"
}
req = requests.post('https://my.delta.bg/api/service/@id/reset', json=payload)
print(req.json())
HTTP Request
POST /service/@id/reset
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Service id |
Server Bandwidth
Return server bandwidth details
curl -X GET "https://my.delta.bg/api/service/@id/bandwidth"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
]);
$resp = $client->get('service/@id/bandwidth');
echo $resp->getBody();
req = requests.get('https://my.delta.bg/api/service/@id/bandwidth')
print(req.json())
HTTP Request
GET /service/@id/bandwidth
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Service id |
Reinstal Details
Return installation options for server
curl -X GET "https://my.delta.bg/api/service/@id/reinstall"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
]);
$resp = $client->get('service/@id/reinstall');
echo $resp->getBody();
req = requests.get('https://my.delta.bg/api/service/@id/reinstall')
print(req.json())
HTTP Request
GET /service/@id/reinstall
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Service id |
Reinstall Server
POST_DATA="{
\"id\": \"idValue\",
\"profile\": \"profileValue\",
\"rootpassword\": \"rootpasswordValue\",
\"adminuser\": \"adminuserValue\",
\"userpassword\": \"userpasswordValue\",
\"packageselection\": \"packageselectionValue\",
\"extra1\": \"extra1Value\"
}"
curl -X POST "https://my.delta.bg/api/service/@id/reinstall" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://my.delta.bg/api/',
]);
$options = [
'json' => [
"id" => "idValue",
"profile" => "profileValue",
"rootpassword" => "rootpasswordValue",
"adminuser" => "adminuserValue",
"userpassword" => "userpasswordValue",
"packageselection" => "packageselectionValue",
"extra1" => "extra1Value"
]
]
$resp = $client->post('service/@id/reinstall', $options);
echo $resp->getBody();
payload = {
'id': "idValue",
'profile': "profileValue",
'rootpassword': "rootpasswordValue",
'adminuser': "adminuserValue",
'userpassword': "userpasswordValue",
'packageselection': "packageselectionValue",
'extra1': "extra1Value"
}
req = requests.post('https://my.delta.bg/api/service/@id/reinstall', json=payload)
print(req.json())
HTTP Request
POST /service/@id/reinstall
Query Parameters
Parameter | Type | Description |
---|---|---|
id | int |
Service id |
profile | int |
Vivamus porta consectetur sem sit amet pharetra |
rootpassword | string |
Mauris feugiat in ipsum sit amet volutpat. |
adminuser | string |
Donec in aliquet erat. Etiam vitae faucibus odio. In luctus |
userpassword | string |
Sed in tortor consequat, ullamcorper ex in |
packageselection | string |
Duis commodo egestas justo a cursus. |
extra1 | string |
Morbi dictum faucibus lectus. |
extra1 | string |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In at blandit nunc. |